mantas393 Posted May 24, 2019 Share Posted May 24, 2019 (edited) What I tried: I created a discount coupon in back office. Coupon ID is 54 A hook calls a module when Cart page is loaded. In my module i wrote: $cart_rule = new CartRule(54); $cart_rule->add(); Edited May 24, 2019 by mantas393 (see edit history) Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted May 24, 2019 Share Posted May 24, 2019 Hi.. use this and see result i hope this help for you $this->context->cart->addCartRule($id_cart_rule); Thanks 1 Link to comment Share on other sites More sharing options...
mantas393 Posted May 24, 2019 Author Share Posted May 24, 2019 1 hour ago, Nishith said: Hi.. use this and see result i hope this help for you $this->context->cart->addCartRule($id_cart_rule); Thanks This worked! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now