Your IP : 3.147.43.164


Current Path : /home/bitrix/ext_www/dev.ballu.in.ua/ajax/
Upload File :
Current File : /home/bitrix/ext_www/dev.ballu.in.ua/ajax/add2basket.php

<? require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

CModule::IncludeModule("iblock");
CModule::IncludeModule("catalog");

$id = (int) (!empty($_REQUEST['id'])?$_REQUEST['id']:$_REQUEST['ID']);

$rewriteFields = [];
//$rewriteFields['PRODUCT_PROVIDER_CLASS'] = "CRMCatalogProductProvider";

Add2BasketByProductID(
	$id,
	1,
	$rewriteFields,
	[]
);

$arProd = CIBlockElement::GetList([],["ID" => $id],false,false,["ID","NAME","PROPERTY_PICTURE1_RU_NEW"])->Fetch();

?><div class="cart-modal-add2basket">
	<h2>Товар добавлен в корзину</h2>
	<p class="cart-modal-add2basket__img"><img src="<?=CFile::GetPath($arProd["PROPERTY_PICTURE1_RU_NEW_VALUE"])?>"></p>
	<p class="cart-modal-add2basket__name"><?=$arProd["NAME"]?></p>
	<p class="cart-modal-add2basket__basket"><a href="/personal/cart/">Перейти в корзину</a></p>
</div>