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 / Can I include delivery address in the email conf subject line? v1.3.8

Can I include delivery address in the email conf subject line? v1.3.8

Started by smm11 on 26 Aug 2011, 2:32 PM · Views: 1,177

Results 1 to 8 of 8
26 Aug 2011, 2:32 PM
#1
smm11 avatar

smm11

New Zenner

Join Date:
Aug 2011
Posts:
15
Plugin Contributions:
0

Can I include delivery address in the email conf subject line? v1.3.8

orders.php allows me to have "order confirmation" as email subject line to the shopowner, or I can change it to be "delivery address," but I'm asked to make the email subject line:

Order Confirmation No. XXX - CityNameHere

With both those variables, of course.

26 Aug 2011, 3:23 PM
#2
smm11 avatar

smm11

New Zenner

Join Date:
Aug 2011
Posts:
15
Plugin Contributions:
0

Re: Can I include delivery address in the email conf subject line? v1.3.8

The Zen-Cart version is:

Zen Cart 1.3.8a

Patch: 1::

Database Patch Level: 1.3.8

And running PHP 5.2.17.

I've tried variations of

define('EMAIL_TEXT_SUBJECT' , 'Order Confirmation') . $html_msg ['delivery_street_address'];

And while I get no error checking out, the emails do not reflect the Subject Line I think they should.

26 Aug 2011, 3:42 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: Can I include delivery address in the email conf subject line? v1.3.8

  1. You NEED TO UPGRADE A.S.A.P. Your old ZC version is obsolete and has several known serious security vulnerabilities.
  2. The file you need to edit to change the subject is /includes/classes/order.php, in the send_order_mail() section. Alter the zen_mail() call to suit your unique needs.
    BUT UPGRADE FIRST!!!!!!!!! I can't emphasize this enough.

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

26 Aug 2011, 5:01 PM
#4
smm11 avatar

smm11

New Zenner

Join Date:
Aug 2011
Posts:
15
Plugin Contributions:
0

Re: Can I include delivery address in the email conf subject line? v1.3.8

I understand your concern, and this is on the merchant's list. Now is not a good time for any downtime, however.

Meanwhile, I've edited order.php to be (starting at line 1006):

    zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $html_msg ['delivery_street_address'], $email_order, STORE_NAME, EMAIL_FROM, $html_msg, 'checkout', $this->attachArray);

And while I see no errors in the checkout process, confirmation emails are still coming in as "FW: [NEW ORDER] Order Confirmation No: XXXX," and no 'delivery street address' appended.

Any idea what else I'm missing?

Thank you.

26 Aug 2011, 5:09 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Can I include delivery address in the email conf subject line? v1.3.8

So, which emails is your client wanting to alter? The ones sent to the storeowner, or the ones sent to the customer?

And, does your client realize that if they get hacked because their site is insecure, that's going to FORCE immediate downtime!

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

26 Aug 2011, 5:17 PM
#6
smm11 avatar

smm11

New Zenner

Join Date:
Aug 2011
Posts:
15
Plugin Contributions:
0

Re: Can I include delivery address in the email conf subject line? v1.3.8

The ones sent to the storeowner.

26 Aug 2011, 5:23 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Can I include delivery address in the email conf subject line? v1.3.8

Then you're looking at the wrong zen_mail() call. The first one sends to the customer, and the second one sends to the storeowner.
Change this as shown:```
zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id[B] . '- ' . $this->delivery['city'][/B],
$email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);


AND UPGRADE A.S.A.P.  Seriously!

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

26 Aug 2011, 6:09 PM
#8
smm11 avatar

smm11

New Zenner

Join Date:
Aug 2011
Posts:
15
Plugin Contributions:
0

Re: Can I include delivery address in the email conf subject line? v1.3.8

Thank you, and the upgrade will be soon.