Jump to content

How to disable order_conf MailSend on specific Order Statuses with payment module


Zhen-Xlogic

Recommended Posts

Hello to Community of PS.

I create a new e-shop based on PrestaShop 1.6.1.17 and i want your help. :)

Yesterday i installed the Module Alphapay payment system from marketplace, this module creates 3 new status to put order:

  • When payment is cancelled by user sets the order status to PS_OS_CANCELED.
  • When payment fail to verified the card information sets the order status to PS_OS_ALPHAPAY_REFUSE.
  • When payment fails (system general error) sets the order status to PS_OS_ALPHAPAY_ERROR.
  • When payment its ok sets the order status to PS_OS_ALPHAPAY.

 

The major issue that i have is when the order status seted by the module into the follow status PS_OS_ALPHAPAY_REFUSE | PS_OS_ALPHAPAY_ERROR is sends email to customer that the order with order num XXX was received, its sending the default email template: order_conf.html.

 

In the BO i have disable the email for this 3 status (Red Color):

image.thumb.png.6c21a986d19f11e1c6a9587f03646ca3.png

 

How can we cut or disabled the email order_conf.html for this 3 specific status ?

 

Thanks in advance,

Zhen-Xlogic.

Link to comment
Share on other sites

  • 4 years later...

Hi,

 

Thanks for your reply and the module! It's really nice to have it.

 

The problem here is not that we want to entirely disable order_conf.html for a payment method. As Zhen-Xlogic describes at the beginning of the topic, order_conf.html shouldn't be sent for specific order statuses. Or, if an order is not considered completed due to an error during checkout.

 

Is there anything we can do at this part of classes/PaymentModules.php?

if (Validate::isEmail($this->context->customer->email))
                            Mail::Send(
                                (int)$order->id_lang,
                                'order_conf',

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...