Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / Help Needed With order.php

Help Needed With order.php

Started by traytray on 14 Feb 2013, 5:20 AM · Views: 2,227

Results 1 to 10 of 10
14 Feb 2013, 5:20 AM
#1
traytray avatar

traytray

Totally Zenned

Join Date:
May 2012
Posts:
566
Plugin Contributions:
0

Help Needed With order.php

Right now the code looks like this:

// include copyright
$email_order .= "\Please reply to this email if you have any questions. Thank you for your order.\nTeam Designer Perfume Snob\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n";

And the Order Confirmation looks like this:

Please reply to this email if you have any questions. Thank you for your order.
Team Designer Perfume Snob
Copyright (c) 2013 DesignerPerfumeSnob.com. Powered by Zen Cart

I'm looking for two changes:

I'd like a line of space above the words Team Designer Perfume Snob.

I'd like to remove the Copyright and the powered by Zen Cart from this email. I have this on the Footer and that is where I think it belongs. Not so much on an order confirmation email.

Thank you.

14 Feb 2013, 2:22 PM
#2
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Help Needed With order.php

I'd like a line of space above the words Team Designer Perfume Snob.
pretty sure you just need to ad an extra \n like this:

 // include copyright
    $email_order .= "\Please reply to this email if you have any questions. Thank you for your order.\n\nTeam Designer Perfume Snob\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n";

I'd like to remove the Copyright and the powered by Zen Cart from this email. I have this on the Footer and that is where I think it belongs. Not so much on an order confirmation email.
best way is to use developers tool kit to find the lanugae file it is located in an dele it from there. if there is not template override for that language file you should create one and modify that.

Phil Rogers
A problem shared is a problem solved.

14 Feb 2013, 7:14 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: Help Needed With order.php

"\n" is a line-break. So if you want double-spacing, use "\n\n"

If you don't want it to output the copyright, remove the . EMAIL_FOOTER_COPYRIGHT part from it.

Or, better yet, update the copyright text to say what you want it to say. But there's really nothing wrong with what it currently says.

.
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.

14 Feb 2013, 8:26 PM
#4
traytray avatar

traytray

Totally Zenned

Join Date:
May 2012
Posts:
566
Plugin Contributions:
0

Re: Help Needed With order.php

When I do a test order, I can't open Checkout. It says I have a programming error. I must have something wrong when I changed this code. Could you please advise? Thank you.

Original:

$email_order .= "\Please reply to this email if you have any questions. Thank you for your order.\nTeam Designer Perfume Snob\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n";

Changed to:

$email_order .= "\Please reply to this email if you have any questions. Thank you for your order. "\n\n"Team Designer Perfume Snob"\n";

14 Feb 2013, 8:34 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Help Needed With order.php

You've got mismatched quotes.

.
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.

14 Feb 2013, 8:41 PM
#6
traytray avatar

traytray

Totally Zenned

Join Date:
May 2012
Posts:
566
Plugin Contributions:
0

Re: Help Needed With order.php

Still doesn't help.

$email_order .= "\Please reply to this email if you have any questions. Thank you for your order. "\n\n"Team Designer Perfume Snob"n\n";

Could there be another reason Checkout wouldn't open?

14 Feb 2013, 8:47 PM
#7
traytray avatar

traytray

Totally Zenned

Join Date:
May 2012
Posts:
566
Plugin Contributions:
0

Re: Help Needed With order.php

Update* I put it back to the original to make sure this was causing the problem. Once the original was in place, Checkout opened fine. My code is creating the problem.

14 Feb 2013, 8:50 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Help Needed With order.php

philip937 gave you correct syntax earlier, but you keep changing it.

Use this:

    $email_order .= "Please reply to this email if you have any questions. Thank you for your order.\n\nTeam Designer Perfume Snob\n\n";  

You will find you create yourself fewer errors if you use a text editor which can do syntax-highlighting for PHP, such as Notepad++ http://notepad-plus.sf.net since it will show you instantly when you have your quotes mismatched, and more.

.
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.

14 Feb 2013, 8:58 PM
#9
traytray avatar

traytray

Totally Zenned

Join Date:
May 2012
Posts:
566
Plugin Contributions:
0

Re: Help Needed With order.php

Sorry! When you said:

"\n" is a line-break. So if you want double-spacing, use "\n\n"

I thought you were correcting the first reply I received. It's working fine now. Thank you.

14 Feb 2013, 10:02 PM
#10
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Help Needed With order.php

Phew, thought I'd led you up the garden path then!

Glad it's all working ok now :)

Phil Rogers
A problem shared is a problem solved.