Support

Home Forums Event Espresso Premium Cart ticket dropdown defaults to 0

Cart ticket dropdown defaults to 0

Posted: February 22, 2013 at 2:18 pm


idc2013

February 22, 2013 at 2:18 pm

If someone adds items to the cart, and then proceeds to the cart, the ticket dropdown defaults to 0 for each item. Is it possible to have this default to 1 so they don’t have to go through the process a second time… plus it throws an error if they proceed to the next step without selecting from this dropdown.. people are getting confused.
Thanks.


Josh

  • Support Staff

February 22, 2013 at 2:29 pm

Hi there, It is set to zero to allow people to choose one price option over another. For example, if an event has three prices and they have the default set to 1, people would have to set the selector back to 0 to de-select the price type selections they do not want.


idc2013

February 22, 2013 at 3:21 pm

Thanks Josh, we’re only using one price type for each event so is this supposed to still show up?


Josh

  • Support Staff

February 25, 2013 at 9:45 am

Hi there,

You can change the default behavior of the ticket dropdown with a bit of jQuery. For example, you can open up /templates/shopping_cart.php and add this code just below the closing form tag:

<script>jQuery(document).ready(function(){
    jQuery(".price_id").val(1);
    jQuery('#event_espresso_refresh_total').trigger('click');
});
</script>

What this will do is change the default price selector to 1 and then trigger a refresh so that the price updates automatically.


idc2013

February 25, 2013 at 10:57 am

great solution, i should have considered that. Thanks!

The support post ‘Cart ticket dropdown defaults to 0’ 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.

Event Espresso