8 public static function isBarCodeValid(
$arParams)
13 if (intval(
$arParams[
"basketItemId"]) > 0)
16 array(
"ID" =>
"DESC"),
20 array(
"ID",
"PRODUCT_ID",
"PRODUCT_PROVIDER_CLASS",
"MODULE",
"BARCODE_MULTI")
28 "PRODUCT_PROVIDER_CLASS" =>
$arParams[
"productProvider"],
31 "BARCODE_MULTI" =>
$arParams[
"barcodeMult"]
35 if (!empty($arBasket) && is_array($arBasket))
40 $arCheckBarcodeFields =
array(
42 "PRODUCT_ID" => $arBasket[
"PRODUCT_ID"],
46 if ($arBasket[
"BARCODE_MULTI"] ==
"Y")
47 $arCheckBarcodeFields[
"STORE_ID"] =
$arParams[
"storeId"];
49 $res = $productProvider::CheckProductBarcode($arCheckBarcodeFields);
65 $sumQuantityOnStores =
array();
66 foreach ($arProducts as $id => $arProduct)
71 if (!empty($arProduct[
"STORES"]) && is_array($arProduct[
"STORES"]))
73 $sumQuantityOnStores[$id] = 0;
74 foreach ($arProduct[
"STORES"] as $arStore)
76 $sumQuantityOnStores[$id] += $arStore[
"QUANTITY"];
79 if ($sumQuantityOnStores[$id] != $arProduct[
"QUANTITY"])
81 $GLOBALS[
"APPLICATION"]->ThrowException(
GetMessage(
"NEWO_ERR_STORE_QUANTITY_NOT_EQUAL_TOTAL_QUANTITY",
array(
"#PRODUCT_NAME#" => $arProduct[
"NAME"])).
"<br>");
88 $GLOBALS[
"APPLICATION"]->ThrowException(
GetMessage(
"NEWO_ERR_STORE_WRONG_INFO",
array(
"#PRODUCT_NAME#" => $arProduct[
"NAME"])).
"<br>");
104 foreach ($arProducts as $arProduct)
106 if ($arProduct[
"BARCODE_MULTI"] ==
"Y" && is_array($arProduct[
"STORES"]) && !empty($arProduct[
"STORES"]))
108 foreach ($arProduct[
"STORES"] as $arStore)
111 isset($arStore[
"QUANTITY"])
113 intval($arStore[
"QUANTITY"]) > 0
116 !isset($arStore[
"BARCODE"])
118 count($arStore[
"BARCODE"]) != intval($arStore[
"QUANTITY"])
122 $GLOBALS[
"APPLICATION"]->ThrowException(
GetMessage(
"NEWO_ERR_STORE_NO_BARCODES",
array(
"#PRODUCT_NAME#" => $arProduct[
"NAME"],
"#STORE_ID#" => $arStore[
"STORE_ID"])).
"<br>");
127 if (
count($arStore[
"BARCODE"]) != $arStore[
"QUANTITY"])
129 $GLOBALS[
"APPLICATION"]->ThrowException(
GetMessage(
"NEWO_ERR_STORE_QUANTITY_BARCODE",
array(
"#PRODUCT_NAME#" => $arProduct[
"NAME"],
"#STORE_ID#" => $arStore[
"STORE_ID"])).
"<br>");
134 foreach ($arStore[
"BARCODE"] as $bValue)
138 $GLOBALS[
"APPLICATION"]->ThrowException(
GetMessage(
"NEWO_ERR_STORE_EMPTY_BARCODES",
array(
"#PRODUCT_NAME#" => $arProduct[
"NAME"],
"#STORE_ID#" => $arStore[
"STORE_ID"],
"#BARCODE#" => $arStore[
"BARCODE"][$j])).
"<br>");
144 if (!empty($arStore[
"BARCODE_FOUND"]))
146 foreach ($arStore[
"BARCODE_FOUND"] as $j => $bfValue)
150 $GLOBALS[
"APPLICATION"]->ThrowException(
GetMessage(
"NEWO_ERR_STORE_BARCODES",
array(
"#PRODUCT_NAME#" => $arProduct[
"NAME"],
"#STORE_ID#" => $arStore[
"STORE_ID"],
"#BARCODE#" => $arStore[
"BARCODE"][$j])).
"<br>");
158 else if ($arProduct[
"BARCODE_MULTI"] ==
"N" && is_array($arProduct[
"STORES"]) && !empty($arProduct[
"STORES"]))
161 foreach ($arProduct[
"STORES"] as $arRecord)
163 if (!isset($arRecord[
"STORE_ID"]) || intval($arRecord[
"STORE_ID"]) < 0 || (!isset($arRecord[
"AMOUNT"])) || intval($arRecord[
"AMOUNT"]) < 0)
165 $GLOBALS[
"APPLICATION"]->ThrowException(
GetMessage(
"NEWO_ERR_STORE_WRONG_INFO",
array(
"#PRODUCT_NAME#" => $arProduct[
"NAME"])).
"<br>");
static GetProductProvider($arBasketItem)
static isSetParent($arItem)
static GetList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
static checkQuantity($arProducts)
static checkBarcodes($arProducts)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
if(CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false)) $dbBasket
$GLOBALS['_____370096793']