Smarty global variables in PrestaShop 1.5 and 1.4 templates
Come back
20

Smarty global variables in PrestaShop 1.5 and 1.4 templates

Perhaps there are people whose site on the old version of the prestashop has a store, to your acquaintance or as hints I display a list of variables that I work.

You may not have to switch to a new version (everything suits you), but stores still exist in versions such as prestashop 1.6,1.5,1.4. Therefore, I will give a list of variables for the smarty template.

Especially useful for developers (hint) or an ordinary user who wants to change something in the template

To use a variable in a template, you need to insert in the form: for value

{$page_name}

for object

{$cookie->id_customer}

for array

{$languages.1}

Valid variables for 1.4

link - Link class

cart - the class of the current cart Cart

currency - class of the current currency Сurrency

cookie - cookie class

page_name - page name (matches the name of the script, for example, index, product, best-sales, ...)

base_dir - Store base directory URL (http: //myshop.x/)

base_dir_ssl - Base directory URL using SSL if enabled, otherwise the same as base_dir (https: //myshop.x/)

content_dir - $protocol_content.Tools::getShopDomain().PS_BASE_URI

tpl_dir - theme directory (/themes/prestashop/),

modules_dir - module directory (/modules/)

mail_dir - _MAIL_DIR_

lang_iso - Language ISO code (ru)

come_from - query string (http://myshop.x/product.php?id_product=1)

cart_qties - the number of items in the cart,

currencies - an array of available currencies,

languages - an array of available languages,

priceDisplay - price display method (with tax, excluding tax),

add_prod_display - (int)Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY')

shop_name - name of shop

roundMode - режим округления

use_taxes - используется ли налог (true/false)

vat_management - (int)Configuration::get('VATNUMBER_MANAGEMENT')

opc - (bool)Configuration::get('PS_ORDER_PROCESS_TYPE')

PS_CATALOG_MODE - catalog mode (no checkout available)

img_ps_dir - store images directory (/ img /)

img_cat_dir - directory of pictures of store categories (/img/c/)

img_lang_dir - language pictures directory (/img/l/)

img_prod_dir - product images directory (/img/p/)

img_manu_dir - manufacturer pictures directory (/img/m/)

img_sup_dir - supplier pictures directory (/img/su/)

img_ship_dir - directory of pictures of delivery methods (/img/s/)

img_store_dir - store pictures directory (/img/st/)

img_col_dir - _THEME_COL_DIR_

img_dir - theme image directory (http://myshop.x/themes/prestashop/img/)

css_dir - theme styles directory (http://myshop.x/themes/prestashop/css/)

js_dir - theme scripts directory (http://myshop.x/themes/prestashop/js/)

pic_dir - _THEME_PROD_PIC_DIR_

created:
10.10.2020
updated:
15.11.2022
author:
admin
Tags
yandex metrika