multiple add to cart problem
following on from a thread I started a couple of weeks ago.
I have a results page which is filtered by the dataassist search.
The results page has a multiple add to cart option, but i was experiencing a problem in that items would be added to the cart, even if the checkbox was unchecked.
I had what i thought was a solution, in that the trigger was looking not only for a submit button being pressed, but also that there was a check box array and checkboxes were selected.
showpost.php?p=98881&postcount=14
this works, but still causes me a problem.
If the customer adds an item to the cart, removes it, goes back to the results page and doesn't check any boxes, then presses 'add to cart' the original item is still added to the cart.
I think this is because, in this instance, the search criteria is using the session value as the filter rather than the form criteria posted, (as the trigger is not fired)
Is it advisable just to reset the session ?
eg
if (isset($_SESSION["WADbSearch2_results"]) && $_SESSION["WADbSearch2_results"] != "") {
unset($_SESSION["WADbSearch2_results"]);
}
In this instance, there is no pagination