本文整理汇总了PHP中CCatalogProduct::IsExistProduct方法的典型用法代码示例。如果您正苦于以下问题:PHP CCatalogProduct::IsExistProduct方法的具体用法?PHP CCatalogProduct::IsExistProduct怎么用?PHP CCatalogProduct::IsExistProduct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCatalogProduct
的用法示例。
在下文中一共展示了CCatalogProduct::IsExistProduct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($boolCatalogPrice && CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ID, "element_edit_price"))
{
$arCatalogProduct = array();
if (isset($arFields['CATALOG_WEIGHT']) && '' != $arFields['CATALOG_WEIGHT'])
$arCatalogProduct['WEIGHT'] = $arFields['CATALOG_WEIGHT'];
if (isset($arFields['CATALOG_VAT_INCLUDED']) && !empty($arFields['CATALOG_VAT_INCLUDED']))
$arCatalogProduct['VAT_INCLUDED'] = $arFields['CATALOG_VAT_INCLUDED'];
if (isset($arFields['CATALOG_QUANTITY_TRACE']) && !empty($arFields['CATALOG_QUANTITY_TRACE']))
$arCatalogProduct['QUANTITY_TRACE'] = $arFields['CATALOG_QUANTITY_TRACE'];
if ('Y' != $strUseStoreControl)
{
if (isset($arFields['CATALOG_QUANTITY']) && '' != $arFields['CATALOG_QUANTITY'])
$arCatalogProduct['QUANTITY'] = $arFields['CATALOG_QUANTITY'];
}
if (!CCatalogProduct::IsExistProduct($ID))
{
$arCatalogProduct['ID'] = $ID;
CCatalogProduct::Add($arCatalogProduct, false);
}
else
{
if (!empty($arCatalogProduct))
CCatalogProduct::Update($ID, $arCatalogProduct);
}
if (isset($arFields['CATALOG_MEASURE_RATIO']) && '' != trim($arFields['CATALOG_MEASURE_RATIO']))
{
$intRatioID = 0;
$rsRatios = CCatalogMeasureRatio::getList(
array(),
示例2: array
if (
$boolCatalogPrice && CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ID, "element_edit_price")
) {
$arCatalogProduct = array();
if (isset($arFields['CATALOG_WEIGHT']) && '' != $arFields['CATALOG_WEIGHT'])
$arCatalogProduct['WEIGHT'] = $arFields['CATALOG_WEIGHT'];
if (isset($arFields['CATALOG_VAT_INCLUDED']) && !empty($arFields['CATALOG_VAT_INCLUDED']))
$arCatalogProduct['VAT_INCLUDED'] = $arFields['CATALOG_VAT_INCLUDED'];
if (isset($arFields['CATALOG_QUANTITY_TRACE']) && !empty($arFields['CATALOG_QUANTITY_TRACE']))
$arCatalogProduct['QUANTITY_TRACE'] = $arFields['CATALOG_QUANTITY_TRACE'];
if ('Y' != $strUseStoreControl) {
if (isset($arFields['CATALOG_QUANTITY']) && '' != $arFields['CATALOG_QUANTITY'])
$arCatalogProduct['QUANTITY'] = $arFields['CATALOG_QUANTITY'];
}
$boolProductExists = ($boolMethodExist ? CCatalogProduct::IsExistProduct($ID) : CCatalogProduct::GetByID($ID)
);
if (!$boolProductExists) {
$arCatalogProduct['ID'] = $ID;
CCatalogProduct::Add($arCatalogProduct, false);
} else {
if (!empty($arCatalogProduct))
CCatalogProduct::Update($ID, $arCatalogProduct);
}
if (isset($arFields['CATALOG_MEASURE_RATIO']) && '' != trim($arFields['CATALOG_MEASURE_RATIO'])) {
$intRatioID = 0;
$rsRatios = CCatalogMeasureRatio::getList(
array(), array('PRODUCT_ID' => $ID), false, false, array('ID', 'PRODUCT_ID')
);
if ($arRatio = $rsRatios->Fetch()) {
$intRatioID = intval($arRatio['ID']);
示例3: array
if ('' == $strWarning && $bCatalog)
{
$arCatalogItem = array(
'IBLOCK_ID' => $IBLOCK_ID,
'SECTION_ID' => $MENU_SECTION_ID,
'ID' => $ID,
'PRODUCT_ID' => CIBlockElement::GetRealElement($ID)
);
if ($arShowTabs['catalog'])
{
include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/catalog/admin/templates/product_edit_action.php");
}
elseif ($arShowTabs['sku'])
{
if (!CCatalogProduct::IsExistProduct($arCatalogItem['PRODUCT_ID']))
{
$arEmptyProduct = array(
'ID' => $arCatalogItem['PRODUCT_ID'],
'QUANTITY' => 0,
'QUANTITY_TRACE' => 'N',
'CAN_BUY_ZERO' => 'N',
'NEGATIVE_AMOUNT_TRACE' => 'N',
'TYPE' => CCatalogProduct::TYPE_SKU
);
CCatalogProduct::Add($arEmptyProduct, false);
}
}
if ($arShowTabs['product_set'])
{
CCatalogAdminProductSetEdit::setProductFormParams(array('TYPE' => CCatalogProductSet::TYPE_SET));
示例4: array
{
$arCatalogProduct = array();
if (isset($arFields['CATALOG_WEIGHT']) && '' != $arFields['CATALOG_WEIGHT'])
$arCatalogProduct['WEIGHT'] = $arFields['CATALOG_WEIGHT'];
if (isset($arFields['CATALOG_VAT_INCLUDED']) && !empty($arFields['CATALOG_VAT_INCLUDED']))
$arCatalogProduct['VAT_INCLUDED'] = $arFields['CATALOG_VAT_INCLUDED'];
if (isset($arFields['CATALOG_QUANTITY_TRACE']) && !empty($arFields['CATALOG_QUANTITY_TRACE']))
$arCatalogProduct['QUANTITY_TRACE'] = $arFields['CATALOG_QUANTITY_TRACE'];
if ('Y' != $strUseStoreControl)
{
if (isset($arFields['CATALOG_QUANTITY']) && '' != $arFields['CATALOG_QUANTITY'])
$arCatalogProduct['QUANTITY'] = $arFields['CATALOG_QUANTITY'];
}
$boolProductExists = ($boolMethodExist
? CCatalogProduct::IsExistProduct($subID)
: CCatalogProduct::GetByID($subID)
);
if (!$boolProductExists)
{
$arCatalogProduct['ID'] = $subID;
CCatalogProduct::Add($arCatalogProduct, false);
}
else
{
if (!empty($arCatalogProduct))
CCatalogProduct::Update($subID, $arCatalogProduct);
}
if (isset($arFields['CATALOG_MEASURE_RATIO']) && '' != trim($arFields['CATALOG_MEASURE_RATIO']))
{
$intRatioID = 0;