当前位置: 首页>>代码示例>>PHP>>正文


PHP CCatalogProduct::IsExistProduct方法代码示例

本文整理汇总了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(),
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:iblock_list_admin.php

示例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']);
开发者ID:ASDAFF,项目名称:bitrix-modules-setprops,代码行数:31,代码来源:setprops.php

示例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));
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:30,代码来源:iblock_element_edit.php

示例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;
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:iblock_subelement_list.php


注:本文中的CCatalogProduct::IsExistProduct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。