Create shopping cart price rule with coupon on clicking Place Order [closed]
-
13-12-2019 - |
Question
I am working on a custom module in which I need to generate a coupon with "n" number of uses per order while clicking "Place Order" in checkout page.
Can anyone suggest me the best way for it.
Solution
What exactly is your problem? you hook into the sales_order_place_after
(?) event and generate coupon codes for a given rule. If you need to define the rule, you create the rule beforehand and afterwards the coupons.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange