Skip to main content

payment notification : payment Cancelled

More
3 years 7 months ago #349311 by netnog
-- HikaShop version -- : 4.7.1
-- Joomla version -- : 3.10.11
-- PHP version -- : 7.4
-- Browser(s) name and version -- : Firefox or Chrome

Hello,

I have a question about sending payment notifications.
An email is sent to the site administrator when a payment in the webshop has been successfully completed. (payment notification : payment Confirmed). That's totally fine.
But an email is also sent when a payment is canceled (payment notification: payment Cancelled).
The administrator does not want to receive the message of a canceled payment because it causes confusion. I can't find if it can be disabled, any of you have a tip how to solve this?
Thanks in advance!

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago - 3 years 7 months ago #349315 by Philip
Hello,

Then you can "switch off" the relative email, see my screenshot :


Hope this will fit your needs
Regards
Last edit: 3 years 7 months ago by Philip.

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago - 3 years 7 months ago #349325 by netnog
Thank you for your response.
This option was and is disabled (See image - number 10), but the emails are still being sent.
What to do?

Last edit: 3 years 7 months ago by netnog.

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #349326 by nicolas
Hi,

The same email "payment notification" is sent in both cases.
You would have to edit the "payment notification" email in the menu System>Emails and add such code in the HTML area:
Code:
<?php if($data->mail_status=='cancelled'){ $mail->published = false; } ?>
And that should disable the email only when the order is being cancelled.

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #349402 by netnog
Thanks Nicolas for your reply and code!
I've placed your line of code at the beginning of the HTML area. But not yet the desired result. Canceled payments will continue to be sent.
Have I placed the code correctly?

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #349403 by nicolas
Hi,

Ah right, $data->mail_status is the translated status text.
Try changing this to $data->order_status so that it uses the status namekey and it should work better.

Please Log in or Create an account to join the conversation.

Time to create page: 0.224 seconds
Powered by Kunena Forum