Forums / Templates, Stylesheets, Page Layout / How do I customize the order totals section of the order confirmation email?

How do I customize the order totals section of the order confirmation email?

Started by brannon125 on 23 Feb 2012, 10:07 PM · Views: 1,092

Results 1 to 5 of 5
23 Feb 2012, 10:07 PM
#1
brannon125 avatar

brannon125

New Zenner

Join Date:
Feb 2012
Location:
Solihull, UK
Posts:
9
Plugin Contributions:
0

How do I customize the order totals section of the order confirmation email?

Hi Guys

I need to customize the order totals section of the order confirmation email.

I currently have:

Sub-Total: £4.50
Zone Rates (Shipping to GB (1 x 50.00lb(s))): £1.50
EEC VAT 20%: £1.00
Total: £6.00

And I would like to see:

Sub-Total:£4.50
Delivery Charge: £1.50
Total: £6.00

(Includes VAT 20%: £1.00)

I've managed to change "Zone Rates" to "Delivery Charge" and I know I need to alter the includes/classes/order.php file somehow, but I'm struggling. Can anyone assist please?

23 Feb 2012, 11:04 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How do I customize the order totals section of the order confirmation email?

You can change most of the text through appropriate language files.

Changing the email can be done in includes/classes/order.php. Your going to be working about line 980 ish. But, changing the order that the order totals are displayed is going to be kind of interesting to be honest. You would have to remove one from the existing loop. Then below the existing loop add in the one that you have removed. If that makes no sense to you at all I'd say with this particular file it might be worth finding someone to do it for you...

Nick
iszent.com

24 Feb 2012, 12:09 AM
#3
brannon125 avatar

brannon125

New Zenner

Join Date:
Feb 2012
Location:
Solihull, UK
Posts:
9
Plugin Contributions:
0

Re: How do I customize the order totals section of the order confirmation email?

Thanks for the quick response Nick,

I changed the subtotals-order in the admin panel, the only undesirable bit I am left with now is (Shipping to GB (1 x 50.00lb(s))).

Any ideas where that comes from? If I know where it's defined I can remove it from the order.php file.

Also the crazy A symbols were appearing because one of my language.php files was using a different char set from the others.

24 Feb 2012, 12:14 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: How do I customize the order totals section of the order confirmation email?

Admin->Configuration->Shipping/Packaging->Display Number of Boxes and Weight Status> Display Shipping Weight and Number of Boxes?

0= off
1= Boxes Only
2= Weight Only
3= Both Boxes and Weight

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Feb 2012, 9:30 AM
#5
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How do I customize the order totals section of the order confirmation email?

Doesn't changing the order in admin also change the order in which the order totals are applied? So, if you want to apply them in one order (which the logic dictates) but display them in another order then you are going to have to do some work on the code. Is that not correct?

Nick
iszent.com