本文整理汇总了PHP中CSaleLang::Add方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleLang::Add方法的具体用法?PHP CSaleLang::Add怎么用?PHP CSaleLang::Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleLang
的用法示例。
在下文中一共展示了CSaleLang::Add方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
CAgent::AddAgent("Bitrix\\Sale\\Product2ProductTable::deleteOldProducts({$p2p_del_exp});", "sale", "N", 24 * 3600 * $p2p_del_period, "", "Y");
foreach ($siteList as &$oneSite) {
$valCurrency = trim(${"CURRENCY_" . $oneSite['ID']});
if ($valCurrency == '') {
$valCurrency = false;
}
$arFields = array('LID' => $oneSite['ID'], 'CURRENCY' => $valCurrency);
if ($arRes = CSaleLang::GetByID($oneSite['ID'])) {
if ($valCurrency !== false) {
CSaleLang::Update($oneSite['ID'], $arFields);
} else {
CSaleLang::Delete($oneSite['ID']);
}
} else {
if ($valCurrency !== false) {
CSaleLang::Add($arFields);
}
}
CSaleGroupAccessToSite::DeleteBySite($oneSite['ID']);
if (isset(${"SITE_USER_GROUPS_" . $oneSite['ID']}) && is_array(${"SITE_USER_GROUPS_" . $oneSite['ID']})) {
for ($i = 0, $intCount = count(${"SITE_USER_GROUPS_" . $oneSite['ID']}); $i < $intCount; $i++) {
$groupID = intval(${"SITE_USER_GROUPS_" . $oneSite['ID']}[$i]);
if ($groupID > 0) {
CSaleGroupAccessToSite::Add(array("SITE_ID" => $oneSite['ID'], "GROUP_ID" => $groupID));
}
}
}
}
if (isset($_POST['product_reserve_condition'])) {
$productReserveCondition = (string) $_POST['product_reserve_condition'];
if (in_array($productReserveCondition, Sale\Configuration::getReservationConditionList(false))) {
示例2: array
$shopBANK = $wizard->GetVar("shopBANK");
COption::SetOptionString("eshop", "shopBANK", $shopBANK, false, WIZARD_SITE_ID);
$shopBANKREKV = $wizard->GetVar("shopBANKREKV");
COption::SetOptionString("eshop", "shopBANKREKV", $shopBANKREKV, false, WIZARD_SITE_ID);
$shopKS = $wizard->GetVar("shopKS");
COption::SetOptionString("eshop", "shopKS", $shopKS, false, WIZARD_SITE_ID);
$siteStamp = $wizard->GetVar("siteStamp");
if ($siteStamp == "" )
$siteStamp = COption::GetOptionString("eshop", "siteStamp", "", WIZARD_SITE_ID);
}
elseif ($shopLocalization == "ua")
{
if (CSaleLang::GetByID(WIZARD_SITE_ID))
CSaleLang::Update(WIZARD_SITE_ID, array("LID" => WIZARD_SITE_ID, "CURRENCY" => "UAH"));
else
CSaleLang::Add(array("LID" => WIZARD_SITE_ID, "CURRENCY" => "UAH"));
$shopLocation = $wizard->GetVar("shopLocation_ua");
COption::SetOptionString("eshop", "shopLocation_ua", $shopLocation, false, WIZARD_SITE_ID);
$shopOfName = $wizard->GetVar("shopOfName_ua");
COption::SetOptionString("eshop", "shopOfName_ua", $shopOfName, false, WIZARD_SITE_ID);
$shopAdr = $wizard->GetVar("shopAdr_ua");
COption::SetOptionString("eshop", "shopAdr_ua", $shopAdr, false, WIZARD_SITE_ID);
$shopEGRPU_ua = $wizard->GetVar("shopEGRPU_ua");
COption::SetOptionString("eshop", "shopEGRPU_ua", $shopEGRPU_ua, false, WIZARD_SITE_ID);
$shopINN_ua = $wizard->GetVar("shopINN_ua");
COption::SetOptionString("eshop", "shopINN_ua", $shopINN_ua, false, WIZARD_SITE_ID);
$shopNDS_ua = $wizard->GetVar("shopNDS_ua");
COption::SetOptionString("eshop", "shopNDS_ua", $shopNDS_ua, false, WIZARD_SITE_ID);
$shopNS_ua = $wizard->GetVar("shopNS_ua");
示例3: __IncludeLang
$bRus = true;
}
__IncludeLang(GetLangFileName(dirname(__FILE__) . "/lang/", "/" . basename(__FILE__), $lang));
$dbPerson = CSalePersonType::GetList(array());
if (!$dbPerson->Fetch()) {
//Person Types
$arGeneralInfo["personType"]["fiz"] = CSalePersonType::Add(array("LID" => $siteID, "NAME" => GetMessage("SALE_WIZARD_PERSON_1"), "SORT" => "100"));
$arGeneralInfo["personType"]["ur"] = CSalePersonType::Add(array("LID" => $siteID, "NAME" => GetMessage("SALE_WIZARD_PERSON_2"), "SORT" => "150"));
//currecny to site
$dbUserAccount = CSaleUserAccount::GetList(array(), array("USER_ID" => 1));
if (!$dbUserAccount->Fetch()) {
if ($bRus) {
CSaleLang::Add(array("LID" => $siteID, "CURRENCY" => "RUB"));
CSaleUserAccount::Add(array("USER_ID" => 1, "CURRENT_BUDGET" => 1000, "CURRENCY" => "RUB"));
} else {
CSaleLang::Add(array("LID" => $siteID, "CURRENCY" => "USD"));
CSaleUserAccount::Add(array("USER_ID" => 1, "CURRENT_BUDGET" => 100, "CURRENCY" => "USD"));
}
}
//Sale administrators
$userGroupID = "";
$dbGroup = CGroup::GetList($by = "", $order = "", array("STRING_ID" => "sale_administrator"));
if ($arGroup = $dbGroup->Fetch()) {
$userGroupID = $arGroup["ID"];
} else {
$group = new CGroup();
$arFields = array("ACTIVE" => "Y", "C_SORT" => 800, "NAME" => GetMessage("SALE_WIZARD_ADMIN_SALE"), "DESCRIPTION" => GetMessage("SALE_WIZARD_ADMIN_SALE_DESCR"), "USER_ID" => array(), "STRING_ID" => "sale_administrator");
$userGroupID = $group->Add($arFields);
}
if (IntVal($userGroupID) > 0) {
DemoSiteUtil::SetFilePermission(array($siteID, "/bitrix/admin"), array($userGroupID => "R"));