I use this module to allow customers to sign up for plans on my site. If they add plan A, then reconsider, leave, and click on plan B, I want the cart to empty and plan B to be added. Currently, an error message is displayed asking users to please delete existing items, which is less user friendly then doing this for them.
Note that I plan on updating the module code for 6.x-1.1 (the version I am currently deploying) and posting a patch here for (hopefully) adoption to the module code in the next release, unless this already exists and someone can direct me to existing code, patch, or a dev release I should use instead.
Comments
Comment #1
Charlie B commentedActually this was easier then I thought. Here's the patch.
-Adds one new option to the admin page (Home » Administer » Store administration » Configuration » Product settings) - a checkbox to enable replacing the cart on add rather then displaying an error message to the user if the limit has been reached.
-Deletes existing cart entries for the given cart ID on cart add if the limit has been reached and the check is enabled.
For 6.x-1.1
I haven't looked at the code in the dev releases, but I imagine this should be able to be manually applied without difficulty.
Comment #2
mrfelton commentedCommitted to latest -dev. Thank you for this. good work.