1.0.9.9 store running php 8.3.17
Recently migrated from osc 2.3.4.1 CE
When an order is placed, the order confirmation email is not listing the order comments. The comments are posting to the db and show in the order history. Looking at tpl_n_checkout.php, the code looks very similar to the code used in CE (a few changes, presumably to account for php updates)...but the comments were posting to the email in CE.
Relevant Phoenix code:
if (!empty($order->info['comments'])) {
echo htmlspecialchars($order->info['comments']) . "\n";
Previous OSC code:
if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
The only change I can see in the process is that previously the comments block was listed on every step of the checkout process with a text of the comments on the confirmation page, while the new way has the comment entry block only on the confirmation page.
I found this thread that seems to be pointing to the same issue, but there was no resolution.
viewtopic.php?f=10&t=848&p=6409&hilit=c ... ents#p6409
Thank you for any input.
Comments not posting to Order Confirmation email
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: Comments not posting to Order Confirmation email
Have not yet found an answer but have just tested on latest 1.1.0.0 and confirm this issue persists.
- burt
- Core Team
- Posts: 4551
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Comments not posting to Order Confirmation email
Probably something to do with the recent changes in this area when the input box was removed from most of the checkout pages. Override the file and use $_SESSION['comments'] ?
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: Comments not posting to Order Confirmation email
After a lot of testing, change that code to:otgrouch wrote: ↑Thu Mar 13, 2025 5:48 pmCode: Select all
if (!empty($order->info['comments'])) { echo htmlspecialchars($order->info['comments']) . "\n";
Code: Select all
echo htmlspecialchars($_POST['comments']) . "\n\n";Tested with no comments entered and with comments entered.
In both cases, the e-mail received by the customer works as expected.
You do not have the required permissions to view the files attached to this post.
Re: Comments not posting to Order Confirmation email
Hi,
My notes are not containing customer comments.
I can see the notes above
if (!empty($order->info['comments'])) {
echo htmlspecialchars($order->info['comments']) . "\n";
and change this to
echo htmlspecialchars($_POST['comments']) . "\n\n";
I am not a coding guy, and the website is working fine. However I will be asking my customers to tell me what size they want in the comments.
Hopefully the above works, but can someone tell me what table this is in please.
My notes are not containing customer comments.
I can see the notes above
if (!empty($order->info['comments'])) {
echo htmlspecialchars($order->info['comments']) . "\n";
and change this to
echo htmlspecialchars($_POST['comments']) . "\n\n";
I am not a coding guy, and the website is working fine. However I will be asking my customers to tell me what size they want in the comments.
Hopefully the above works, but can someone tell me what table this is in please.
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: Comments not posting to Order Confirmation email
The change was made in the file - tpl_n_checkout.php
Use your host control panel or use FTP to edit that file which can be found here - /includes/modules/notifications/templates/tpl_n_checkout.php
You will see the lines to be changed - https://github.com/CE-PhoenixCart/Phoen ... hp#L21-L23
Change that code as detailed in my previous post.