Reviewed & tested by the community
Project:
Ubercart Product Minimum & Maximum
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2011 at 12:56 UTC
Updated:
30 Sep 2012 at 22:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
marcus178 commentedI've got the same problem on 6.x-1.x-dev
Comment #2
Cablestein commentedI have the same problem too, 6.x-1.x-dev.
Basically it's an annoyance to the user to have to go through their cart items and make sure all min-max rules are okay, THEN they are able to remote an item from the cart.
The logic for min-max rules and the messages should occur after the logic for removing items from cart.
Comment #3
natukI think the problem is with the form_alter function. I made a few changes as follows:
Basically, we first check to see if any of the fields is to be removed and if there is one, then we skip validation altogether. This, obviously, means that if there are additional invalid fields then they are skipped as well. But they are picked up with checkout.
Otherwise, I am not sure how it is possible to limit form validation to certain fields only when it comes to removal.
Comment #4
rickmanelius commentedI've done nothing but convert #3 into patch form so we can test it. I'll review myself in a little bit, but I'll set the status to "needs review" for now.
Comment #5
rickmanelius commented*ahem. Setting status
Comment #6
rickmanelius commentedFYI I can confirm that the function behaves as expected (the product min/max restrictions still work but removing from the cart is now possible). I'd like to set this to RBTC, but I'd feel more comfortable to get a code spot check first before it's fully committed.