Hi,
Let's consider the following. The attached picture is the following foreach loop:
{foreach from=$order_products item=product} <tr> <td class="custom-td">{$product.product_name}</td> <td class="custom-td-price"> {if $use_taxes} {displayPrice price=$product.total_price_tax_incl} {else} {displayPrice price=$product.total_price_tax_excl} {/if} </td> <td class="custom-td-qty">{$product.product_quantity}</td> </tr> {/foreach}
Which is taken from the following tutorial: http://nemops.com/prestashop-order-confirmation-resume/
I've been trying to make a sum of the total quantity of the cart in question to populate the variables of a javascript tracker, but I've got no idea on how to make that.
I've tried to call $cart_qties to get the whole total of the order, but it will show just 0.
I don't have much experience with smarty, but How can I achieve the thing that I need? It's a simple sum of the output of the foreach loop.
2+3+3+2