Нужно получить {$town=$location.state}
{$location=fn_geo_maps_get_customer_stored_geolocation()}" PHP function ‘fn_geo_maps_get_customer_stored_geolocation’ not allowed by security setting
Нужно получить {$town=$location.state}
{$location=fn_geo_maps_get_customer_stored_geolocation()}" PHP function ‘fn_geo_maps_get_customer_stored_geolocation’ not allowed by security setting
Не правильно делаете. Если хотите получить локацию для шаблона получили его из сессии в контроллера. Глобальный массив $_SESSION и там будет geo_maps данные. Остается только передать эти данные на шаблон.
До обновления в Блоке вызывалось именно так
{$location=fn_geo_maps_get_customer_stored_geolocation()}
сейчас блок устарел
а скопировав в новый получил {$location=fn_geo_maps_get_customer_stored_geolocation()}" PHP function ‘fn_geo_maps_get_customer_stored_geolocation’ not allowed by security setting
Вопрос как переписать что-бы получить для сравнения код города и условия типа
{if $town!=‘RUS’}
{else}
{/if}
Как я понял вы хотите получить корректный код города и региона пользователя? Можете сделать так
function fn_get_state_code ($state_text, $lang_code = CART_LANGUAGE) {
$state_id = db_get_field('SELECT state_id FROM ?:state_descriptions WHERE state = ?s AND lang_code = ?s', $state_text, $lang_code);
if(!empty($state_id)) {
$state_code = db_get_field('SELECT code FROM ?:states WHERE state_id = ?i', $state_id);
return $state_code;
}
return '';
}
Город аналогично.