silvershop/silvershop-discounts

Applied Member Group Discount Prevents Checkout

Snowboarder540 opened this issue · 2 comments

Hi Guys,

I had recently upgraded my site (including the silvershop-discounts module) and have come across a strange error / issue having now narrowed it down to what I believe is this module.

Previously using Silverstipe 3.6.3, Silvershop 2.3.1, silvershop-discounts 1.2.0 - no discount issue.
Currently using Silverstipe 3.7.3, Silvershop 2.4.2, silvershop-discounts 1.3.1

The issue occurs if a logged in member (not admin), that has a group discount applied is in the checkout process (note: I am using a stepped checkout). For some reason the checkout form action acquires a ?stage=Stage suffix.

Because these members are not admin the form submission redirects the user to an admin login page / prevents the user from continuuing the checkout process.

If the discount is removed for that member group then the suffix is not applied and the user is able to checkout as normal.

Any clues / fixes?

wilr commented

Have a look through the code for instances of Versioned::set_ something will be leaking state. This should be fixed already by upgrading to SS4

Great, that's done the trick. Thanks Wilr!