How to find first and last index of foreach loop in smarty

When we do a coding with the Prestashop sometime we need to find whether first/last index of foreach loop. There are 2 ways to find first or last index of foreach loop in the smarty. I will show you some of example for that. {foreach from=$arrList key=myId item=i name=foo} {if $smarty.foreach.foo.first} This is the first[…]

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[…]