Global smarty template variables

Today i want to share a useful list of smarty global variables. All of this variables you can use in template files (both modules and theme). Enjoy!


{$base_dir_ssl} URL of your store when SSL certificate is active
{$base_dir} URL of your store

Information about cart. Read entries below for more informations


ID of customer cart


ID of shop group (multistore feature)


ID of shop (multistore feature)


ID of customer address delivery (only if order was made)


ID of customer address invoice (only if order was made)


ID of cart currency


ID of customer for which cart belongs (only if customer is logged)


ID of shop guest


ID of cart language


Bool value if recycable checked for this cart


Bool value if gift checed for this cart


Gift message


Bool value if cart was created on mobile device


Date of cart creation


Date of cart update


Id of cart carrier (if selected)


Bool value if terms of service is checked

{$img_cat_dir} URL for the directory with categories images
{$img_ps_dir} URL for the directory with PrestaShop image
{$img_lang_dir} URL for the directory with languages images
{$img_sup_dir} URL for the directory with suppliers images
{$img_ship_dir} URL for the directory with carriers images
{$img_prod_dir} URL for the directory with products images
{$img_manu_dir} URL for the directory with manufacturers images
{$img_dir} URL for the directory with theme’s images
{$css_dir} URL for the directory with theme’s CSS
{$modules_dir} URL for the directory with modules
{$mail_dir} URL for the directory with mail templates
{$js_dir} URL for the directory with theme’s JavaScript
{$tpl_dir} URL for the directory with current theme's
{$pic_dir} URL for the directory with uploaded pictures
{$lang_iso} ISO code for the current language
{$cart_qties} Number of products in the cart
{$come_from} URL for the visitor’s origin
{$shop_name} Shop name
{$currency} Currency object (currently used currency).
{$currencies} The various available currencies
{$id_currency_cookie} ID of the current currency
{$cookie} User cookie
{$languages} The various available languages
{$priceDisplay} Price display method (with or without taxes…)
{$roundMode} Rounding method in use
{$logged} Indicates whether the visitor is logged to a customer account
{$page_name} Page name
{$customerName} Client name (if logged in)
{$use_taxes} Indicates whether taxes are enabled or not
author milos myszczuk
Article by Milosz Myszczuk PrestaShop expert, official PrestaShop community moderator. PHP developer, specialist in relative and spatial databases management, GIS Analyst, CEO & founder of VEKIA interactive agency. Read more about VEKIA company
If you like my articles and want much more valuable tips, feel free to send me donation
1.4 version 1.4.11 1.6 404 addon admin advertise ahref ajax alpha animation api app application authentication back office backup badge banner basics block bootstrap button cache carrier cart catalog category certificate changelog chat class clear client clip cms code colors columns comments configuration contact container content controller cookie counter country coupon css csv currency customer dashboard database debug default delete delivery desktop developer device disable discount displayNav displayTop download dynamic editor effect empty encrypt engine error exchange exclude export facebook faceshop fade fancoupon fancybox fanpage fatal feature feed field file fix fixed font footer free friendly url front ftp full gallery generate gift global godaddy google google+ gray grid groupon header help hide highlight homefeatured homepage hook hosting hover howto htaccess html html5 ID image import include input instagram installation integration iPhone issue javascript jquery kgb knowhow languages law left likebox link list livingsocial loading log login logo loyality mail mailing maintenance manufacturer marketing marquee mcrypt menu meta mobile modification module movie moving multilanguage multiupload must have mysql news newsletter notification number open graph order override page password performance PHP phpmyadmin picture pinterest plugin popup post prestashop prestashop 1.0 prestashop 1.1 prestashop 1.2 prestashop 1.3 prestashop 1.4 prestashop 1.5 price rules problem product profile promotion proslider purifier quantity query quick tip random rates register reinsurance release reporting reset responsive restore results ribbon rich text right sales search security seo service shadow share shipping shop shopmania slider smarty social networks SQL SSL statistics stock store style subcategory superuser support switcher tab tablet tag tax template text theme tinyMCE tips and tricks tpl tracking translations tree trends trigger tumblr tutorial twitter update upgrade upload variables video visits voucher vulnerability web2print wide widget width window wishlist wysiwyg youtube zip zopim