Re-configuring my webshop for next years’ event, I am faced with an old problem. Having a little more time this time, I am having another go at trying to fix it. The situation is as follows:
As I’m selling both tickets and merchandise through the system (as separate events), users buy these products by clicking a link that adds all the available items to the cart. By customizing the event_espresso_multi_qty_dd-function (in /includes/functions/cart.php, current release around ll. 937 – 964), I have configured the dropdown-menu’s to start at one. This prevents people from getting the ‘select number of attendees’-error when they, instead of removing the item from their cart, select 0 attendees. This works fine.
Problem is that when users are redirected to this page (using the ESPRESSO_CART_LINK-shortcode), the grand total at the bottom of the cart shows 0. I would either
a) like to set a default value for that output; or
b) update the value / force a refresh on page load.
Instead of hacking the function, you can use jQuery to accomplish what you’re looking to do. Here is some example jQuery that can be added to the shopping_cart.php template:
The support post ‘Zero total price when cart loads’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.