當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CSaleLang::Add方法代碼示例

本文整理匯總了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))) {
開發者ID:webgksupport,項目名稱:alpina,代碼行數:31,代碼來源:options.php

示例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");
開發者ID:ASDAFF,項目名稱:entask.ru,代碼行數:31,代碼來源:step1.php

示例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"));
開發者ID:webgksupport,項目名稱:alpina,代碼行數:31,代碼來源:step1.php


注:本文中的CSaleLang::Add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。