Answer the question
In order to leave comments, you need to log in
Bitrix product balance update?
We update the rest as follows:
$rsStoreProduct = \Bitrix\Catalog\StoreProductTable::getList(array(
'filter' => array('=PRODUCT_ID'=>$arFields["ID"],'STORE.ACTIVE'=>'Y'),
));
if($arStoreProduct=$rsStoreProduct->fetch()){
$updateStore = \Bitrix\Catalog\StoreProductTable::update($arStoreProduct['ID'], Array('PRODUCT_ID'=>intval($arFields["ID"]),'STORE_ID'=>1,'AMOUNT' => $arData["PRODUCT_QUANTITY"]));
}else{
$addStore = \Bitrix\Catalog\StoreProductTable::add(Array('PRODUCT_ID'=>intval($arFields["ID"]),'STORE_ID'=>1,'AMOUNT' => $arData["PRODUCT_QUANTITY"]));
}
$updateQuantity = \Bitrix\Catalog\ProductTable::update($arFields["ID"], Array('QUANTITY' => $arData["PRODUCT_QUANTITY"]));
Ошибка добавления товара в корзину
Товар отсутствует
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question