Post by TriumphDesign » Fri Jun 26, 2015 6:36 pm

Hi there,

I was wondering if anyone ever found a solution for this problem;

When an order gets cancelled the admin alert email still gets triggered, I want to see if an order is sucessfully paid and THEN send the admin alert. I had a look around in catalog/model/checkout/order.php but I'm not sure if I'm going in the right direction.

Thanks a ton in advance!

New member

Posts

Joined
Mon Jun 03, 2013 8:51 pm

Post by straightlight » Sun Jun 28, 2015 10:43 pm

If you wish to receive admin alert email messages upon completed orders from each checkout process,

in catalog/model/checkout/order.php file,

find:

Code: Select all

if ($this->config->get('config_order_mail')) {
replace with:

Code: Select all

if ($this->config->has('config_complete_status') && in_array($order_info['order_status_id'], $this->config->get('config_complete_status')) && $this->config->get('config_order_mail')) {
For 1.5x releases of OC:

Change from the above all instances of: config_complete_status for: config_complete_status_id .
Last edited by straightlight on Mon Jun 29, 2015 7:48 pm, edited 1 time in total.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by IP_CAM » Mon Jun 29, 2015 2:10 am

But this above 'Solution' is valid only for OpenCart v.2.x
OC v.1.5.6.x needs to have it done differently.
Ernie

OC v.1.5.6.x:
I tried this, and the 'regular' way, it still works, when finishing an order, but since I don't know,
how you 'cancelled' orders, I cannot test, if it functions, your way.

Code: Select all

// Admin Alert Mail
// if ($this->config->get('config_alert_mail')) {
if ($this->config->get('config_complete_status_id')&& $this->config->get('config_alert_mail')) {
$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id);

I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'300 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by pakchilweb » Mon Nov 02, 2020 6:13 pm

email send after order payment cancellation to client and admin a well..... i am so much confuse because client also receive order confirm email and also admin the order show confirm means "pending status".... i am mentioning the video link below so you can see problem. how I can resolve this problem...https://youtu.be/dogPTGb4pL0 .....also the account logout after sending email and whenever not send email the account not logout. so this the problem.... how can i fix
https://youtu.be/dogPTGb4pL0
please must see the video where clear error

Newbie

Posts

Joined
Sun Jul 15, 2018 7:54 am

Post by straightlight » Mon Nov 02, 2020 9:25 pm

Muhammad Mamoon Khan wrote:
Mon Nov 02, 2020 6:13 pm
email send after order payment cancellation to client and admin a well..... i am so much confuse because client also receive order confirm email and also admin the order show confirm means "pending status".... i am mentioning the video link below so you can see problem. how I can resolve this problem...https://youtu.be/dogPTGb4pL0 .....also the account logout after sending email and whenever not send email the account not logout. so this the problem.... how can i fix
https://youtu.be/dogPTGb4pL0
please must see the video where clear error
Are the emails sending for all other features than those mentioned on your store?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pakchilweb » Tue Nov 03, 2020 5:08 am

for all other features we not facing any problem you can see in the video.... only we facing this problem whenever we cancel the payment and in the video clearly you can see after cancellation when return to checkout the order confirmation email receive both sides client and admin as well... i don't know if there is any code to prevent... is a .htaccess creating problem? i am using Opencart version 3.0.3.3.
or is the code will work as IP_CAM said in the above post

Newbie

Posts

Joined
Sun Jul 15, 2018 7:54 am

Post by straightlight » Tue Nov 03, 2020 7:40 pm

Check your error / server access logs when cancelling an order. Do you see new error messages showing?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pakchilweb » Sat Nov 14, 2020 3:39 am

straightlight wrote:
Tue Nov 03, 2020 7:40 pm
Check your error / server access logs when cancelling an order. Do you see new error messages showing?
{"flowOrder":25854331,"commerceOrder":"128","requestDate":"2020-11-10 12:02:33","status":1,"subject":"Orden # 128 - MAMOON JOYAS - JEWELRY","currency":"CLP","amount":"58212","payer":"motomultani@gmail.com","optional":null,"pending_info":{"media":null,"date":null},"paymentData":{"date":null,"media":null,"conversionDate":null,"conversionRate":null,"amount":null,"fee":null,"balance":null,"transferDate":null},"merchantId":null}
2020-11-12 4:26:37 - Entering gatewayRedirect...
2020-11-12 4:26:37 - Calling Flow service: payment/getStatus with params: {"token":"355422F140013492I"}
2020-11-12 4:26:39 - Flow response:

{"flowOrder":25951700,"commerceOrder":"130","requestDate":"2020-11-12 01:26:14","status":1,"subject":"Orden # 130 - MAMOON JOYAS - JEWELRY","currency":"CLP","amount":"205790","payer":"motomultani@gmail.com","optional":null,"pending_info":{"media":null,"date":null},"paymentData":{"date":null,"media":null,"conversionDate":null,"conversionRate":null,"amount":null,"fee":null,"balance":null,"transferDate":null},"merchantId":null}

this is in log file and Status is 1 ...... my question is the status 1 is right

Newbie

Posts

Joined
Sun Jul 15, 2018 7:54 am

Post by straightlight » Sat Nov 14, 2020 3:42 am

this is in log file and Status is 1 ...... my question is the status 1 is right
Contact the extension developer of the payment module for more information on this.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pakchilweb » Mon Jan 11, 2021 6:50 pm

I have solved this problem. (payment method is www.flow.cl)
How i solved ?
let me explain:

go to module file. path is:

/public_html/catalog/controller/extension/payment/flow_webpay.php

edti this above file and find this below code:

private function isPendingInFlow($status){
return $status == 1;

Than change it's status code to:

private function isPendingInFlow($status){
return $status == 0;

now the payment module not sending email and pending order after cancelation of payment

method.

Newbie

Posts

Joined
Sun Jul 15, 2018 7:54 am
Who is online

Users browsing this forum: No registered users and 33 guests