New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When editing an MnM variable subscription, the wrong/old/cached selections & quantities re-appear #26
Comments
Well I guess I should have predicted this. The output of the template is being cached to help with the performance, but as you have found, when editing you would need the order-specific quantities. This is a bit of a quandry as we wouldn't want to clear the cache and undo the performance boost. (this will also be a problem if you try to serve custom URL params as they won't be updated in the cache until the product is re-saved) |
Closed by kathyisawesome/wc-mnm-variable@bead86a 🤞 |
@helgatheviking Thanks for the fix; I'm testing it now, and found what looks to be a related bug:
My guess is that the new JS only updates the non-zero values, and leaves the cached values in place for the zero-quantity items; if so, it also needs to set to zero any zero-quantity items the JS pulls for the user's configuration. |
@helgatheviking Further testing notes:
|
@limist rc 12 made some progress on always setting the quantities via JS... including setting them back to null when there is nothing set for them in the GET or in the subscription order (which also uses GET at it's root). In addition to your reported issue, I'd also seen the wrong values prefilled on the single product page if I cleared out the bundle templates (note: I added a snippet with a button for that in the admin toolbar on your site) and then loaded a subscription to edit. In my tests rc 12 fixes both of these issues. Let me know if it does for you. -- An overfilled bundle is a problem to be addressed in MNM core. I have seen that issue before and couldn't figure it out so tried to make it really hard to get into that error state... I still see your issue when downsizing the variation in the my account area so that's not fixed today. |
@limist is this still an issue? |
@helgatheviking To reproduce: When configuring a MnM variable subscription, e.g. say our test server's subscription bundle and then choose some quantities different from the pre-sets (e.g. 3 of the first product, none of the 2nd and 3rd). Then checkout and purchase as usual.
Then on the Thank You page, click on the bottom link to see the new subscription.
Once on the My Account > view-subscription page, confirm the quantities match your previously selected quantities. Then click the blue "Update bundle" button; the problem is seen at that point: the wrong quantities. Perhaps they're being pulled from a hardcoded selection?
The text was updated successfully, but these errors were encountered: