![]() |
Need Total Qty on Invoice page
I use x-cart for my t-shirt site but I don't use x-affiliate. I want to pay my affiliates $10 per shirt they sell for me. The affiliate software I use needs a total quantity on the invoice page to compute the commission. I need to multiply the TotalQty * 10 so that I can get a sum that I give my affiliates 100% of resulting in them getting $10 per item sold in the stats.
Does anyone know how to get a total qty on the invoice page (mail/html/order_data.tpl) ? I see {$product.amount} is displayed for each line to display the qty for each product ordered, but is there a way to total all the quantities together at the bottom along with the subtotal? Any help would be greatly appreciated! This is the desired effect I am trying to achieve. http://www.crazytees.com/zebra/qty.gif |
Anyone? Bueller?
|
Please don't double post, I have removed your other post and moved this topic to the template editing forum. Thank you.
|
if you search func.php for the fumction that gets the total weight you can use similar code to work out the total items
|
Here is what I did to display both the total individual sku's ordered and the total quantity of items ordered:
1) Add the following 2 labels to your system language table xcart_language: Code:
insert into xcart_languages (code,descr,name,value,topic) VALUES ('US','Total items ordered','lbl_total_items_ordered','Total items ordered','Labels') 2) Add the following items to the table xcart_config: Code:
insert into xcart_config (name,`comment`,value,category,orderby,`type`,defvalue) VALUES ('show_total_items_invoice','Show total item count on invoice','Y','Custom','10','checkbox','Y') These 2 options are added so you can control the display of the option we are adding below under a Custom option in the General settings option in the admin area. 3) Then change the following 3 files: Code:
- skin1/main/order_info.tpl In file skin1/main/order_info.tpl, change the following code, around line 19: Code:
{section name=prod_num loop=$products} to Code:
{assign var = "total_quantity" value = 0} then change the following code, around line 102: from: Code:
{section name=giftcert loop=$giftcerts} to: Code:
{section name=giftcert loop=$giftcerts} then change the following code, around line 155: from: Code:
<TR> to: Code:
<TR> >>>>>>>>>>>>>>>>>>>>>>>> In file skin1/mail/order_data.tpl, change the following code, around line 2: from: Code:
{$lng.lbl_products_ordered}: to: Code:
{assign var = "total_items" value = 0} then change the following code, around line 23: from: Code:
{/section} to: Code:
{/section} then change the following code, around line 39: from: Code:
{/section} to: Code:
{/section} >>>>>>>>>>>>>>>>>>>>>>>> In file skin1/mail/html/order_data.tpl, change the following code, around line 23: from: Code:
{foreach from=$products item=product} to: Code:
{assign var = "total_quantity" value = 0} then change the following code, around line 55: from: Code:
{foreach from=$giftcerts item=gc} to: Code:
{foreach from=$giftcerts item=gc} then change the following code, around line 54: from: Code:
{if $giftcerts ne ''} to: Code:
{if $giftcerts ne ''} >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hope this helps..... |
Thank you VERY much! That worked perfect!
|
All times are GMT -8. The time now is 10:02 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.