January 25, 2013 at 4:13 pm
I am customizing the shopping_cart.php template to add instructions for users. I am also dynamically adding links (using do_shortcode) to suggest they add related events to their cart,(if the event is not already in the cart) by checking the $results array when the shopping_cart.php is called.
All that is working, except, when they remove a related event from the cart, the section for that event collapses. However, since I am checking for the event ids that are loaded when the shopping_cart.php is first loaded (or refreshed), my link to add the related event that was just removed does not display.
So, if someone accidentally deletes an event and wants to add it back, the link is not displayed because the shopping_cart.php is not called again, the section for that event simply collapses form the form.
So i need to either force a refresh of the page when they delete an event, or somehow hook into the “delete from cart” code to add the “add to cart” link back. Where should I look to find that code?
Any help would be greatly appreciated. Trying to launch this in a couple of days and this is my last sticking point.
Thanks.
|