if(CModule::IncludeModule("iblock") && CModule::IncludeModule("sale") && CModule::IncludeModule("catalog"))
{
if(Add2BasketByProductID($productID))
{
if($action == "BUY")
LocalRedirect($arParams["BASKET_URL"]);
else
LocalRedirect($APPLICATION->GetCurPageParam("", array($arParams["PRODUCT_ID_VARIABLE"], $arParams["ACTION_VARIABLE"])));
}
else
{
if($ex = $GLOBALS["APPLICATION"]->GetException())
$strError = $ex->GetString();
else
$strError = GetMessage("CATALOG_ERROR2BASKET").".";
}
}
|