Jump to content

Applying a cart rule from a module in OPC


gotroch

Recommended Posts

I apply a cart rule in a module. It works fine for 5-steps checkout but not in OPC.

 

I call $this->context->cart->addCartRule($cartRule->id)  in hookCreateAccount (ajax call). 

 

It's fine in 5-steps checkout.

 

It works somehow in OPC when I put die() directly after addCartRule($cartRule->id) and then manually reload browser. 

 

But once I apply the voucher it reloads browser automatically and then there is nor discount not saved address.

 

Not sure that I expressed myself clearly but I tried. Could you please help me?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...