| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Show total quantity on order_data.tpl or the invoice | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Show total quantity on order_data.tpl or the invoice
Hi,
I'm needing to display the total number of items in an order on the invoice (or on order_data.tpl.) I've searched the forum but could only find a very old, very complicated way to do this and I was hoping there was going to be a better way. Does anyone know of one?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Show total quantity on order_data.tpl or the invoice
{$products|@count} will give you total unique items, if you need total including quantity for each item you have to do some math in the foreach loop in order_data.tpl with $product.amount
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Show total quantity on order_data.tpl or the invoice
Thanks for the quick reply! So far I've got it to manually add up the number of items in the order...but I can't get my head around factoring in the quantities of each:
{foreach from=$products item=product name=num} {$smarty.num.index} {math equation="value+1" value=$smarty.foreach.num.index} It outputs a list of 1 2 3 4 5 6 7 8 9 etc.
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Show total quantity on order_data.tpl or the invoice
Untested suggestion:
Code:
|
|||||||||
|
#5
|
|||||||||
|
|||||||||
Re: Show total quantity on order_data.tpl or the invoice
BRILL-LIANT. Worked absolutely perfectly. Thank you so much.
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|