当前位置: 首页>>代码示例>>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;未经允许,请勿转载。