payment notification : payment Cancelled

  • Posts: 10
  • Thank you received: 1
  • Hikashop Business
1 year 9 months ago #349311

-- 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.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
1 year 9 months ago #349315

Hello,

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



Hope this will fit your needs
Regards

Last edit: 1 year 9 months ago by Philip.

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

  • Posts: 10
  • Thank you received: 1
  • Hikashop Business
1 year 9 months ago #349325

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?

Attachments:
Last edit: 1 year 9 months ago by netnog.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 9 months ago #349326

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:

<?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.

  • Posts: 10
  • Thank you received: 1
  • Hikashop Business
1 year 9 months ago #349402

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?

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 9 months ago #349403

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.081 seconds
Powered by Kunena Forum