- Posts: 642
- Thank you received: 26
Payment notification email (6.8.2) shows notification text twice + overlaps with
4 hours 28 minutes ago - 3 hours 44 minutes ago #100000772
by Lumiga
Kind regards,
Lumiga
Payment notification email (6.8.2) shows notification text twice + overlaps with was created by Lumiga
-- Browser(s) name and version -- : Chrome 157.0
Hello,
The "Payment notification" email sent to the shop owner contains duplicated information. I see two separate issues.
1) The payment notification text itself appears twice in $data->mail_params
After a successful Mollie payment (order B-00231), the NOTIFICATION_MESSAGE block contains:
"Een betaalnotificatie is ontvangen met de status confirmed. De bestelstatus is nu: Bevestigd. Deze notificatie is voor de bestelling B-00231 op de website domein.nl/
Een betaalnotificatie is ontvangen met de status Geslaagd. De bestelstatus is nu: Geslaagd. Deze notificatie is voor de bestelling B-00231 op de website domein.nl/
U kunt de bestelgegevens direct bekijken [...]: domein.nl/administrator/index.php?option...sk=edit&order_id=231 "
(English: "A payment notification was received with the status confirmed. The order status is now: Confirmed. [...]" followed by the same text with status "Geslaagd" (= Mollie's "paid/successful").)
So the same notification is built twice:
- once with the internal HikaShop order status (confirmed / Bevestigd)
- once with the Mollie payment status (Geslaagd), where even "The order status is now" says "Geslaagd", although the order status is actually Confirmed.
Only one email is sent and the email log shows a single entry, so it looks like two notification texts are concatenated into one mail_params, rather than two notifications being processed. Is this caused by HikaShop core (modifyOrder) building its default text while the payment plugin also supplies its own text? Or is it the payment plugin?
2) The new 6.8.x payment_notification template duplicates texts that are already in NOTIFICATION_MESSAGE
In the core HTML template (payment_notification), the following blocks are all displayed:
- {TXT:ORDER_CHANGED} -> "The order status is now: Confirmed"
- {TXT:NOTIFICATION_MESSAGE} -> plugin text, which already contains the order status, NOTIFICATION_OF_ORDER_ON_WEBSITE and ACCESS_ORDER_WITH_LINK (with the full backend URL)
- {TXT:ORDER_BEGIN_MESSAGE} -> ACCESS_ORDER_WITH_LINK again (with the order number as link text)
- {TXT:ORDER_END_MESSAGE} -> NOTIFICATION_OF_ORDER_ON_WEBSITE again
As a result, even with a single notification, the order status, the "this notification is for order ..." sentence and the backend link each appear twice in the email.
Expected result:
Each piece of information appears once: the status in the header, one "payment notification received with status X" line, one link to the order and one "this notification is for order ..." line.
Workaround for now:
In the preload I extract only the last "payment notification received with status ..." sentence from $data->mail_params and pass that to NOTIFICATION_MESSAGE.
Could you check whether this is a bug in the core template and/or in the way mail_params is built?
Thank you,
Lumiga
Hello,
The "Payment notification" email sent to the shop owner contains duplicated information. I see two separate issues.
1) The payment notification text itself appears twice in $data->mail_params
After a successful Mollie payment (order B-00231), the NOTIFICATION_MESSAGE block contains:
"Een betaalnotificatie is ontvangen met de status confirmed. De bestelstatus is nu: Bevestigd. Deze notificatie is voor de bestelling B-00231 op de website domein.nl/
Een betaalnotificatie is ontvangen met de status Geslaagd. De bestelstatus is nu: Geslaagd. Deze notificatie is voor de bestelling B-00231 op de website domein.nl/
U kunt de bestelgegevens direct bekijken [...]: domein.nl/administrator/index.php?option...sk=edit&order_id=231 "
(English: "A payment notification was received with the status confirmed. The order status is now: Confirmed. [...]" followed by the same text with status "Geslaagd" (= Mollie's "paid/successful").)
So the same notification is built twice:
- once with the internal HikaShop order status (confirmed / Bevestigd)
- once with the Mollie payment status (Geslaagd), where even "The order status is now" says "Geslaagd", although the order status is actually Confirmed.
Only one email is sent and the email log shows a single entry, so it looks like two notification texts are concatenated into one mail_params, rather than two notifications being processed. Is this caused by HikaShop core (modifyOrder) building its default text while the payment plugin also supplies its own text? Or is it the payment plugin?
2) The new 6.8.x payment_notification template duplicates texts that are already in NOTIFICATION_MESSAGE
In the core HTML template (payment_notification), the following blocks are all displayed:
- {TXT:ORDER_CHANGED} -> "The order status is now: Confirmed"
- {TXT:NOTIFICATION_MESSAGE} -> plugin text, which already contains the order status, NOTIFICATION_OF_ORDER_ON_WEBSITE and ACCESS_ORDER_WITH_LINK (with the full backend URL)
- {TXT:ORDER_BEGIN_MESSAGE} -> ACCESS_ORDER_WITH_LINK again (with the order number as link text)
- {TXT:ORDER_END_MESSAGE} -> NOTIFICATION_OF_ORDER_ON_WEBSITE again
As a result, even with a single notification, the order status, the "this notification is for order ..." sentence and the backend link each appear twice in the email.
Expected result:
Each piece of information appears once: the status in the header, one "payment notification received with status X" line, one link to the order and one "this notification is for order ..." line.
Workaround for now:
In the preload I extract only the last "payment notification received with status ..." sentence from $data->mail_params and pass that to NOTIFICATION_MESSAGE.
Could you check whether this is a bug in the core template and/or in the way mail_params is built?
Thank you,
Lumiga
Kind regards,
Lumiga
Last edit: 3 hours 44 minutes ago by Lumiga.
Please Log in or Create an account to join the conversation.
Time to create page: 0.061 seconds