Ramses Kouam
Ramses Kouam

Reputation: 369

how to disable order confirmation mail in a prestashop module?

i want to create a payment module in prestashop and i would like to disable order confirmation mail when a customer validates his order. i have tried to override the Mail class but it affects the other mail sending. i do not know which file to override and how to do it. i saw somewhere we can also override PaymentModule but i don't know how to do it

enter image description here

Upvotes: 0

Views: 1766

Answers (2)

Ramses Kouam
Ramses Kouam

Reputation: 369

i succeeded to block mail sending by using this : i use the actionEmailSendBefore hook $this->registerHook('actionEmailSendBefore')

public function hookActionEmailSendBefore($params){

   if($params['template'] === 'order_conf'){
        return false;
    }
    return true;
}

Upvotes: 2

ethercreation
ethercreation

Reputation: 1273

try with create override/classes/PaymentModule.php (and clear cache). In the override you must put the validateOrder function by commenting on the sending part of the email (to line 206)

Regards

Upvotes: 0

Related Questions