Перейти к содержанию
Форум поддержки пользователей VamShop

Как вывести в шаблон телефон покупателя?


support

Рекомендуемые сообщения

Телефон по умолчанию в сессии не хранится, но можно в /login.php править:


$check_customer_query = vam_db_query("select customers_id, customers_vat_id, customers_firstname,customers_lastname, customers_gender, customers_password, customers_email_address, login_tries, login_time, customers_default_address_id from ".TABLE_CUSTOMERS." where customers_email_address = '".vam_db_input($email_address)."' and account_type = '0'");
[/code] на:
[code]
$check_customer_query = vam_db_query("select customers_id, customers_vat_id, customers_telephone, customers_firstname,customers_lastname, customers_gender, customers_password, customers_email_address, login_tries, login_time, customers_default_address_id from ".TABLE_CUSTOMERS." where customers_email_address = '".vam_db_input($email_address)."' and account_type = '0'");
и два раза в этом же файле менять:

$_SESSION['customer_first_name'] = $check_customer['customers_firstname'];
[/code] на:
[code]
$_SESSION['customer_first_name'] = $check_customer['customers_firstname'];
$_SESSION['customers_telephone'] = $check_customer['customers_telephone'];
и тогда после авторизации покупателя в любом html шаблоне можно будет выводить телфон через:

{$smarty.customers_telephone}
[/code]

Ссылка на сообщение
Поделиться на другие сайты
×
×
  • Создать...