require_once($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php");
use Bitrix\Sale;
$dbRes = \Bitrix\Sale\Basket::getList(array(
'filter' => array(
'FUSER_ID' => Sale\Fuser::getId(),
'ORDER_ID' => null,
'LID' => SITE_ID,
'CAN_BUY' => 'Y',
),
'select' => array('PRODUCT_ID', 'NAME'),
));
$res = CIBlockElement::GetByID($item);
if($arRes = $res->Fetch())
while ($item = $dbRes->fetch())
{
if ($arRes['IBLOCK_SECTION_ID'] == '114') {
print_r ($item['NAME'].'</br>');
}
}
document.cookie = "show-modal-a=decline";
var modal = document.getElementById("mymodal");
var btn = document.getElementById("test");
if (document.URL.indexOf("/make/") != -1 ){
function getCookie(name) {
let matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : undefined;
}
if (getcookie("show-modal-a") != "accept") {
modal.style.display = "block";
}
btn.onclick = function() {
modal.style.display = "none";
document.cookie = "show-modal-a=accept";
}
}
if (getcookie("modal-show-a") == 0) {
modal.style.display = "block";
}