prestashop smarty variables code example

Example 1: prestashop 1.7 smarty global variables

{$shop.name} Store name{$shop.email} Store Email{$shop.logo} Store logo{$shop.favicon} Store icon (map, title of the browser window, etc.){$shop.address.address1} Store address 1{$shop.address.address2} Store address 2{$shop.address.postcode} Store Zip Code{$shop.address.city} Store City{$shop.address.state} Store State (Province){$shop.address.country} Store Country{$shop.phone} Store Telephone{$shop.fax} Store Fax

Example 2: prestashop 1.7 smarty global variables

{$customer.lastname} Customer Last Name{$customer.firstname} Customer First Name{$customer.email} Customer Email (provided during the registration){$customer.birthday} Customer Birthday{$customer.newsletter} Subscribed to the newsletter (1 if subscribed, 0 if unsubscribed){$customer.newsletter_date_add} Newsletter subscription date{$customer.ip_registration_newsletter} IP of Customers at the newsletter registration{$customer.optin} Subscribed to offers from partners (1 if subscribed, 0 if unsubscribed){$customer.date_add} Customer registration{$customer.date_upd} Last updated (customer registration){$customer.id} Customer ID{$customer.id_default_group} ID group to which the client is associated{$customer.is_logged} Check if the client is "logged in" (1 yes, 0 no){$customer.gender.name[$customer.gender.id]} Client Gender (example: Ms, Mr, etc.){$customer.addresses[AddressID].city} Client City of address with an ID (AddressID, example 8, where 8 is the ID of the customer's address), because a client could have multiple addresses){$customer.addresses[AddressID].alias} Address alias{$customer.addresses[AddressID].firstname} Address Holder first name{$customer.addresses[AddressID].lastname} Address Holder last name{$customer.addresses[AddressID].company} Address Holder company{$customer.addresses[AddressID].address1} Address Holder address 1{$customer.addresses[AddressID].address2} Address Holder address 2{$customer.addresses[AddressID].postcode} Address Holder ZIP code{$customer.addresses[AddressID].id_state} Address Holder ID state{$customer.addresses[AddressID].state} Address Holder state name{$customer.addresses[AddressID].state_iso} Address Holder state ISO code{$customer.addresses[AddressID].id_country} Address Holder ID country{$customer.addresses[AddressID].country} Address Holder country name{$customer.addresses[AddressID].country_iso} Address Holder ISO country{$customer.addresses[AddressID].phone} Address Holder telephone{$customer.addresses[AddressID].phone_mobile} Address Holder mobile phone{$customer.addresses[AddressID].dni} Address Holder DNI{$customer.addresses[AddressID].vat_number} Address Holder VAT number{$customer.addresses[AddressID].formatted} Address Holder formatted address

Example 3: prestashop 1.7 smarty global variables

{$cart.totals.total.amount}The total amount of the cart without currency (ex: 45,00){$cart.totals.total.value} The total amount of the cart with currency (ex: 45,00){$cart.totals.total_including_tax.amount} The total amount of the cart, including taxes, without currency (ex: 45,00){$cart.totals.total_including_tax.value} The total amount of the cart, including taxes, with currency (ex: 45,00){$cart.totals.total_excluding_tax.amount} The total amount of the cart, excluding taxes, without currency (esempio: 35,70){$cart.totals.total_excluding_tax.value} The total amount of the cart, excluding taxes, with currency (esempio: 35,70){$cart.products_count} Number of products in the cart{$cart.subtotals.products.amount} The amount of products in the cart without currency{$cart.subtotals.products.value} The amount of products in the cart withcurrency{$cart.subtotals.shipping.amount} The amount of shipping in the cart without currency{$cart.subtotals.shipping.value} The amount of shipping in the cart with currency

Example 4: prestashop 1.7 smarty global variables

{$language.name} Name of the language in use (example: English) {$language.iso_code} ISO code of the language in use (it for Italian, fr for French, etc.){$language.language_code} Code of the language in use (it for Italian, en-us for American English, etc.){$language.is_rtl} (1 when language is written from right to left; 0 if from left to right)  {$language.id} ID value of the language in use

Example 5: prestashop 1.7 smarty global variables

{$currency.name} Name of the currency in use (Euro, American Dollar, etc.){$currency.iso_code} Currency ISO code of the currency in use (Eur, USD, etc.){$currency.sign} Symbol of the currency in use (, $, etc.) {$currency.iso_code_num} ISO code number of the currency in use (978 for Euro, 840 for American Dollar, etc.)

Tags:

Php Example