add_in_cart.php 528 Bytes
<? require_once ($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/include.php");?>
<?
if (CModule::IncludeModule("sale") && CModule::IncludeModule("catalog"))
{
  if (isset($_POST['PRODUCT_ID'])) {
    $PRODUCT_ID = intval($_POST['PRODUCT_ID']);
    $QUANTITY = 1;
    Add2BasketByProductID(
      $PRODUCT_ID,
      $QUANTITY,
      false
    );
	
	echo " Вывод данных: ".$_POST['PRODUCT_ID'];
  }
  else {
    echo "Нет параметров ";
  }
}
else {
  echo "Не подключены модули";
}  	
?>