Создал файл-обработчик. Количество в корзине обновляется, а цена нет. Почему - непонятно.
<?
require_once($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php");
if(CModule::IncludeModule('sale')){
$arBasketItems = array();
$dbBasketItems = CSaleBasket::GetList(
array(
"NAME" => "ASC",
"ID" => "ASC"
),
array(
"FUSER_ID" => CSaleBasket::GetBasketUserID(),
"LID" => SITE_ID,
"ORDER_ID" => "NULL",
"PRODUCT_ID" => $_POST['id']
),
false,
false,
array("ID", "PRODUCT_ID", "QUANTITY", "PRICE", "NAME")
);
while ($arItems = $dbBasketItems->Fetch()) {
$arBasketItems[] = $arItems;
}
}
$price = (int)$arBasketItems[0]['PRICE'];
$count = (int)$arBasketItems[0]['QUANTITY'];
if (CModule::IncludeModule("catalog"))
{
if($_POST['type']=='min'){
$arFields = array(
"QUANTITY" => $count-1,
"PRICE" => $price-1
);
}
if($_POST['type']=='plus'){
$arFields = array(
"QUANTITY" => $count + 1,
"PRICE" => $price+1
);
}
$ID = CSaleBasket::Update($arBasketItems[0]['ID'], $arFields);
}
?>