Код |
---|
$.get( element.href + "&ajax_buy=1", $.proxy( function(data) { ... $("#cart_line").html(data); ... } ) ); |
Код |
---|
$strError = ""; if (array_key_exists($arParams["ACTION_VARIABLE"], $_REQUEST) && array_key_exists($arParams["PRODUCT_ID_VARIABLE"], $_REQUEST)) { ... if(($action == "ADD2BASKET" || $action == "BUY" && $productID > 0) { ... if(!$strError && Add2BasketByProductID($productID, $QUANTITY, $product_properties)) { if($action == "BUY") LocalRedirect($arParams["BASKET_URL"]); else LocalRedirect($APPLICATION->GetCurPageParam("", array($arParams["PRODUCT_ID_VARIABL } else { ... } } // Line } |
Код |
---|
if (array_key_exists($arParams["ACTION_VARIABLE"], $_REQUEST) && array_key_exists($arParams["PRODUCT_ID_VARIABLE"], $_REQUEST)) { ... // Line LocalRedirect($APPLICATION->GetCurPageParam("", array($arParams["PRODUCT_ID_VARIABLE"], $arParams["ACTION_VARIABLE"]))); } |
Код |
---|
function BasketLineAjaxResponse() { global $APPLICATION; $APPLICATION->RestartBuffer(); $APPLICATION->IncludeComponent("bitrix:sale.basket.basket.line", ".default", $GLOBALS['BASKET_RESPONSE_AJAX_PARAMS'], false, array('HIDE_ICONS' => 'Y')); die(); } AddEventHandler('main', 'OnBeforeLocalRedirect', 'BasketLineAjaxResponse'); |