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


PHP CCurrency::GetbaseCurrency方法代碼示例

本文整理匯總了PHP中CCurrency::GetbaseCurrency方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCurrency::GetbaseCurrency方法的具體用法?PHP CCurrency::GetbaseCurrency怎麽用?PHP CCurrency::GetbaseCurrency使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCurrency的用法示例。


在下文中一共展示了CCurrency::GetbaseCurrency方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 function __construct($prof)
 {
     global $USER;
     if (!is_object($USER)) {
         $USER = new CUser();
     }
     CModule::IncludeModule("iblock");
     if (CModule::IncludeModule("catalog")) {
         $this->isCat = true;
     } else {
         $this->isCat = false;
     }
     $pro = new CProfileAdmin();
     $cgm = new CGMExport();
     $pr = $pro->GetByID($prof)->Fetch();
     $this->ID = $pr["ID"];
     $this->Name = $pr["NAME"];
     $this->TYPE_RUN = $pr["TYPE_RUN"];
     $this->FEED = $pr["FEED"];
     $this->COMPANY = $pr["COMPANY"];
     $this->SHOPNAME = $pr["SHOPNAME"];
     $this->DOMAIN_NAME = $pr["DOMAIN_NAME"];
     $this->ACTIVE = $pr["ACTIVE"] == "Y" ? true : false;
     $this->ENCODING = $pr["ENCODING"];
     $this->IBLOCK_ID = unserialize(base64_decode($pr["IBLOCK_ID"]));
     $this->SECTION_ID = unserialize(base64_decode($pr["SECTION_ID"]));
     $this->GOOGLE_CATEGORY = unserialize(base64_decode($pr["GOOGLE_CATEGORY"]));
     $this->CONDITIONS = $pr["CONDITIONS"];
     $this->LID = $pr["LID"];
     $this->DETAIL_PAGE_URL = $pr["DETAIL_PAGE_URL"];
     $this->USE_SKU = $pr["USE_SKU"] == "Y" ? true : false;
     $this->CHECK_INCLUDE = $pr["CHECK_INCLUDE"] == "Y" ? true : false;
     $this->FORORDER = $pr["FORORDER"] == "Y" ? true : false;
     $this->OTHER = $pr["OTHER"] == "Y" ? true : false;
     $this->CONDITION_RULE = unserialize(base64_decode($pr["CONDITION_RULE"]));
     $this->PRICE = $pr["PRICE"];
     $this->XML_DATA = unserialize(base64_decode($pr["XML_DATA"]));
     $this->DATA_START = date("d-m-Y h:i:s", $pr["DATA_START"]);
     $this->PERIOD = (int) $pr["PERIOD"];
     $this->USE_XML_FILE = $pr["USE_XML_FILE"] == "Y" ? true : false;
     $this->URL_DATA_FILE = $pr["URL_DATA_FILE"];
     $this->NAMESCHEMA = $pr["NAMESCHEMA"];
     $this->arSelect = array("ID", "CODE", "LID", "NAME", "IBLOCK_ID", "IBLOCK_SECTION_ID", "IBLOCK_CODE", "ACTIVE", "DATE_ACTIVE_FROM", "DATE_ACTIVE_TO", "SORT", "PREVIEW_PICTURE", "PREVIEW_TEXT", "TIMESTAMP_X", "PREVIEW_TEXT_TYPE", "DETAIL_PICTURE", "DETAIL_TEXT", "DETAIL_TEXT_TYPE", "DATE_CREATE", "CREATED_BY", "DETAIL_PAGE_URL");
     $this->Filter = array("LID" => "", "IBLOCK_ID" => "", "SECTION_ID" => "", "ACTIVE" => "Y", "ACTIVE_DATE" => "Y", "INCLUDE_SUBSECTIONS" => "", "IBLOCK_ACTIVE" => "Y", "SECTION_GLOBAL_ACTIVE" => "Y");
     if (is_array($this->GOOGLE_CATEGORY) && sizeof($this->GOOGLE_CATEGORY) > 0) {
         foreach ($this->GOOGLE_CATEGORY as $id => $gogle) {
             $this->GOOGLE_CATEGORY[$id]['THIS'] = text2xml($gogle['THIS'], true, true, $this->ENCODING);
             $this->GOOGLE_CATEGORY[$id]['GOOGLE'] = text2xml($gogle['GOOGLE'], false, true, $this->ENCODING);
         }
     }
     if ($this->isCat) {
         if (is_array($this->IBLOCK_ID)) {
             foreach ($this->IBLOCK_ID as $ibl) {
                 $this->isCatalog[$ibl] = CCatalog::GetByID($ibl) ? true : false;
             }
         } else {
             $this->isCat = false;
         }
     }
     if ($this->isCat && (is_array($this->isCatalog) && sizeof($this->isCatalog) > 0)) {
         foreach ($this->isCatalog as $code => $val) {
             if ($val == 1) {
                 $mxResult = CCatalogSKU::GetInfoByProductIBlock($code);
                 if (is_array($mxResult)) {
                     $this->sku_IBLOCK_ID[$code] = $mxResult['IBLOCK_ID'];
                     $this->sku_PROPERTY[$code] = $mxResult['SKU_PROPERTY_ID'];
                 }
             }
         }
     }
     if (CModule::IncludeModule("currency")) {
         $this->baseCur = CCurrency::GetbaseCurrency();
         if ($this->baseCur == "RUB") {
             $this->baseCur = "RUB";
         }
     } else {
         $this->baseCur = "RUB";
     }
     $this->Filter['INCLUDE_SUBSECTIONS'] = $this->CHECK_INCLUDE ? "Y" : "N";
     if (sizeof($this->IBLOCK_ID) > 0) {
         foreach ($this->IBLOCK_ID as $ibl) {
             $this->arFilter[$ibl] = $this->Filter;
             $this->arFilter[$ibl]["LID"] = $this->LID;
             $this->arFilter[$ibl]["IBLOCK_ID"] = $ibl;
             $this->arFilter[$ibl]["SECTION_ID"] = $this->GetSectionFromIB($ibl);
         }
     }
     if (sizeof($this->CONDITION_RULE) > 0) {
         $fltr = array();
         $skufil = array();
         $tmpFilter = array();
         $tmpFilter1 = array();
         foreach ($this->CONDITION_RULE as $al => $rule) {
             if ($al != "COUNT") {
                 if ($rule['VALUE'] != "" && $rule['RULES'] != "no" && $rule['PROPERTY'] != 0 && !empty($rule['PROPERTY'])) {
                     $tmp = explode("-", $rule['PROPERTY']);
                     $tmp1 = explode("_", $tmp[1]);
                     if (in_array("SKU", $tmp1)) {
                         //add sku filter
                         $skufil[$tmp[0]][] = array("PROPERTY" => $tmp1[1], "RULES" => $rule['RULES'], "VALUE" => $rule['VALUE']);
//.........這裏部分代碼省略.........
開發者ID:akniyev,項目名稱:itprom_dobrohost,代碼行數:101,代碼來源:profile.php


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