News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Email order status to the user - always

Started by Ventsi Genchev, May 16, 2019, 09:31:00 AM

Previous topic - Next topic

Ventsi Genchev

VirtueMart 3.4.5 10057
VirtueMart 3.4.3.9975

No matter what setting is selected in a "Email shopper fields for shopper emails", an email is always sent to the user.
Only if the "Notify Shopper?" option is turned off in the order under "Update status" then it does not send an email. But then the order status of the frontend does not change, too, and the user can not see it.

For example, for a delivered order, I do not want to send an email to the user, but he must see this status when he views the information on the site.

Am I wrong in some setup?
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

AH

Remove ALL the status for which you do not require emails from the field

Default Order Status to send email to shopper    

Regards
A

Joomla 4.4.5
php 8.1

Ventsi Genchev

Where do you mean? The field in Update Status "all lines?"?
Because I tried with this field and there was no change. I do not even know what it serves.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Ventsi Genchev

Very strange. Any idea where to look for the problem?

By the way, the vendor settings have no problem.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

StefanSTS

jenkinhill is showing the settings of the second tab "Orders" in VirtueMart configuration.
That's where you have to head to.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Ventsi Genchev

Yes, I know this place, but please read what I wrote at the top:

"No matter what setting is selected in a "Email shopper fields for shopper emails", an email is always sent to the user."
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

Ventsi Genchev

Here's what I found:

/administrator/components/com_virtuemart/models/orders.php

If I remove "!" from this line:
if(!$this->useDefaultEmailOrderStatus and isset($vars['newOrderData']['customer_notified']) and $vars['newOrderData']['customer_notified']==1){

Everything works properly.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

StefanSTS

#8
I see your problem now.

In orders list, the tick is automatically removed if you set a new status which should not send emails.
In the order details view the tick is not automatically removed.

I guess there is some missing JS to do that.

So I confirm this bug or missing feature.

Removing the ! might cause some other unwanted problems, I haven't looked at that in detail, so you might want to test that further.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Milbo

Thank you, good explanation. Makes sense. I take a look
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Ventsi Genchev

Quote from: StefanSTS on May 16, 2019, 11:54:21 AM
In orders list, the tick is automatically removed if you set a new status which should not send emails.
In the order details view the tick is not automatically removed.

No, removing the tick by default is not a solution. Much less often an internal note is needed without the client seeing the status.
If it is removed, it does not send an email and does not update the status in the history the client sees. It just leaves an internal comment, which is very good.

The line I showed is definitely wrong.

In this state she says: Send an email if the status is not in the "Default Order Status to send email to the shopper" and the tick is ON.

After removing "!": Send an email if the status is in "Default Order Status to send email to the shopper" and the tick is ON.

Otherwise, the customer always receives an email when the ticket is active (= 1).
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

StefanSTS

Quote from: Ventsi Genchev on May 16, 2019, 12:43:33 PM
No, removing the tick by default is not a solution. Much less often an internal note is needed without the client seeing the status.
If it is removed, it does not send an email and does not update the status in the history the client sees. It just leaves an internal comment, which is very good.

Removing the tick for the statusses automatically where you don't want emails to be sent, not by default, depending on the setting in VM config - Orders is wanted.
That it is not removed at the moment like in the orders list is a bug, and it is a solution for the general problem.

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Ventsi Genchev

I now understood you.

Please note that when the check mark is removed, the new order status is not visible to the user on the site.
So we may not want to send an email, but the status should be visible to the user. When not checked, it does not send an email, but the status is also not visible to the user too.

In my opinion, it is best:
1. If there is no check - only the administrator sees the status.
2. If checked, the status is visible to the user. If we choose to receive an email, he will also receive it.

So it's more functional than having a checkmark that just tells us what we've set up. And of course we can switch it directly.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

Ventsi Genchev

#13
Yet let me give an example:

When we receive an order, we call the customer's phone for confirmation. If he does not respond - Status "Not Confirmed by Customer". (He receives an email.)
After we contact him and he confirms the order - Status "Confirmed". He does not receive an email because he does not need it. But when he enters the site and looks at the status, he is "Confirmed".

If we remove the tick, it will not receive an email, but the status will also be "Not Confirmed by Customer".

That's why I think the way I described above is better. We have a greater opportunity to work.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

StefanSTS

Now I understood you too, I guess.

In the end there are two things you require (and that makes sense to me).

1. the old "send an email",
2. a new "show changed status to user",
which is at the moment two in one, if I understand that right. (I never used it this way, so I would have to test that).

So it would actually mean to add another checkbox to the three checkboxes that are there now.

I would also love to see an "add internal note" and "add comment for customer" in the order details to avoid mistakes by accidentally sending an internal note to the customer.


--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.