Double emails on free products

  • Posts: 26
  • Thank you received: 2
1 year 10 months ago #342801

-- HikaShop version -- : 4.6.0
-- Joomla version -- : 4.1.4
-- PHP version -- : 8.0.18
-- Browser(s) name and version -- : Chrome 99.0.4844.51 (Officiële build) (64-bits)
-- Error-message(debug-mod must be tuned on) -- : None

Hi,

We have a internal webshop to order components and such sort of things.
Most components have prices, but some do not have prices available yet as the prices are only there for awareness of the employees.
When ordering with priced items, there is no problem.

The problem is:
When ordering with items that are free, the system will automaticly change the order to created and send 2 emails to the customer. -> Order created email + a status changed to order created email.
Is there a way to only turn off the email when its status changes to created? The rest of the status changes we do need.

Hopefully you understand what i mean.


Best regards,
Attachments:

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

  • Posts: 81708
  • Thank you received: 13104
  • MODERATOR
1 year 10 months ago #342803

Hi,

What you can do is go in the menu System>Emails and unpublish the "Order creation notification" email. That way, no email will be sent to the user when the order is created, and only the "order status notification" email will be sent when the order's status is changed.

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

  • Posts: 26
  • Thank you received: 2
1 year 10 months ago #342814

Hi Nicolas,

That's not exactly what i would want to do.

I have done these things:
1. Users get a order status changed mail. The emails notification boxesin the backend are standard checked. So it wont be forgotten when changing a status.
2. Admins get a order created mail.
3. Customers should also get a order created mail.

The thing is they do get an order created mail, but when the order is free they also get an status changed mail. The last thing is that i want to turn off.
You can see in the uploaded jpg how i've set up my statusses. Also note how i don't use confirmed.

I think it's in the part when a "paid"(€0,00 in this problem) has a status as confirmed and inmediatly changed to created.
We do not use the payment system so i always want new orders to end up in the status created.

I'm guessing there would be a way to flag ALL new orders into the created status? So the paid ones do not send a status changed confirmation.


Best regards,

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

  • Posts: 26
  • Thank you received: 2
1 year 10 months ago #342816

Ive found the following in the email preload of the created status:


$order_changed = JText::sprintf('ORDER_STATUS_CHANGED_TO', $url, $data->mail_status);
if(!empty($data->usermsg->usermsg))
$order_changed = $data->usermsg->usermsg;

Can i remove or change something in there so when orders are changed to to created, users do not get that mail.

or should i look into this one?


$fields = $fieldsClass->getFields('display:mail_status_notif=1',$null,'product');


Best regards,
Last edit: 1 year 10 months ago by alexnovo.

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

  • Posts: 81708
  • Thank you received: 13104
  • MODERATOR
1 year 10 months ago #342838

Hi,

In the Joomla plugins manager, you have the HikaShop validate free orders plugin.
When activated, this plugin will automatically change the status of the order from created to confirmed when the total amount of the order is 0.
This plugin has a setting to turn off the email sending which is done when the status is changed at that time.
So you might want to either turn off that setting, or even disable the plugin if you don't want the order status to changed from created autoamtically.

The following user(s) said Thank You: alexnovo

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

Time to create page: 0.061 seconds
Powered by Kunena Forum