Answer the question
In order to leave comments, you need to log in
How to bind a city session to a component in Bitrix?
There is a geolocation module with auto-detection of the city, there is a second component that takes information from the infoblock data with cities, how to insert it so that it substitutes the city session, and if the city is not found or this city does not exist, then substitute another:
Session with the city: $_SESSION["USER_GEO_POSITION"]["city"]
Component output from the infoblock:
CModule::IncludeModule('iblock');
$arSelect = Array(
"ID",
"IBLOCK_ID",
"NAME",
"DATE_ACTIVE_FROM",
"PROPERTY_*"
);
$arFilter = Array(
"IBLOCK_ID" => 9,
"ACTIVE" => "Y",
"NAME" => ""
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question