Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/ajax/ |
Upload File : |
<? if(!defined('STATISTIC_SKIP_ACTIVITY_CHECK')){ define('STATISTIC_SKIP_ACTIVITY_CHECK', true); } require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'); \Bitrix\Main\Loader::includeModule('sale'); \Bitrix\Main\Loader::includeModule('aspro.next'); if($_POST['CLEAR_ALL'] === 'Y'){ Bitrix\Main\Page\Frame::getInstance()->startDynamicWithID('basket-allitems-block'); $type = 'BASKET'; if( isset($_POST['TYPE']) && $_POST['TYPE'] ){ switch($_POST["TYPE"]){ case 2: $type = 'DELAY'; break; case 3: $type = 'SUBSCRIBE'; break; case 4: $type = 'NOT_AVAILABLE'; break; default: break; } } $iblockID = isset($_POST['iblockID']) ? intval($_POST['iblockID']) : false; $arItems = CNext::getBasketItems($iblockID, 'ID'); //wbs24// if ($arItems instanceof Bitrix\Main\ORM\Data\Result) { $arItems = $arItems->fetchAll(); } //wbs24// if($_POST['TYPE'] === 'all' || $_POST['CLEAR_ALL'] === 'Y'){ foreach($arItems as $key => $arItem){ foreach($arItem as $id){ CSaleBasket::Delete($id); } } } else{ foreach($arItems[$type] as $id){ CSaleBasket::Delete($id); } } Bitrix\Main\Page\Frame::getInstance()->finishDynamicWithID('basket-allitems-block', ''); } elseif($_POST['delete_top_item'] === 'Y'){ CSaleBasket::Delete($_POST['delete_top_item_id']); } CNextCache::ClearCacheByTag('sale_basket'); CNext::clearBasketCounters();