Answer the question
In order to leave comments, you need to log in
The basket is not updated by the CSaleBasket::Update method on 1c bitrix?
Good afternoon!
The site was made on 1c bitrix and faced such a problem that when there is a product in the basket and its quantity is 1, I want to update the quantity of this product using the CSaleBasket::Update method, but nothing happens.
That is, I use:
$ids =83117; //id товара, которого надо изменить количество в корзине
$quns = 1; //количество, на которое надо изменить
$arFields = array(
"QUANTITY" => $quns
);
CSaleBasket::Update($ids, $arFields);
Answer the question
In order to leave comments, you need to log in
$ids =83117; //id товара, которого надо изменить количество в корзине
<?
// Изменим количество товара в записи $ID корзины на 2 штуки и отложим товар
$arFields = array(
"QUANTITY" => 2,
"DELAY" => "Y"
);
CSaleBasket::Update($ID, $arFields);
?>
I also do not update the quantity in the basket using the CSaleBasket:Update($arFields) method, but the updated one falls into the order. the NAME field is updated without problems, by the way, which is marked as mandatory in the doc.
look away script.js
postData['QUANTITY_' + items.rows[i].id] = BX('QUANTITY_' + items.rows[i].id).value;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question