Order Notification Email
-
radhavallabh
- Senior Contributor
- Posts: 466
- Joined: Tue Oct 27, 2020 4:09 am
- Phoenix Version: 1.1.0.6
- Has thanked: 29 times
- Been thanked: 3 times
Order Notification Email
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
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
-
radhavallabh
- Senior Contributor
- Posts: 466
- Joined: Tue Oct 27, 2020 4:09 am
- Phoenix Version: 1.1.0.6
- Has thanked: 29 times
- Been thanked: 3 times
Re: Order Notification Email
Dear the %s is appearing after the language constant Detailed Invoice: as below-ecartz wrote: ↑Tue Jul 05, 2022 1:37 pm Language constant: https://github.com/CE-PhoenixCart/Phoen ... ut.php#L18
No %s
Detailed Invoice: %s (after this %s the URL is there)
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Order Notification Email
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?
-
radhavallabh
- Senior Contributor
- Posts: 466
- Joined: Tue Oct 27, 2020 4:09 am
- Phoenix Version: 1.1.0.6
- Has thanked: 29 times
- Been thanked: 3 times
Re: Order Notification Email
No dear it is the same as original... I made no changes to it...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?
-
radhavallabh
- Senior Contributor
- Posts: 466
- Joined: Tue Oct 27, 2020 4:09 am
- Phoenix Version: 1.1.0.6
- Has thanked: 29 times
- Been thanked: 3 times
Re: Order Notification Email
This is in my tpl file.radhavallabh wrote: ↑Wed Jul 06, 2022 5:03 amNo dear it is the same as original... I made no changes to it...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?
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";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-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Order Notification Email
Well, something is different between your store and the demo, because the email from the demo sends
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.
No %sOrder Number: 45
Detailed Invoice: https://phoenixcart.org/demo/account_hi ... rder_id=45
Date Ordered: Wednesday 06 July, 2022
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.
-
radhavallabh
- Senior Contributor
- Posts: 466
- Joined: Tue Oct 27, 2020 4:09 am
- Phoenix Version: 1.1.0.6
- Has thanked: 29 times
- Been thanked: 3 times
Re: Order Notification Email
Hi dear;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 sendsNo %sOrder Number: 45
Detailed Invoice: https://phoenixcart.org/demo/account_hi ... rder_id=45
Date Ordered: Wednesday 06 July, 2022
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.
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
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Order Notification Email
tpl_n_update_order.php has 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.
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']);Hint: you should have a printf there and not a print nor an echo.
-
radhavallabh
- Senior Contributor
- Posts: 466
- Joined: Tue Oct 27, 2020 4:09 am
- Phoenix Version: 1.1.0.6
- Has thanked: 29 times
- Been thanked: 3 times
Re: Order Notification Email
Yes dear I have the same code no modification done-ecartz wrote: ↑Thu Jul 07, 2022 7:13 am tpl_n_update_order.php hasDoes 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.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']);
Hint: you should have a printf there and not a print nor an echo.
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']);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