Page 1 of 1
How to list the products in the Order Update email
Posted: Fri Feb 06, 2026 11:24 pm
by ArtcoInc
When a customer places an order,
checkout_process.php generates an
Order Acknowledgement email, listing the products ordered.
When the administrator updates the order in
admin/orders.php, there is the option to send an
Order Update email to the customer. This email is rather plain, and I am trying to revise it.
I am trying to include the items purchased, like in the
Order Acknowledgement email. The list of items purchased is available in
admin/orders.php, as they are displayed onscreen. However, I have not found a way to include that list in the
Orders Update email.
I am trying this bit of code (which is similar to the code to display the products onscreen), but it is not working in the email
Code: Select all
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$email .= $order->products[$i]['name'] ;
}
Any ideas?
Thanks in advance!
Malcolm
Re: How to ist the products in the Order Update email
Posted: Sat Feb 07, 2026 11:34 am
by burt
The Order Update email logic in your version is in the top of admin/orders.php
At the point that this email is made, the order data is not actually available.
The few bits available (for that email) are;
customers_name, customers_email_address, orders_status, date_purchased
You should try;
1. include the order class, higher up in the same file, current location L169
2. instantiate an order object in the update_order action loop (see L197, but leave that where it is, just do simillar)
Re: How to list the products in the Order Update email
Posted: Sat Feb 07, 2026 4:40 pm
by ArtcoInc
@burt
Thank you.
1) I moved the call to the order class (old L169) to the top of the file (old L14)
2) I copied the instantiate (old L197) into the top of the update_order action loop (insert above old L32)
No joy
Malcolm
Re: How to list the products in the Order Update email
Posted: Sat Feb 07, 2026 10:31 pm
by ArtcoInc
*** Success ***
I just had to find the right place to move the instantiate to ...
Just after:
Code: Select all
if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
(below old L40).
Thank you again!
Re: How to list the products in the Order Update email
Posted: Sun Feb 08, 2026 4:23 pm
by ArtcoInc
Thank you, Gary! @burt
I'm now working on having the email content dependent on the order status (ie: different content when the status is changed to Shipped), and adding some HTML styling (a topic for another discussion).
This requires me to edit /admin/orders.php (at least, in v1.0.3.0), which is a "core file". You know me ... I don't have a problem with that. But, looking ahead ...
When I look at the latest version of Phoenix (1.1.0.6) ...
1) Where is the customer's "Order Update' email defined?
2) Is there a template, or override, system in place in admin, to allow for the override of the email style, without editing a "core file"?
TIA
Re: How to list the products in the Order Update email
Posted: Sun Feb 08, 2026 5:27 pm
by burt
1. In 1106 it's a module.
Your Admin > Modules > Notifications
Which means shopowner could turn the Core Module off and make their own, then install the one they made.
I think there are some Notification Modules floating about somewhere.
2. Or...instead of making a new Module, you could override the Core Modules TPL file (though I have not tried this)
/{whatever_template}/includes/modules/notifications/tpl_n_update_order.php
--
For reference, most (not all) things that are Modules have a TPL file.
TPL files can always be overridden in `whatever_template` the user has live.