<?php
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
{
if (CModule::IncludeModule("sale") && CModule::IncludeModule("catalog")):
$id=$_GET['id'];
if(Add2BasketByProductID($id,1))
echo 'ok';
else
echo 'error';
endif;
}
else
{
header("Location:/index.php");
}
?>
|