本文整理汇总了PHP中CCatalogStore类的典型用法代码示例。如果您正苦于以下问题:PHP CCatalogStore类的具体用法?PHP CCatalogStore怎么用?PHP CCatalogStore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CCatalogStore类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:AlexPrya,项目名称:iShop,代码行数:30,代码来源:1c_mutator.php
示例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;
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:36,代码来源:store.php
示例3: loadFromDatabase
/**
* Loads values from database.
* Returns true on success.
*
* @return boolean
*/
protected function loadFromDatabase()
{
if (!isset($this->fields) && $this->id > 0) {
$storeList = \CCatalogStore::getList(array(), array("ID" => $this->id), false, false, array("ID", "TITLE"));
$this->fields = $storeList->fetch();
}
return is_array($this->fields);
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:14,代码来源:catalogstore.php
示例4: load
protected function load()
{
$storeList = \CCatalogStore::getList(array(), array("ACTIVE" => "Y"), false, false, array("ID", "TITLE", "ACTIVE"));
$result = array();
while ($ar = $storeList->fetch()) {
$result[] = $ar["TITLE"];
}
return $result;
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:9,代码来源:elementcatalog.php
示例5: 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;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:51,代码来源:store.php
示例6: 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;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:20,代码来源:store.php
示例7: 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;
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:39,代码来源:store.php
示例8: 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;
}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:44,代码来源:store.php
示例9: 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;
}
开发者ID:rasuldev,项目名称:torino,代码行数:22,代码来源:comp_parameters.php
示例10: 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;
}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:28,代码来源:store_utility.php
示例11: GetMessage
}
endif;
$tabControl->EndCustomField("ORDER_DELIVERY", '');
$tabControl->BeginCustomField("STORE_DELIVERY", GetMessage("SOD_STORE_SEND"));
if (intval($arOrder["STORE_ID"]) > 0):
?>
<tr>
<td width="40%"><?echo $tabControl->GetCustomLabelHTML()?>:</td>
<td>
<?
$dbList = CCatalogStore::GetList(
array("SORT" => "DESC", "ID" => "DESC"),
array("ACTIVE" => "Y", "ID" => $arOrder["STORE_ID"]),
false,
false,
array("ID", "TITLE", "ADDRESS", "DESCRIPTION", "IMAGE_ID", "PHONE", "SCHEDULE", "LOCATION_ID", "GPS_N", "GPS_S")
);
if ($arList = $dbList->Fetch()):
?>
<div><?php
echo htmlspecialcharsbx($arList["TITLE"]);
?>
</div>
<?else:?>
<div<?php
echo GetMessage('SOD_STORE_SEND_NULL');
?>
></div>
<?endif;?>
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:order_detail.php
示例12: ImportStoresAmount
function ImportStoresAmount($arElement, $elementID, &$counter)
{
$arFields = array();
$arFields['PRODUCT_ID'] = $elementID;
static $arStoreResult = false;
if ($arStoreResult === false) {
$arStoreResult = array();
$resStore = CCatalogStore::GetList(array(), array(), false, false, array("ID", "XML_ID"));
while ($arStore = $resStore->Fetch()) {
$arStoreResult[$arStore["XML_ID"]] = $arStore["ID"];
}
}
foreach ($arElement as $xmlID => $amount) {
if (isset($arStoreResult[$xmlID])) {
$arFields['STORE_ID'] = $arStoreResult[$xmlID];
$arFields['AMOUNT'] = $amount;
$res = CCatalogStoreProduct::UpdateFromForm($arFields);
if (!$res) {
$counter["ERR"]++;
}
}
}
return true;
}
开发者ID:nycmic,项目名称:bittest,代码行数:24,代码来源:cml2.php
示例13: 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";
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:31,代码来源:component.php
示例14: GetInheritedPropertyTemplateElementMenuItems
//.........这里部分代码省略.........
"TEXT" => GetMessage("IB_COMPLIB_POPUP_SKU_PRICE"),
"MENU" => array(),
);
$rsPrice = CCatalogGroup::GetListEx(array("SORT"=>"ASC"), array(), false, false, array("ID", "NAME"));
while ($price = $rsPrice->Fetch())
{
if (preg_match("/^[a-zA-Z0-9]+\$/", $price["NAME"]))
{
$result["sku_price"]["MENU"][] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_MIN_PRICE")." ".$price["NAME"],
"ONCLICK" => "$action_function('{=min this.catalog.sku.price.".$price["NAME"]."}', '$menuID', '$inputID')",
);
$result["sku_price"]["MENU"][] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_MAX_PRICE")." ".$price["NAME"],
"ONCLICK" => "$action_function('{=max this.catalog.sku.price.".$price["NAME"]."}', '$menuID', '$inputID')",
);
}
else
{
$result["sku_price"]["MENU"][] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_MIN_PRICE")." ".$price["NAME"],
"ONCLICK" => "$action_function('{=min this.catalog.sku.price.".$price["ID"]."}', '$menuID', '$inputID')",
);
$result["sku_price"]["MENU"][] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_MAX_PRICE")." ".$price["NAME"],
"ONCLICK" => "$action_function('{=max this.catalog.sku.price.".$price["ID"]."}', '$menuID', '$inputID')",
);
}
}
}
$result["catalog"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_CATALOG"),
"MENU" => array(
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_CATALOG_WEIGHT"),
"ONCLICK" => "$action_function('{=this.catalog.weight}', '$menuID', '$inputID')",
),
array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_CATALOG_MEASURE"),
"ONCLICK" => "$action_function('{=this.catalog.measure}', '$menuID', '$inputID')",
),
),
);
$result["price"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_PRICE"),
"MENU" => array(),
);
$rsPrice = CCatalogGroup::GetListEx(array("SORT"=>"ASC"), array(), false, false, array("ID", "NAME"));
while ($price = $rsPrice->Fetch())
{
if (preg_match("/^[a-zA-Z0-9]+\$/", $price["NAME"]))
$result["price"]["MENU"][] = array(
"TEXT" => $price["NAME"],
"ONCLICK" => "$action_function('{=this.catalog.price.".$price["NAME"]."}', '$menuID', '$inputID')",
);
else
$result["price"]["MENU"][] = array(
"TEXT" => $price["NAME"],
"ONCLICK" => "$action_function('{=this.catalog.price.".$price["ID"]."}', '$menuID', '$inputID')",
);
}
$result["store"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_STORE"),
"MENU" => array(),
);
$rsStore = CCatalogStore::GetList();
while ($store = $rsStore->Fetch())
{
$result["store"]["MENU"][] = array(
"TEXT" => $store["TITLE"],
"ONCLICK" => "$action_function('{=catalog.store.".$store["ID"].".name}', '$menuID', '$inputID')",
);
}
}
$result["misc"] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_MISC"),
"MENU" => array(),
);
$result["misc"]["MENU"][] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_SECTIONS_PATH"),
"ONCLICK" => "$action_function('{=concat this.sections.name \" / \"}', '$menuID', '$inputID')",
);
if (\Freetrix\Main\Loader::includeModule('catalog'))
{
$result["misc"]["MENU"][] = array(
"TEXT" => GetMessage("IB_COMPLIB_POPUP_STORE_LIST"),
"ONCLICK" => "$action_function('{=concat catalog.store \", \"}', '$menuID', '$inputID')",
);
}
$r = array();
foreach($result as $category)
{
if (!empty($category) && !empty($category["MENU"]))
{
$r[] = $category;
}
}
return $r;
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:101,代码来源:comp_parameters.php
示例15: 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;
}
}
}
}
}
}
}
}
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:product_edit_action.php
示例16: 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
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:component.php
示例17: 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;
}
}
$arStore = array();
$dbList = CCatalogStore::GetList(
array("ID" => "DESC"),
array("ACTIVE" => "Y", "ID" => $arStoreId),
false,
false,
array("ID", "TITLE", "ADDRESS", "DESCRIPTION", "IMAGE_ID", "PHONE", "SCHEDULE", "GPS_N", "GPS_S")
);
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"] = "";
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:component.php
示例18: array
} else {
$lAdmin->AddGroupError(GetMessage("ERROR_DELETING_TYPE"), $ID);
}
}
$DB->Commit();
break;
}
}
}
$arSelect = array("ID", "ACTIVE", "TITLE", "ADDRESS", "DESCRIPTION", "GPS_N", "GPS_S", "IMAGE_ID", "PHONE", "SCHEDULE", "XML_ID", "DATE_MODIFY", "DATE_CREATE", "USER_ID", "MODIFIED_BY");
if (array_key_exists("mode", $_REQUEST) && $_REQUEST["mode"] == "excel") {
$arNavParams = false;
} else {
$arNavParams = array("nPageSize" => CAdminResult::GetNavSize($sTableID));
}
$dbResultList = CCatalogStore::GetList(array($_REQUEST["by"] => $_REQUEST["order"]), array(), false, $arNavParams, $arSelect);
$dbResultList = new CAdminResult($dbResultList, $sTableID);
$dbResultList->NavStart();
$lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("group_admin_nav")));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "TITLE", "content" => GetMessage("TITLE"), "sort" => "TITLE", "default" => true), array("id" => "ACTIVE", "content" => GetMessage("STORE_ACTIVE"), "sort" => "ACTIVE_FLAG", "default" => true), array("id" => "ADDRESS", "content" => GetMessage("ADDRESS"), "sort" => "ADDRESS", "default" => true), array("id" => "IMAGE_ID", "content" => GetMessage("STORE_IMAGE"), "sort" => "IMAGE_ID", "default" => false), array("id" => "DESCRIPTION", "content" => GetMessage("DESCRIPTION"), "sort" => "DESCRIPTION", "default" => true), array("id" => "GPS_N", "content" => GetMessage("GPS_N"), "sort" => "GPS_N", "default" => false), array("id" => "GPS_S", "content" => GetMessage("GPS_S"), "sort" => "GPS_S", "default" => false), array("id" => "PHONE", "content" => GetMessage("PHONE"), "sort" => "PHONE", "default" => true), array("id" => "SCHEDULE", "content" => GetMessage("SCHEDULE"), "sort" => "SCHEDULE", "default" => true), array("id" => "DATE_MODIFY", "content" => GetMessage("DATE_MODIFY"), "sort" => "DATE_MODIFY", "default" => true), array("id" => "MODIFIED_BY", "content" => GetMessage("MODIFIED_BY"), "sort" => "MODIFIED_BY", "default" => true), array("id" => "DATE_CREATE", "content" => GetMessage("DATE_CREATE"), "sort" => "DATE_CREATE", "default" => false), array("id" => "USER_ID", "content" => GetMessage("USER_ID"), "sort" => "USER_ID", "default" => false)));
$arSelectFields = $lAdmin->GetVisibleHeaderColumns();
if (!in_array('ID', $arSelectFields)) {
$arSelectFields[] = 'ID';
}
$arSelectFieldsMap = array_fill_keys($arSelectFields, true);
$arUserList = array();
$arUserID = array();
$strNameFormat = CSite::GetNameFormat(true);
$arRows = array();
while ($arSTORE = $dbResultList->Fetch()) {
$arSTORE['ID'] = intval($arSTORE['ID']);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:cat_store_list.php
示例19: 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;
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:options.php
示例20: array_merge
$arResult["IS_SKU"] = false;
} else {
if (in_array('COORDINATES', $arParams['FIELDS'])) {
$arParams['FIELDS'] = array_merge($arParams['FIELDS'], array('GPS_N', 'GPS_S'));
}
$select = array_merge(array("ID", "ACTIVE", "PRODUCT_AMOUNT", "TITLE", "TYPE"), $arParams["FIELDS"], $arParams["USER_FIELDS"]);
foreach ($select as $key => $value) {
if (empty($value) || $value == 'COORDINATES') {
unset($select[$key]);
}
}
$filter = array("ACTIVE" => "Y", "PRODUCT_ID" => $arParams["ELEMENT_ID"], "+SITE_ID" => $siteId, "ISSUING_CENTER" => 'Y');
if (!empty($arParams["STORES"])) {
$filter["ID"] = $arParams["STORES"];
}
$rsProps = CCatalogStore::GetList(array('TITLE' => 'ASC', 'ID' => 'ASC'), $filter, false, false, $select);
while ($prop = $rsProps->GetNext()) {
$amount = is_null($prop["PRODUCT_AMOUNT"]) ? 0 : $prop["PRODUCT_AMOUNT"];
if ($arParams["SHOW_GENERAL_STORE_INFORMATION"] == "Y") {
$quantity += $amount;
continue;
}
$storeURL = CComponentEngine::MakePathFromTemplate($arParams["STORE_PATH"], array("store_id" => $prop["ID"]));
if ($prop["TITLE"] == '' && $prop["ADDRESS"] != '') {
$storeName = $prop["ADDRESS"];
} elseif ($prop["ADDRESS"] == '' && $prop["TITLE"] != '') {
$storeName = $prop["TITLE"];
} else {
$storeName = $prop["TITLE"] . " (" . $prop["ADDRESS"] . ")";
}
if (isset($prop["PHONE"]) && $prop["PHONE"] != '') {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php
注:本文中的CCatalogStore类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论