Search code examples
prestashopprestashop-1.7prestashop-modulesprestashop-helper-classes

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


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


Solution

  • 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.