Автор Тема: Prestashop 1.7 глобальные переменные шаблона  (Прочитано 73 раз)

28 Ноябрь 2018, 12:32:05
  • Модератор
  • Ветеран
  • *****
  • Сообщений: 33164
  • Репутация: +26762/-0
    • Просмотр профиля
Валюта
{$currency.name}
{$currency.iso_code}
{$currency.sign}
{$currency.iso_code_num}

Контакты
{$shop.name}
{$shop.email}
{$shop.logo}
{$shop.favicon}
{$shop.address.address1}
{$shop.address.address2}
{$shop.address.postcode}
{$shop.address.city}
{$shop.address.state}
{$shop..address.country}
{$shop.phone}
{$shop.fax}

Язык
{$language.name}
{$language.iso_code}
{$language.language_code}
{$language.is_rtl}
{$language.format_lite}
{$ language.format_full}
{$language.id}

Клиент
{$customer.lastname}
{$customer.firstname}
{$customer.email}
{$customer.birthday}
{$customer.newsletter}
{$customer.newsletter_date_add}
{$customer.ip_registration_newsletter}
{$customer.optin}
{$customer.date_add}
{$customer.date_upd}
{$customer.id}
{$customer.id_default_group}
{$customer.is_logged }
{$customer.gender.name [$ customer.gender.id]}
{$customer.addresses [Address ID] .city}
{$customer.addresses [Address ID] .alias}
{$customer.addresses [Address ID] .firstname}
{$customer.addresses [Address ID] .lastname}
{$customer.addresses [Address ID] .company}
{$customer.addresses [Address ID] .address1}
{$customer.addresses [Address ID] .address2}
{$customer.addresses [Address ID] .postcode}
{$customer.addresses [Address ID] .id_state}
{$customer.addresses [Address ID] .state}
{$customer.addresses [Address ID] .state_iso}
{$customer.addresses [Address ID] .id_country}
{$customer.addresses [Address ID] .country}
{$customer.addresses [Address ID] .country_iso}
{$customer.addresses [Address ID] .phone}
{$customer.addresses [Address ID] .phone_mobile}
{$customer.addresses [ID Address] .dni}
{$customer.addresses [Address ID] .vat_number}
{$customer.addresses [Address ID] .formatted}

Ссылки
{$urls.base_url}
{$urls.current_url}
{$urls.shop_domain_url}
{$urls.img_ps_url}
{$urls.img_cat_url}
{$urls.img_lang_url}
{$urls.img_prod_url}
{$urls.img_manu_url}
{$urls.img_sup_url}
{$urls.img_ship_url}
{$urls.img_store_url}
{$urls.img_url}
{$urls.css_url}
{$urls.js_url}
{$urls.pic_url}
{$urls.pages.address}
{$urls.pages.addresses}
{$urls.pages.authentication}
{$urls.pages.cart}
{$urls.pages.category}
{$urls.pages.cms}
{$urls.pages.contact}
{$urls.pages.discount}
{$urls.pages.guest_tracking}
{$urls.pages.history}
{$urls.pages.identity}
{$urls.pages.index}
{$urls.pages.my_account}
{$urls.pages.order_confirmation}
{$urls.pages.order_follow}
{$urls.pages.order}
{$urls.pages.order_return}
{$urls.pages.order_slip}
{$urls.pages.pagenotfound}
{$urls.pages.password}
{$urls.pages.pdf_invoice}
{$urls.pages.pdf_order_return}
{$urls.pages.pdf_order_slip}
{$urls.pages.prices_drop}
{$urls.pages.product}
{$urls.pages.search}
{$urls.pages.sitemap}
{$urls.pages.stores}
{$urls.pages.supplier}
{$urls.pages.register}
{$urls.pages.order_login}
{$urls.theme_assets}
{$urls.actions.logout}
28 Ноябрь 2018, 12:37:16
Ответ #1
  • Модератор
  • Ветеран
  • *****
  • Сообщений: 21477
  • Репутация: +25289/-1
  • Prestashop - просто и эффективно
    • Просмотр профиля
https://devdocs.prestashop.com/
По выводу ссылок в файлах TPL, в Prestashop 1.7 новый стандарт для вывода ссылок с использованием переменной {url} (замена {$link} из Prestashop 1.6)
Цитировать
Prestashop 1.6 : {$link->getModuleLink()}
Prestashop 1.7 : {url entity='module' name='myModule' controller='myController' params = ['paramKey1' => $paramValue1, 'paramKey2' => $paramValue2]}
Example : {url entity='module' name='marketplace' controller='productupdate' params=['edited' => 1, 'id' => $id]}

Prestashop 1.6 : {$link->getPageLink()}
Prestashop 1.7 : { url entity='myPageName' params = ['paramKey1' => $paramValue1, 'paramKey2' => $paramValue2]}
Example : { url entity='my-account' params=['edited' => 1, 'id' => $id]}

Prestashop 1.6 : {$link->getCategoryLink()}
Prestashop 1.7 : {url entity='category' id=$id_category id_lang=$id_lang}
Example : {url entity='category' id=3 id_lang=2}

Prestashop 1.6 : {$link->getCmsLink()}
Prestashop 1.7 : {url entity='cms' id=$id_cms id_lang=$id_lang}
Example : {url entity='cms' id=3 id_lang=2}

Prestashop 1.6 : {$link->getCatImageLink()}
Prestashop 1.7 : {url entity='categoryImage' id=$id_category name='imageType'}
Example : {url entity='categoryImage' id=3 name='home-default'}
Эксперт Prestashop - решения всех проблем, написание модулей, создание тем для интернет-магазинов под Prestashop.
Эксперт Magento - создам сайт на Magento, программирование кастомных модулей для Magento, кастомизация тем Magento.
Лучшие цены!!!