//------------------ STEP 1 ----------------------------------------------
if ($arResult["CurrentStep"] == 1)
{
$arResult["PERSON_TYPE_INFO"] = Array();
$dbPersonType = CSalePersonType::GetList(
array("SORT" => "ASC"),
array("LID" => SITE_ID)
);
$bFirst = True;
while ($arPersonType = $dbPersonType->GetNext())
{
if (IntVal($arResult["POST"]["PERSON_TYPE"]) == IntVal($arPersonType["ID"]) || IntVal($arResult["POST"]["PERSON_TYPE"]) <= 0 && $bFirst)
$arPersonType["CHECKED"] = "Y";
$arResult["PERSON_TYPE_INFO"][] = $arPersonType;
$bFirst = False;
}
if(CModule::IncludeModule("statistic"))
{
$event1 = "eStore";
$event2 = "Step4_1";
$event3 = "";
if (is_array($arProductsInBasket))
{
foreach($arProductsInBasket as $ar_prod)
{
$event3 .= $ar_prod["PRODUCT_ID"].", ";
}
}
$e = $event1."/".$event2."/".$event3;
if(!is_array($_SESSION["ORDER_EVENTS"]) || (is_array($_SESSION["ORDER_EVENTS"]) && !in_array($e, $_SESSION["ORDER_EVENTS"]))) // check for event in session
{
CStatistic::Set_Event($event1, $event2, $event3);
$_SESSION["ORDER_EVENTS"][] = $e;
}
}
} |