I have created extra order status as PaymentDone. order get updated to this status when user make payment successfully.
So I want to disable email triggering to admin and customer before making payment successfully....
pending status id = 1
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
In catalog/controller/mail/order.php file,vaidyamanishjoshi wrote: ↑Tue Apr 27, 2021 5:06 pmI am using v 3.0.3.0
I have created extra order status as PaymentDone. order get updated to this status when user make payment successfully.
So I want to disable email triggering to admin and customer before making payment successfully....
pending status id = 1
find all instances of:
Code: Select all
$mail = new Mail($this->config->get('config_mail_engine'));
Code: Select all
if (!in_array($order_info['order_status_id'], array_merge($this->config->get('config_processing_status'), $this->config->get('config_complete_status'))) && in_array($order_status_id, array_merge($this->config->get('config_processing_status'), $this->config->get('config_complete_status')))) {
Code: Select all
$mail->send();
Code: Select all
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thank you for support.straightlight wrote: ↑Wed Apr 28, 2021 7:35 pmIn catalog/controller/mail/order.php file,vaidyamanishjoshi wrote: ↑Tue Apr 27, 2021 5:06 pmI am using v 3.0.3.0
I have created extra order status as PaymentDone. order get updated to this status when user make payment successfully.
So I want to disable email triggering to admin and customer before making payment successfully....
pending status id = 1
find all instances of:
Add above:Code: Select all
$mail = new Mail($this->config->get('config_mail_engine'));
Then, find all instances of:Code: Select all
if (!in_array($order_info['order_status_id'], array_merge($this->config->get('config_processing_status'), $this->config->get('config_complete_status'))) && in_array($order_status_id, array_merge($this->config->get('config_processing_status'), $this->config->get('config_complete_status')))) {
Add after:Code: Select all
$mail->send();
Code: Select all
}
I tried above solution, but unfortunately it didn't work.
Basically I want to disable email to admin and customer when during checkout, user clicks 'Continue' (Beside accept term and conditions checkbox), order get added with order status pending.
Then when user confirms order and pay successfully, email should be triggered to customer and admin.
This is a description of how a default OpenCart installation works.vaidyamanishjoshi wrote: ↑Thu Apr 29, 2021 10:22 pmBasically I want to disable email to admin and customer when during checkout, user clicks 'Continue' (Beside accept term and conditions checkbox), order get added with order status pending.
Then when user confirms order and pay successfully, email should be triggered to customer and admin.
While "pay successfully" depends on the selected payment method, because if it is for example COD, the order is made and the payment will arrive later.
In all cases the order email has to be sent, as this is required by Law (at least in the European Community, don't know where you have your business) - as it is the order confirmation (without the order will not be legal).
Now if you think you do not want this (because of some unknown reasons), a solution is already provided above.
You say:
A very vague statement, what did not work?I tried above solution, but unfortunately it didn't work.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
yes I agree that this is default setting by opencart.OSWorX wrote: ↑Thu Apr 29, 2021 11:44 pmThis is a description of how a default OpenCart installation works.vaidyamanishjoshi wrote: ↑Thu Apr 29, 2021 10:22 pmBasically I want to disable email to admin and customer when during checkout, user clicks 'Continue' (Beside accept term and conditions checkbox), order get added with order status pending.
Then when user confirms order and pay successfully, email should be triggered to customer and admin.
While "pay successfully" depends on the selected payment method, because if it is for example COD, the order is made and the payment will arrive later.
In all cases the order email has to be sent, as this is required by Law (at least in the European Community, don't know where you have your business) - as it is the order confirmation (without the order will not be legal).
Now if you think you do not want this (because of some unknown reasons), a solution is already provided above.
You say:A very vague statement, what did not work?I tried above solution, but unfortunately it didn't work.
On my eshop, cash on delivery option is not available. Only after payment, order is confirmed.
Now why I want this is :
user logins >> add products to cart >> view cart >> proceed to checkout >> continue till Payment Mode step >> email triggered to admin with order status Pending >> user doesn't click on Confirm button and doesn:t proceed to pay at that time (may be due to unknown reason) >> he leaves site.
After some time, he login again >> products are already in cart >> view cart >> proceed to checkout >> again new order id genrated at Payment Mode step and email triggered to admin...
basically admin gets two emails for same products by same customer...
And my email box gets filled with such many emails with status pending by various customers. ( which should be converted to Confirmed order... but as there is no option to pay such orders with same order id and with status pending at frontend...)
So i need email should get only after payment, so at that point, order is confirmed.
secondly, solution to this given above didn't work means, till emails with pending status are getting triggered which I am not expecting..
thank you
With this modification, only processing and complete order statuses should be looked up. At this point, if you keep receiving email notifications with these changes and, assuming you followed the instructions properly from the above, you should only receive email notifications with orders based on processing and complete statuses. If not, then you need to look at your order statuses settings from the OC admin, either from each stores, or from your extension payments.vaidyamanishjoshi wrote: ↑Fri Apr 30, 2021 12:10 amyes I agree that this is default setting by opencart.OSWorX wrote: ↑Thu Apr 29, 2021 11:44 pmThis is a description of how a default OpenCart installation works.vaidyamanishjoshi wrote: ↑Thu Apr 29, 2021 10:22 pmBasically I want to disable email to admin and customer when during checkout, user clicks 'Continue' (Beside accept term and conditions checkbox), order get added with order status pending.
Then when user confirms order and pay successfully, email should be triggered to customer and admin.
While "pay successfully" depends on the selected payment method, because if it is for example COD, the order is made and the payment will arrive later.
In all cases the order email has to be sent, as this is required by Law (at least in the European Community, don't know where you have your business) - as it is the order confirmation (without the order will not be legal).
Now if you think you do not want this (because of some unknown reasons), a solution is already provided above.
You say:A very vague statement, what did not work?I tried above solution, but unfortunately it didn't work.
On my eshop, cash on delivery option is not available. Only after payment, order is confirmed.
Now why I want this is :
user logins >> add products to cart >> view cart >> proceed to checkout >> continue till Payment Mode step >> email triggered to admin with order status Pending >> user doesn't click on Confirm button and doesn:t proceed to pay at that time (may be due to unknown reason) >> he leaves site.
After some time, he login again >> products are already in cart >> view cart >> proceed to checkout >> again new order id genrated at Payment Mode step and email triggered to admin...
basically admin gets two emails for same products by same customer...
And my email box gets filled with such many emails with status pending by various customers. ( which should be converted to Confirmed order... but as there is no option to pay such orders with same order id and with status pending at frontend...)
So i need email should get only after payment, so at that point, order is confirmed.
secondly, solution to this given above didn't work means, till emails with pending status are getting triggered which I am not expecting..
thank you
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
This is not how it works.user logins >> add products to cart >> view cart >> proceed to checkout >> continue till Payment Mode step >> email triggered to admin with order status Pending >> user doesn't click on Confirm button and doesn:t proceed to pay at that time (may be due to unknown reason) >> he leaves site.
After some time, he login again >> products are already in cart >> view cart >> proceed to checkout >> again new order id genrated at Payment Mode step and email triggered to admin...
When a user confirms the payment method, a new order is generated with status 0, no email is send at that time.
The confirmation email is send when a order goes from status 0 to any other status like pending.
That only happens after a user confirms the order itself, directly via the payment method like COD or via a callback from a payment gateway, That triggers the order history addition and the emails.
If a user does not confirm the order or does not complete the gateway payment, the order stays in status 0, the cart stays intact and no email is ever send, you will find those "ghost orders" in your "missing orders" filter.
When the customer signs in again and confirms the payment method again, a new order is again created with status 0, etc....
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
but I am getting emails with status Pending (order_status_id = 1) when user clicks continue button at payment mode tab....by mona wrote: ↑Fri Apr 30, 2021 2:11 amI think there is some confusion
This is not how it works.user logins >> add products to cart >> view cart >> proceed to checkout >> continue till Payment Mode step >> email triggered to admin with order status Pending >> user doesn't click on Confirm button and doesn:t proceed to pay at that time (may be due to unknown reason) >> he leaves site.
After some time, he login again >> products are already in cart >> view cart >> proceed to checkout >> again new order id genrated at Payment Mode step and email triggered to admin...
When a user confirms the payment method, a new order is generated with status 0, no email is send at that time.
The confirmation email is send when a order goes from status 0 to any other status like pending.
That only happens after a user confirms the order itself, directly via the payment method like COD or via a callback from a payment gateway, That triggers the order history addition and the emails.
If a user does not confirm the order or does not complete the gateway payment, the order stays in status 0, the cart stays intact and no email is ever send, you will find those "ghost orders" in your "missing orders" filter.
When the customer signs in again and confirms the payment method again, a new order is again created with status 0, etc....
not in missing / ghost orders....
1. Check that yourself - that appears as a missing order as stated above.
If that is not correct you have something else going on and you should look elsewhere - something that edits your checkout ?
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
One of the reasons (after many replies, etc.) to read this here BEFORE you post the 1. message:vaidyamanishjoshi wrote: ↑Fri Apr 30, 2021 2:23 ambut I am getting emails with status Pending (order_status_id = 1) when user clicks continue button at payment mode tab....
viewtopic.php?f=176&t=200480
After that, you should publish those details, especially the used Template/Theme and if there are any modifications used.
Because what you want to tell us is impossible with a standard Opencart Installation!
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Thank you for link. I will update my query soon. Thanx once again..OSWorX wrote: ↑Fri Apr 30, 2021 3:33 amOne of the reasons (after many replies, etc.) to read this here BEFORE you post the 1. message:vaidyamanishjoshi wrote: ↑Fri Apr 30, 2021 2:23 ambut I am getting emails with status Pending (order_status_id = 1) when user clicks continue button at payment mode tab....
viewtopic.php?f=176&t=200480
After that, you should publish those details, especially the used Template/Theme and if there are any modifications used.
Because what you want to tell us is impossible with a standard Opencart Installation!
Surely I will check and update here. Thank you !
Users browsing this forum: No registered users and 238 guests