Prestashop – Useful Global Smarty Variables

I’d like to share some very useful global variables of the smarty for the Prestashop.

{$base_dir_ssl} URL of your store when SSL certificate is active
{$base_dir} URL of your store
{$cart_qties} Number of products in the cart
{$cart} Information about cart. Read entries below for more informations
{$cart->checkedTos} Bool value if terms of service is checked
{$cart->date_add} Date of cart creation
{$cart->date_upd} Date of cart update
{$cart->gift_message} Gift message
{$cart->gift} Bool value if gift checed for this cart
{$cart->id_address_delivery} ID of customer address delivery (only if order was made)
{$cart->id_address_invoice} ID of customer address invoice (only if order was made)
{$cart->id_carrier} Id of cart carrier (if selected)
{$cart->id_currency} ID of cart currency
{$cart->id_customer} ID of customer for which cart belongs (only if customer is logged)
{$cart->id_guest} ID of shop guest
{$cart->id_lang} ID of cart language
{$cart->id_shop_group} ID of shop group (multistore feature)
{$cart->id_shop} ID of shop (multistore feature)
{$cart->id} ID of customer cart
{$cart->mobile_theme} Bool value if cart was created on mobile device
{$cart->recycable} Bool value if recycable checked for this cart
{$come_from} URL for the visitor’s origin
{$cookie} User cookie
{$css_dir} URL for the directory with theme’s CSS
{$currencies} The various available currencies
{$currency} Currency object (currently used currency)
{$customerName} Client name (if logged in)
{$id_currency_cookie} ID of the current currency
{$img_cat_dir} URL for the directory with categories images
{$img_dir} URL for the directory with theme’s images
{$img_lang_dir} URL for the directory with languages images
{$img_manu_dir} URL for the directory with manufacturers images
{$img_prod_dir} URL for the directory with products images
{$img_ps_dir} URL for the directory with PrestaShop image
{$img_ship_dir} URL for the directory with carriers images
{$img_sup_dir} URL for the directory with suppliers images
{$js_dir} URL for the directory with theme’s JavaScript
{$lang_iso} ISO code for the current language
{$languages} The various available languages
{$logged} Indicates whether the visitor is logged to a customer account
{$mail_dir} URL for the directory with mail templates
{$modules_dir} URL for the directory with modules
{$page_name} Page name
{$pic_dir} URL for the directory with uploaded pictures
{$priceDisplay} Price display method (with or without taxes)
{$roundMode} Rounding method in use
{$shop_name} Shop name
{$tpl_dir} URL for the directory with current theme’s
{$use_taxes} Indicates whether taxes are enabled or not

Views (434)

Share on Facebook0Share on Google+0Share on LinkedIn0Tweet about this on TwitterEmail this to someonePrint this page
[Total: 2    Average: 5/5]

Leave a Reply

Your email address will not be published. Required fields are marked *

eighteen − 13 =