//------------------ STEP 3 ----------------------------------------------
elseif ($CurrentStep == 3):
//------------------------------------------------------------------------
if(CModule::IncludeModule("statistic"))
{
$event1 = "eStore";
$event2 = "Step4_3";
foreach($arProductsInBasket as $ar_prod)
{
$event3 .= $ar_prod["PRODUCT_ID"].", ";
}
$e = $event1."/".$event2."/".$event3;
if(!in_array($e, $_SESSION["ORDER_EVENTS"])) // проверим не было ли такого события в сессии
{
CStatistic::Set_Event($event1, $event2, $event3);
$_SESSION["ORDER_EVENTS"][] = $e;
}
}
// создать список доставки
$dbDelivery = CSaleDelivery::GetList(
array("SORT"=>"ASC", "NAME"=>"ASC"),
array("LID" => SITE_ID,
"+<=WEIGHT_FROM" => $ORDER_WEIGHT,
"+>=WEIGHT_TO" => $ORDER_WEIGHT,
"+<=ORDER_PRICE_FROM" => $ORDER_PRICE,
"+>=ORDER_PRICE_TO" => $ORDER_PRICE,
"ACTIVE" => "Y",
"LOCATION" => $DELIVERY_LOCATION
)
);
$bFirst=True;
$sout='';
while($arDelivery = $dbDelivery->Fetch())
{
if(IntVal($DELIVERY_ID) == IntVal($arDelivery["ID"]) || IntVal($DELIVERY_ID) <= 0 && $bFirst)
{ $s_checked=' checked';}
else{ $s_checked='';}
$bFirst = False;
$sout.='<tr><td class="tablebody" valign="top" width="0%">
<input type="radio" class="inputradio" id="ID_DELIVERY_ID_'.$arDelivery["ID"].'" name="DELIVERY_ID"
value="'.$arDelivery["ID"].'"'.$s_checked.'>
</td>
<td class="tablebody" valign="top" width="100%">
<font class="tablebodytext"><label for="ID_DELIVERY_ID_'.$arDelivery["ID"].'"><b>'.$arDelivery["NAME"].'</b><br>';
if(IntVal($arDelivery["PERIOD_FROM"]) > 0 || IntVal($arDelivery["PERIOD_TO"]) > 0)
{
$sout.=GetMessage("SALE_DELIV_PERIOD");
if(IntVal($arDelivery["PERIOD_FROM"]) > 0) $sout.=" ".GetMessage("SALE_FROM")." ".IntVal($arDelivery["PERIOD_FROM"]);
if(IntVal($arDelivery["PERIOD_TO"]) > 0) $sout.=" ".GetMessage("SALE_TO")." ".IntVal($arDelivery["PERIOD_TO"]);
if($arDelivery["PERIOD_TYPE"] == "H") $sout.=" ".GetMessage("SALE_PER_HOUR")." ";
elseif($arDelivery["PERIOD_TYPE"]=="M") $sout.=" ".GetMessage("SALE_PER_MONTH")." ";
else $sout.=" ".GetMessage("SALE_PER_DAY")." ";
$sout.="<br>";
  |