Prestashop 1.7:Which hook to use when Order is FREE (no payment)

875 Views Asked by At

I need help in a case, where the order total price is zero(using coupon or product with zero value)

Which hook will trigger when the Free order is being placed.

Or Is there any way to do it?

Thanks

2

There are 2 best solutions below

2
gennaris On BEST ANSWER

See : https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/

I would definitely use actionValidateOrder

There you can check $params inside the hook which contains the order/cart that had just been made.

If $params['order']->total_paid == 0 you can trigger your custom code.

0
KoreLewi On

There is no dedicated hook for this.

But you can check the controllers/front/OrderConfirmationController.php checkFreeOrder method.