本文整理汇总了PHP中CCatalogStore::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CCatalogStore::GetList方法的具体用法?PHP CCatalogStore::GetList怎么用?PHP CCatalogStore::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCatalogStore
的用法示例。
在下文中一共展示了CCatalogStore::GetList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catalog_offer_mutator_1c
function catalog_offer_mutator_1c(&$arLoadOffer, &$xOfferNode)
{
global $arProperties;
$sQuantity = $arLoadOffer['QUANTITY'];
$newQuanity = 0;
$priceTypeId = '';
if ($obPrice = $xOfferNode->SelectNodes('/Цены/Цена/ИдТипаЦены')) {
$priceTypeId = $obPrice->textContent();
if ($priceTypeId != '') {
$Store = new CCatalogStore();
$storeProd = new CCatalogStoreProduct();
$rsStore = $Store->GetList(array(), array('XML_ID' => $priceTypeId), false, false, array('*'));
if ($arStore = $rsStore->Fetch()) {
$storeId = $arStore['ID'];
} else {
$arFields = array("TITLE" => 'Store_' . $priceTypeId, "ACTIVE" => 'Y', "ADDRESS" => '-', "XML_ID" => $priceTypeId);
$storeId = CCatalogStore::Add($arFields);
}
$storeProd->Add(array("PRODUCT_ID" => $arLoadOffer['ID'], "STORE_ID" => $storeId, "AMOUNT" => $sQuantity));
$rsStoreProd = $storeProd->GetList(array(), array('PRODUCT_ID' => $arLoadOffer['ID']), false, false, array('AMOUNT'));
while ($arStore = $rsStoreProd->Fetch()) {
$newQuanity = $newQuanity + $arStore['AMOUNT'];
}
if ($newQuanity > 0) {
$arLoadOffer['QUANTITY'] = $newQuanity;
}
}
}
return $arLoadOffer;
}
示例2: Add
/** Add new store in table b_catalog_store,
* @static
* @param $arFields
* @return bool|int
*/
static function Add($arFields)
{
/** @global CDataBase $DB */
global $DB;
if (!CBXFeatures::IsFeatureEnabled('CatMultiStore')) {
$dbResultList = CCatalogStore::GetList(array());
if ($arResult = $dbResultList->Fetch()) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("CS_ALREADY_HAVE_STORE"));
return false;
}
}
if (array_key_exists('DATE_CREATE', $arFields)) {
unset($arFields['DATE_CREATE']);
}
if (array_key_exists('DATE_MODIFY', $arFields)) {
unset($arFields['DATE_MODIFY']);
}
$arFields['~DATE_MODIFY'] = $DB->GetNowFunction();
$arFields['~DATE_CREATE'] = $DB->GetNowFunction();
if (!self::CheckFields('ADD', $arFields)) {
return false;
}
$arInsert = $DB->PrepareInsert("b_catalog_store", $arFields);
$strSql = "INSERT INTO b_catalog_store (" . $arInsert[0] . ") " . "VALUES(" . $arInsert[1] . ")";
$res = $DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__);
if (!$res) {
return false;
}
$lastId = intval($DB->LastID());
return $lastId;
}
示例3: Update
static function Update($id, $arFields)
{
global $DB;
$id = intval($id);
if (0 >= $id) {
return false;
}
foreach (GetModuleEvents("catalog", "OnBeforeCatalogStoreUpdate", true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array($id, &$arFields)) === false) {
return false;
}
}
$bNeedConversion = false;
if (array_key_exists('DATE_CREATE', $arFields)) {
unset($arFields['DATE_CREATE']);
}
if (array_key_exists('DATE_MODIFY', $arFields)) {
unset($arFields['DATE_MODIFY']);
}
if (array_key_exists('DATE_STATUS', $arFields)) {
unset($arFields['DATE_STATUS']);
}
if (array_key_exists('CREATED_BY', $arFields)) {
unset($arFields['CREATED_BY']);
}
$arFields['~DATE_MODIFY'] = $DB->GetNowFunction();
$dbStore = CCatalogStore::GetList(array(), array("ID" => $id), false, false, array("ACTIVE"));
if ($arStore = $dbStore->Fetch()) {
if ($arStore["ACTIVE"] != $arFields["ACTIVE"]) {
$bNeedConversion = true;
}
}
if ($id <= 0 || !self::CheckFields('UPDATE', $arFields)) {
return false;
}
$strUpdate = $DB->PrepareUpdate("b_catalog_store", $arFields);
if (!empty($strUpdate)) {
$strSql = "update b_catalog_store set " . $strUpdate . " where ID = " . $id;
if (!$DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__)) {
return false;
}
CCatalogStoreControlUtil::clearStoreName($id);
}
if ($bNeedConversion) {
self::recalculateStoreBalances($id);
}
foreach (GetModuleEvents("catalog", "OnCatalogStoreUpdate", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array($id, $arFields));
}
return $id;
}
示例4: getStoresList
protected static function getStoresList($nameOnly = true, $siteId = "")
{
if (!\Bitrix\Main\Loader::includeModule('catalog')) {
return array();
}
$filter = array("ACTIVE" => "Y", "ISSUING_CENTER" => "Y");
if (strlen($siteId) > 0) {
$filter["+SITE_ID"] = $siteId;
}
$result = array();
$dbList = \CCatalogStore::GetList(array("SORT" => "ASC", "TITLE" => "ASC"), $filter, false, false, array("ID", "SITE_ID", "TITLE", "ADDRESS", "DESCRIPTION", "IMAGE_ID", "PHONE", "SCHEDULE", "LOCATION_ID", "GPS_N", "GPS_S"));
while ($store = $dbList->Fetch()) {
if ($nameOnly) {
$result[$store["ID"]] = $store["TITLE"] . (strlen($store["SITE_ID"]) > 0 ? " [" . $store["SITE_ID"] . "]" : "");
} else {
$result[$store["ID"]] = $store;
}
}
return $result;
}
示例5: Update
static function Update($id, $arFields)
{
global $DB;
$id = intval($id);
$bNeedConversion = false;
if (array_key_exists('DATE_CREATE', $arFields)) {
unset($arFields['DATE_CREATE']);
}
if (array_key_exists('DATE_MODIFY', $arFields)) {
unset($arFields['DATE_MODIFY']);
}
if (array_key_exists('DATE_STATUS', $arFields)) {
unset($arFields['DATE_STATUS']);
}
if (array_key_exists('CREATED_BY', $arFields)) {
unset($arFields['CREATED_BY']);
}
$arFields['~DATE_MODIFY'] = $DB->GetNowFunction();
$dbStore = CCatalogStore::GetList(array(), array("ID" => $id), false, false, array("ACTIVE"));
if ($arStore = $dbStore->Fetch()) {
if ($arStore["ACTIVE"] != $arFields["ACTIVE"]) {
$bNeedConversion = true;
}
}
if ($id <= 0 || !self::CheckFields('UPDATE', $arFields)) {
return false;
}
$strUpdate = $DB->PrepareUpdate("b_catalog_store", $arFields);
if (!empty($strUpdate)) {
$strSql = "UPDATE b_catalog_store SET " . $strUpdate . " WHERE ID = " . $id . " ";
if (!$DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__)) {
return false;
}
}
if ($bNeedConversion) {
self::recalculateStoreBalances($id);
}
return $id;
}
示例6: Add
/** Add new store in table b_catalog_store,
* @static
* @param $arFields
* @return bool|int
*/
static function Add($arFields)
{
/** @global CDataBase $DB */
global $DB;
if (!CBXFeatures::IsFeatureEnabled('CatMultiStore')) {
$dbResultList = CCatalogStore::GetList(array(), array(), false, array('NAV_PARAMS' => array("nTopCount" => "1")), array("ID"));
if ($arResult = $dbResultList->Fetch()) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("CS_ALREADY_HAVE_STORE"));
return false;
}
}
foreach (GetModuleEvents("catalog", "OnBeforeCatalogStoreAdd", true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array(&$arFields)) === false) {
return false;
}
}
if (array_key_exists('DATE_CREATE', $arFields)) {
unset($arFields['DATE_CREATE']);
}
if (array_key_exists('DATE_MODIFY', $arFields)) {
unset($arFields['DATE_MODIFY']);
}
$arFields['~DATE_MODIFY'] = $DB->GetNowFunction();
$arFields['~DATE_CREATE'] = $DB->GetNowFunction();
if (!self::CheckFields('ADD', $arFields)) {
return false;
}
$arInsert = $DB->PrepareInsert("b_catalog_store", $arFields);
$strSql = "INSERT INTO b_catalog_store (" . $arInsert[0] . ") VALUES(" . $arInsert[1] . ")";
$res = $DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__);
if (!$res) {
return false;
}
$lastId = intval($DB->LastID());
foreach (GetModuleEvents("catalog", "OnCatalogStoreAdd", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array($lastId, $arFields));
}
return $lastId;
}
示例7: getCatalogStores
private static function getCatalogStores()
{
if (!isset(self::$catalogStoreCache)) {
self::$catalogStoreCache = array();
if (self::$catalogIncluded === null) {
self::$catalogIncluded = Loader::includeModule('catalog');
}
if (self::$catalogIncluded) {
$storeCount = 0;
$maxStores = (int) COption::GetOptionString("iblock", "seo_max_stores");
$rsStore = CCatalogStore::GetList(array('SORT' => 'ASC'), array(), false, false, array('ID', 'TITLE', 'ADDRESS'));
while ($store = $rsStore->Fetch()) {
self::$catalogStoreCache[$storeCount] = $store;
$storeCount++;
if ($maxStores > 0 && $storeCount >= $maxStores) {
break;
}
}
}
}
return self::$catalogStoreCache;
}
示例8: getStoreName
/** By store ID, returns its title and\or address.
* @param $storeId
* @return string
*/
public static function getStoreName($storeId)
{
static $dbStore = '';
static $arStores = array();
if ($storeId <= 0) {
return '';
}
$storeName = '';
if ($dbStore == '') {
$dbStore = CCatalogStore::GetList(array(), array("ACTIVE" => "Y"));
}
if (empty($arStores)) {
while ($arStore = $dbStore->Fetch()) {
$arStores[] = $arStore;
}
}
foreach ($arStores as $arStore) {
if ($arStore["ID"] == $storeId) {
$storeName = $arStore["ADDRESS"];
$storeName = $arStore["TITLE"] !== '' ? $arStore["TITLE"] . " (" . $storeName . ") " : $storeName;
}
}
return $storeName;
}
示例9: htmlspecialcharsbx
$arDelivery["DESCRIPTION"] = htmlspecialcharsbx($arDeliveryDescription["DESCRIPTION"]);
$arDeliveryAll[] = $arDelivery;
if (!empty($arUserResult["DELIVERY_ID"]) && strpos($arUserResult["DELIVERY_ID"], ":") === false) {
if (IntVal($arUserResult["DELIVERY_ID"]) == IntVal($arDelivery["ID"])) {
$bFound = true;
}
}
if (IntVal($arUserResult["DELIVERY_ID"]) == IntVal($arDelivery["ID"])) {
$arResult["DELIVERY_PRICE"] = roundEx(CCurrencyRates::ConvertCurrency($arDelivery["PRICE"], $arDelivery["CURRENCY"], $arResult["BASE_LANG_CURRENCY"]), SALE_VALUE_PRECISION);
}
}
if (!$bFound && !empty($arUserResult["DELIVERY_ID"]) && strpos($arUserResult["DELIVERY_ID"], ":") === false) {
$arUserResult["DELIVERY_ID"] = "";
}
$arStore = array();
$dbList = CCatalogStore::GetList(array("SORT" => "DESC", "ID" => "DESC"), array("ACTIVE" => "Y", "ID" => $arStoreId, "ISSUING_CENTER" => "Y", "+SITE_ID" => SITE_ID), false, false, array("ID", "TITLE", "ADDRESS", "DESCRIPTION", "IMAGE_ID", "PHONE", "SCHEDULE", "GPS_N", "GPS_S", "ISSUING_CENTER", "SITE_ID"));
while ($arStoreTmp = $dbList->Fetch()) {
if ($arStoreTmp["IMAGE_ID"] > 0) {
$arStoreTmp["IMAGE_ID"] = CFile::GetFileArray($arStoreTmp["IMAGE_ID"]);
}
$arStore[$arStoreTmp["ID"]] = $arStoreTmp;
}
$arResult["STORE_LIST"] = $arStore;
if (!$bFound && !empty($arUserResult["DELIVERY_ID"]) && strpos($arUserResult["DELIVERY_ID"], ":") === false) {
$arUserResult["DELIVERY_ID"] = "";
}
foreach ($arDeliveryAll as $arDelivery) {
if (count($arP2D[$arUserResult["PAY_SYSTEM_ID"]]) <= 0 || in_array($arDelivery["ID"], $arP2D[$arUserResult["PAY_SYSTEM_ID"]])) {
$arDelivery["FIELD_NAME"] = "DELIVERY_ID";
if (IntVal($arUserResult["DELIVERY_ID"]) == IntVal($arDelivery["ID"])) {
$arDelivery["CHECKED"] = "Y";
示例10: GetInheritedPropertyTemplateElementMenuItems
public static function GetInheritedPropertyTemplateElementMenuItems($iblock_id, $action_function, $menuID, $inputID = "")
{
$result = array();
$result["this"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_ELEMENT"),
"MENU" => array(
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_ELEMENT_NAME"),
"ONCLICK" => "$action_function('{=this.Name}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_ELEMENT_LOWER_NAME"),
"ONCLICK" => "$action_function('{=lower this.Name}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_ELEMENT_CODE"),
"ONCLICK" => "$action_function('{=this.Code}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_ELEMENT_PREVIEW_TEXT"),
"ONCLICK" => "$action_function('{=this.PreviewText}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_ELEMENT_DETAIL_TEXT"),
"ONCLICK" => "$action_function('{=this.DetailText}', '$menuID', '$inputID')",
),
),
);
if ($iblock_id > 0)
{
$result["properties"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_PROPERTIES"),
"MENU" => array(
),
);
$rsProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $iblock_id));
while($property = $rsProperty->fetch())
{
if ($property["PROPERTY_TYPE"] != "F")
{
$result["properties"]["MENU"][] = array(
"TEXT" => $property["NAME"],
"ONCLICK" => "$action_function('{=this.property.".($property["CODE"]!=""? $property["CODE"]: $property["ID"])."}', '$menuID', '$inputID')",
);
}
}
}
$result["parent"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_PARENT"),
"MENU" => array(
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_PARENT_NAME"),
"ONCLICK" => "$action_function('{=parent.Name}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_PARENT_CODE"),
"ONCLICK" => "$action_function('{=parent.Code}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_PARENT_TEXT"),
"ONCLICK" => "$action_function('{=parent.PreviewText}', '$menuID', '$inputID')",
),
),
);
$result["iblock"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_IBLOCK"),
"MENU" => array(
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_IBLOCK_NAME"),
"ONCLICK" => "$action_function('{=iblock.Name}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_IBLOCK_CODE"),
"ONCLICK" => "$action_function('{=iblock.Code}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_IBLOCK_TEXT"),
"ONCLICK" => "$action_function('{=iblock.PreviewText}', '$menuID', '$inputID')",
),
),
);
if (\Freetrix\Main\Loader::includeModule('catalog'))
{
$arCatalog = \CCatalogSKU::GetInfoByProductIBlock($iblock_id);
if (is_array($arCatalog))
{
$result["sku_properties"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_SKU_PROPERTIES"),
"MENU" => array(
),
);
$rsProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $arCatalog["IBLOCK_ID"]));
while($property = $rsProperty->fetch())
{
if ($property["PROPERTY_TYPE"] != "F")
{
$result["sku_properties"]["MENU"][] = array(
"TEXT" => $property["NAME"],
"ONCLICK" => "$action_function('{=concat {=distinct this.catalog.sku.property.".($property["CODE"]!=""? $property["CODE"]: $property["ID"])." \", \"}}', '$menuID', '$inputID')",
);
//.........这里部分代码省略.........
示例11: array
if (isset(${"CAT_USER_GROUP_ID_" . $arGroup["ID"]}) && ${"CAT_USER_GROUP_ID_" . $arGroup["ID"]} == "Y") {
if (IntVal(${"CAT_ACCESS_LENGTH_" . $arGroup["ID"]}) != IntVal($arCurProductGroups[$arGroup["ID"]]["ACCESS_LENGTH"]) || ${"CAT_ACCESS_LENGTH_TYPE_" . $arGroup["ID"]} != $arCurProductGroups[$arGroup["ID"]]["ACCESS_LENGTH_TYPE"]) {
$arCatalogFields = array("ACCESS_LENGTH" => IntVal(${"CAT_ACCESS_LENGTH_" . $arGroup["ID"]}), "ACCESS_LENGTH_TYPE" => ${"CAT_ACCESS_LENGTH_TYPE_" . $arGroup["ID"]});
CCatalogProductGroups::Update($arCurProductGroups[$arGroup["ID"]]["ID"], $arCatalogFields);
}
} else {
CCatalogProductGroups::Delete($arCurProductGroups[$arGroup["ID"]]["ID"]);
}
} else {
if (isset(${"CAT_USER_GROUP_ID_" . $arGroup["ID"]}) && ${"CAT_USER_GROUP_ID_" . $arGroup["ID"]} == "Y") {
$arCatalogFields = array("PRODUCT_ID" => $ID, "GROUP_ID" => $arGroup["ID"], "ACCESS_LENGTH" => IntVal(${"CAT_ACCESS_LENGTH_" . $arGroup["ID"]}), "ACCESS_LENGTH_TYPE" => ${"CAT_ACCESS_LENGTH_TYPE_" . $arGroup["ID"]});
CCatalogProductGroups::Add($arCatalogFields);
}
}
}
}
if ($USER->CanDoOperation('catalog_store')) {
$rsStores = CCatalogStore::GetList(array(), array('ACTIVE' => 'Y'), false, false, array('ID'));
while ($arStore = $rsStores->Fetch()) {
if (isset($_POST['AR_AMOUNT'][$arStore['ID']])) {
$arStoreProductFields = array("PRODUCT_ID" => $ID, "STORE_ID" => $arStore['ID'], "AMOUNT" => $_POST['AR_AMOUNT'][$arStore['ID']]);
if (!CCatalogStoreProduct::UpdateFromForm($arStoreProductFields)) {
$bVarsFromForm = true;
}
}
}
}
}
}
}
}
示例12: array
while($arAllSkuElements = $dbAllSkuElements->fetch())
{
$arSkuElements[] = $arAllSkuElements;
}
}
foreach($arSkuElements as $skuId)
{
if(isset($skuId["ID"]))
$arResultSkuId[] = $skuId["ID"];
}
if(!empty($arResultSkuId))
$arParams["ELEMENT_ID"] = $arResultSkuId;
$arResult["IS_SKU"] = true;
$rsProps = CCatalogStore::GetList(array('TITLE' => 'ASC', 'ID' => 'ASC'), array('ACTIVE' => 'Y', "PRODUCT_ID" => $arParams["ELEMENT_ID"], "+SITE_ID" => SITE_ID, "ISSUING_CENTER" => 'Y'), false, false, $arSelect);
while($arProp = $rsProps->GetNext())
{
$amount = (is_null($arProp["PRODUCT_AMOUNT"])) ? 0 : $arProp["PRODUCT_AMOUNT"];
$storeURL = CComponentEngine::MakePathFromTemplate($arParams["STORE_PATH"], array("store_id" => $arProp["ID"]));
if($arProp["TITLE"] == '' && $arProp["ADDRESS"] != '')
$storeName = $arProp["ADDRESS"];
elseif($arProp["ADDRESS"] == '' && $arProp["TITLE"] != '')
$storeName = $arProp["TITLE"];
else
$storeName = $arProp["TITLE"]." (".$arProp["ADDRESS"].")";
if($arParams["USE_STORE_PHONE"] == 'Y' && $arProp["PHONE"] != '')
$storePhone = $arProp["PHONE"];
else
示例13: GetProductStores
public static function GetProductStores($arParams)
{
$strUseStoreControl = COption::GetOptionString('catalog', 'default_use_store_control');
//without store control stores are used for information purposes only and manual deduction won't work
if ($strUseStoreControl == "N") {
return false;
}
$arResult = array();
$arStoreID = array();
if (intval($arParams["PRODUCT_ID"] < 0)) {
return false;
}
$arFilter = array("ACTIVE" => "Y", "SHIPPING_CENTER" => "Y");
if (isset($arParams["SITE_ID"]) && strlen($arParams["SITE_ID"]) > 0) {
$arFilter["+SITE_ID"] = $arParams["SITE_ID"];
}
$proxyStoresCountKey = md5(join('|', $arFilter));
if (!($arStoreID = static::getHitCache('CATALOG_STORE', $proxyStoresCountKey))) {
$dbStoreRes = CCatalogStore::GetList(array("SORT" => "DESC"), $arFilter, false, false, array("ID", "ACTIVE"));
while ($arStoreRes = $dbStoreRes->Fetch()) {
$arStoreID[] = $arStoreRes["ID"];
}
static::setHitCache('CATALOG_STORE', $proxyStoresCountKey, $arStoreID);
}
if (!($arResult = static::getHitCache('CATALOG_STORE_PRODUCT', $arParams["PRODUCT_ID"]))) {
$dbRes = CCatalogStoreProduct::GetList(array(), array("PRODUCT_ID" => $arParams["PRODUCT_ID"]), false, false, array("STORE_NAME", "STORE_ID", "AMOUNT", "PRODUCT_ID"));
while ($arRes = $dbRes->Fetch()) {
if (in_array($arRes["STORE_ID"], $arStoreID)) {
if (isset($arParams["ENUM_BY_ID"]) && $arParams["ENUM_BY_ID"] == true) {
$arResult[$arRes["STORE_ID"]] = $arRes;
} else {
$arResult[] = $arRes;
}
}
}
if (!empty($arResult) && is_array($arResult)) {
static::setHitCache('CATALOG_STORE_PRODUCT', $arParams["PRODUCT_ID"], $arResult);
}
}
return $arResult;
}
示例14: unserialize
$arReminder = unserialize($reminder);
$arSubscribeProd = array();
$subscribeProd = COption::GetOptionString("sale", "subscribe_prod", "");
if (strlen($subscribeProd) > 0) {
$arSubscribeProd = unserialize($subscribeProd);
}
$aTabs2 = array();
foreach ($siteList as $val) {
$aTabs2[] = array("DIV" => "reminder" . $val["ID"], "TAB" => "[" . $val["ID"] . "] " . $val["NAME"], "TITLE" => "[" . $val["ID"] . "] " . $val["NAME"]);
}
$tabControl2 = new CAdminViewTabControl("tabControl2", $aTabs2);
$tabControl2->Begin();
foreach ($siteList as $val) {
$arStores = array();
if (CModule::IncludeModule("catalog")) {
$dbStore = CCatalogStore::GetList(array("SORT" => "DESC", "ID" => "ASC"), array("ACTIVE" => "Y", "SHIPPING_CENTER" => "Y", "+SITE_ID" => $val["ID"]));
while ($arStore = $dbStore->GetNext()) {
$arStores[] = $arStore;
}
}
$tabControl2->BeginNextTab();
?>
<table cellspacing="5" cellpadding="0" border="0" width="100%" align="center">
<!-- default store -->
<?php
$deductStore = COption::GetOptionString("sale", "deduct_store_id", "", $val["ID"]);
$display = count($arStores) > 1 && $valDeductOnDelivery == "Y" ? "table-row" : "none";
?>
<tr class="default_deduct_store_control" style="display:<?php
echo $display;
示例15: ShowError
}
if (!\Bitrix\Main\Loader::includeModule("catalog")) {
ShowError(GetMessage("CATALOG_MODULE_NOT_INSTALL"));
return;
}
if (!isset($arParams["CACHE_TIME"])) {
$arParams["CACHE_TIME"] = 360;
}
$arResult["TITLE"] = GetMessage("SCS_DEFAULT_TITLE");
$arResult["MAP"] = $arParams["MAP_TYPE"];
if (!isset($arParams["PATH_TO_ELEMENT"])) {
$arParams["PATH_TO_ELEMENT"] = "store/#store_id#";
}
if ($this->StartResultCache()) {
$arSelect = array("ID", "TITLE", "ADDRESS", "DESCRIPTION", "GPS_N", "GPS_S", "IMAGE_ID", "PHONE", "SCHEDULE");
$dbStoreProps = CCatalogStore::GetList(array('TITLE' => 'ASC', 'ID' => 'ASC'), array("ACTIVE" => "Y"), false, false, $arSelect);
$arResult["PROFILES"] = array();
$viewMap = false;
while ($arProp = $dbStoreProps->GetNext()) {
$url = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_ELEMENT"], array("store_id" => $arProp["ID"]));
if ($arProp["TITLE"] == '' && $arProp["ADDRESS"] != '') {
$storeName = $arProp["ADDRESS"];
} elseif ($arProp["ADDRESS"] == '' && $arProp["TITLE"] != '') {
$storeName = $arProp["TITLE"];
} else {
$storeName = $arProp["TITLE"] . " (" . $arProp["ADDRESS"] . ")";
}
if ($arParams["PHONE"] == 'Y' && $arProp["PHONE"] != '') {
$storePhone = $arProp["PHONE"];
} else {
$storePhone = null;