Zen Cart Logo
Forums / Managing Customers and Orders / Different email templates per order status. Is it possible?

Different email templates per order status. Is it possible?

Views: 1,119

Results 1 to 3 of 3
17 Jul 2014, 12:37 AM
#1
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Different email templates per order status. Is it possible?

Sorry if this has already been covered. I did do a search but found nothing relevant.

I'm aware that zen cart uses the email_template_order_status.php file from the /email directory for status update emails in html but i would like to use a second template when the order status is changed from 3 to 4.

How does zen cart call the template in the first place? I globally searched the code for email_template_order_status and found nothing. I was expecting to find a require or include type command or some other code section that told it what template to use.

Adding in a separate template would be extremely easy if i can find where zen cart calls the correct template from, but it's got me beat so far.

Zen Cart developer since 2009 — Zen Cart Solutions
Ecommerce development, integrations & automation — Junction Solutions

17 Jul 2014, 3:31 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Different email templates per order status. Is it possible?

/admin/orders.php, line 154:

            zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, 
                        $message, STORE_NAME, EMAIL_FROM, $html_msg, [B]'order_status'[/B]);

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

17 Jul 2014, 10:06 AM
#3
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Different email templates per order status. Is it possible?

Thanks a lot DrByte. Just what i needed :)
All done and tested.

Zen Cart developer since 2009 — Zen Cart Solutions
Ecommerce development, integrations & automation — Junction Solutions