Problem with removing item from cart
-
Hi, I know it’s kind of a recurring topic but other solutions I have found do not seem to apply to my case.
95% of the time I am not able to remove items from the cart on the cart page (using ajax) on one of my sites. I do not use caching (varnish is off on the server, no caching plugins) because every time I’ve tried, I had numerous problems.
It seems to be a session issue but I am having trouble figuring out the culprit. Below is a log extract where you can see the remove_cart_item function being called, the item being removed from the cart, but then when set_session is called, the cart total is back to 25 and the cart is not empty anymore:
[29-Jun-2018 20:18:39 UTC] remove_cart_item [29-Jun-2018 20:18:39 UTC] set_session [29-Jun-2018 20:18:39 UTC] ... total = 0 [29-Jun-2018 20:18:39 UTC] get_cart_for_session [29-Jun-2018 20:18:39 UTC] ... total 0 [29-Jun-2018 20:18:39 UTC] ... get_calling_function_name = get_cart_for_session => set_session => calculate_totals => apply_filters => do_action => do_action => remove_cart_item => update_cart_action => apply_filters => do_action [29-Jun-2018 20:18:39 UTC] persistent_cart_update [29-Jun-2018 20:18:39 UTC] ... updating [29-Jun-2018 20:18:39 UTC] get_cart_for_session [29-Jun-2018 20:18:39 UTC] ... total 0 [29-Jun-2018 20:18:39 UTC] ... get_calling_function_name = get_cart_for_session => persistent_cart_update => apply_filters => do_action => do_action => set_session => calculate_totals => apply_filters => do_action => do_action [29-Jun-2018 20:18:39 UTC] set_session [29-Jun-2018 20:18:39 UTC] ... total = 25.00 [29-Jun-2018 20:18:39 UTC] get_cart_for_session [29-Jun-2018 20:18:39 UTC] ... total 25.00 [29-Jun-2018 20:18:39 UTC] ... get_calling_function_name = get_cart_for_session => set_session => apply_filters => do_action => do_action => calculate_totals => get_cart_from_session => apply_filters => do_action => do_action [29-Jun-2018 20:18:39 UTC] ... key = e82d1ab455aad7057ffcc0ea799eb4e3If someone could tell me how to go about debugging session issues, that would be tremendously helpful. Thank you!
The topic ‘Problem with removing item from cart’ is closed to new replies.