Skip to content

Instantly share code, notes, and snippets.

@d1i1m1o1n
Created December 7, 2015 18:58
Show Gist options
  • Save d1i1m1o1n/ecb79d947ffdf414064d to your computer and use it in GitHub Desktop.
Save d1i1m1o1n/ecb79d947ffdf414064d to your computer and use it in GitHub Desktop.
Bitrix update quantity (count) in cart (basket) for ajax request
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
CModule::IncludeModule("sale");
if (IntVal($_POST["id"]) > 0) {
CSaleBasket::Update($_POST["id"], array("QUANTITY" => $_POST["count"]));
}
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment