Page 1 of 2
Order Notification Email
Posted: Tue Jul 05, 2022 11:29 am
by radhavallabh
Hi dear;
In the email received after placing an order the Detailed Invoice shows a %s instead of a value before the url-
As below...
------------------------------------------------------
Order Number: 5
Detailed Invoice: %s
https://xx.com/account_history_info.php?order_id=5
Date Ordered: Tuesday 05 July, 2022
Please can you help fix the issue;
Thank you in advance;
Very Warm Regds./
radhavallabh
Re: Order Notification Email
Posted: Tue Jul 05, 2022 1:37 pm
by ecartz
Re: Order Notification Email
Posted: Wed Jul 06, 2022 3:37 am
by radhavallabh
Dear the %s is appearing after the language constant Detailed Invoice: as below-
Detailed Invoice: %s (after this %s the URL is there)
Re: Order Notification Email
Posted: Wed Jul 06, 2022 4:23 am
by ecartz
If it's not coming from the language constant (see previous link and then find your corresponding file) and it's not coming from the template (see
https://github.com/CE-PhoenixCart/Phoen ... eckout.php ) then the only thing left is the link. What about your links is different from the standard link?
Re: Order Notification Email
Posted: Wed Jul 06, 2022 5:03 am
by radhavallabh
ecartz wrote: ↑Wed Jul 06, 2022 4:23 am
If it's not coming from the language constant (see previous link and then find your corresponding file) and it's not coming from the template (see
https://github.com/CE-PhoenixCart/Phoen ... eckout.php ) then the only thing left is the link. What about your links is different from the standard link?
No dear it is the same as original... I made no changes to it...
Re: Order Notification Email
Posted: Wed Jul 06, 2022 5:10 am
by radhavallabh
radhavallabh wrote: ↑Wed Jul 06, 2022 5:03 am
ecartz wrote: ↑Wed Jul 06, 2022 4:23 am
If it's not coming from the language constant (see previous link and then find your corresponding file) and it's not coming from the template (see
https://github.com/CE-PhoenixCart/Phoen ... eckout.php ) then the only thing left is the link. What about your links is different from the standard link?
No dear it is the same as original... I made no changes to it...
This is in my tpl file.
Code: Select all
echo STORE_NAME . "\n"
. MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n"
. MODULE_NOTIFICATIONS_CHECKOUT_TEXT_ORDER_NUMBER . ' ' . $order->get_id() . "\n"
. MODULE_NOTIFICATIONS_CHECKOUT_TEXT_INVOICE_URL . ' '
. $GLOBALS['Linker']->build('account_history_info.php', ['order_id' => $order->get_id()], false) . "\n"
. MODULE_NOTIFICATIONS_CHECKOUT_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
This is what is received in notification email
Code: Select all
------------------------------------------------------
Order Number: 5
Detailed Invoice: %s https://xx.com/account_history_info.php?order_id=5
Date Ordered: Tuesday 05 July, 2022
Re: Order Notification Email
Posted: Wed Jul 06, 2022 6:00 am
by ecartz
Well, something is different between your store and the demo, because the email from the demo sends
No %s
Your template file is correct. So one of three things must be true:
1. There is a %s in your language constant.
2. There is a %s in HTTP_SERVER in your includes/configure.php file.
3. There is something different about how you are building the link. E.g. a URL rewriter
You can check the language constant by editing it and verifying that the change appears. If it doesn't, you are using a different language file. Either one under override somewhere or a different language or something.
Re: Order Notification Email
Posted: Thu Jul 07, 2022 6:42 am
by radhavallabh
ecartz wrote: ↑Wed Jul 06, 2022 6:00 am
Well, something is different between your store and the demo, because the email from the demo sends
No %s
Your template file is correct. So one of three things must be true:
1. There is a %s in your language constant.
2. There is a %s in HTTP_SERVER in your includes/configure.php file.
3. There is something different about how you are building the link. E.g. a URL rewriter
You can check the language constant by editing it and verifying that the change appears. If it doesn't, you are using a different language file. Either one under override somewhere or a different language or something.
Hi dear;
I found the %s it is in n_update_order.php, It seems the email was from the Order Update i sent while testing.
const MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_ORDER_NUMBER = 'Order Number: %d';
const MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_INVOICE_URL = 'Detailed Invoice: %s';
const MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_DATE_ORDERED = 'Date Ordered: %s';
It is this %s that is showing before the URL dear...
Please can you help fix the issue;
Thank you inadvance;
Very Warm Regds./
radhavallabh
Re: Order Notification Email
Posted: Thu Jul 07, 2022 7:13 am
by ecartz
tpl_n_update_order.php has
Code: Select all
echo STORE_NAME, "\n", MODULE_NOTIFICATIONS_UPDATE_ORDER_SEPARATOR, "\n";
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_ORDER_NUMBER . "\n", $data['orders_id']);
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_INVOICE_URL . "\n",
$GLOBALS['Admin']->catalog('account_history_info.php', ['order_id' => $data['orders_id']]));
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_DATE_ORDERED . "\n\n",
Date::expound($data['date_purchased']));
echo $data['notify_comments'];
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_STATUS_UPDATE, $data['status_name']);
Does your template have the same code? Or did you customize it? If you customized it, what do you have there now? Because again, I point out that the core version does not have a problem with this.
Hint: you should have a printf there and not a print nor an echo.
Re: Order Notification Email
Posted: Thu Jul 07, 2022 8:12 am
by radhavallabh
ecartz wrote: ↑Thu Jul 07, 2022 7:13 am
tpl_n_update_order.php has
Code: Select all
echo STORE_NAME, "\n", MODULE_NOTIFICATIONS_UPDATE_ORDER_SEPARATOR, "\n";
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_ORDER_NUMBER . "\n", $data['orders_id']);
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_INVOICE_URL . "\n",
$GLOBALS['Admin']->catalog('account_history_info.php', ['order_id' => $data['orders_id']]));
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_DATE_ORDERED . "\n\n",
Date::expound($data['date_purchased']));
echo $data['notify_comments'];
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_STATUS_UPDATE, $data['status_name']);
Does your template have the same code? Or did you customize it? If you customized it, what do you have there now? Because again, I point out that the core version does not have a problem with this.
Hint: you should have a printf there and not a print nor an echo.
Yes dear I have the same code no modification done-
Code: Select all
echo STORE_NAME, "\n", MODULE_NOTIFICATIONS_UPDATE_ORDER_SEPARATOR, "\n";
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_ORDER_NUMBER . "\n", $data['orders_id']);
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_INVOICE_URL . "\n",
$GLOBALS['Admin']->catalog('account_history_info.php', ['order_id' => $data['orders_id']]));
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_DATE_ORDERED . "\n\n",
Date::expound($data['date_purchased']));
echo $data['notify_comments'];
printf(MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_STATUS_UPDATE, $data['status_name']);
Problem is coming with below steps when you issue a update through admin.
We select a order -> Move to status history -> Add a canned comment or any comment -> all checkboxes selected -> Click Save.
On receipt of email it shows a %s prepending the URL.
Please help me with the issue dear
Thank you in advance;
Regds./
radhavallabh