Hi Pasmith
Sorry to be a bit slow, I hope you solved it, but if not ...
I can't be sure what is wrong with your setup, but your guess that it is to do with the max quantity would be my guess too.
The mod first adds the edited product as a new product, so that you have two items in your cart. Provided there was no error in doing so, it then deletes the original item. Leaving you with just one product.
If however the new product could not be added, but no error was thrown, then the old product would be deleted leaving nothing in the cart.
Have you tried removing the max product quantity restriction? If you do this and it works, you could just leave it like that. But if that is not satisfactory, I would change
Code:
if ((zen_get_products_quantity_order_max($_POST['products_id']) == 1 and $_SESSION['cart']->in_cart_mixed($_POST['products_id']) == 1)) {
to
Code:
if ((zen_get_products_quantity_order_max($_POST['products_id']) == 1 and $_SESSION['cart']->in_cart_mixed($_POST['products_id']) == 2)) {
or if you are feeling particularly bold
change it to
since this code was copied from the standard add_to_cart action, but is only called when editing a product, so in actual fact is redundant.
There may be other places that you need to change. If this is all above your head, I can have a look at it for you, but please try it out for yourself first.
Good luck
J
Bookmarks