Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Running total in custom invoice....

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-07-2003, 08:07 AM
 
stevebag stevebag is offline
 

Member
  
Join Date: Jul 2003
Posts: 23
 

Default Running total in custom invoice....

Editing my order_data.tpl file to create a custom invoice I am trying to get a running total using $products[prod_num].total, ie;

quantity---description----price each-----total
5-----------cd-roms--------бё1.00---------бё5.00
2-----------books----------бё0.50----------бё1.00

I can't get the total column in the invoice, ie;price each * quantity.

Anybody got any ideas?
Reply With Quote
  #2  
Old 07-16-2003, 12:51 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

at the end of each loop (before you display the total, put in :

{assign var="runningtotal" value=+$products[prod_num].total}

Then display $runningtotal

This might do it haven't tested it though.

For ideas on how this might work look at the bestsellers template.
__________________
ex x-cart guru
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:42 AM.

   

 
X-Cart forums © 2001-2020