This will involve adding some code just after the closing </form> tag in Event Espresso 3’s shopping_cart.php template. Example code follows:
<script>jQuery(document).ready(function(){
jQuery(".price_id").val(1).hide();
jQuery('#event_espresso_refresh_total').trigger('click');
});
</script>
// change it to 1
<script>jQuery(document).ready(function(){
jQuery('.price_id').first().find('option').remove().end().append('<option selected="selected" value="1">1</option>').val(1);
jQuery('.price_id').last().find('option:last').remove();
jQuery('#event_espresso_refresh_total').trigger('click');
});
</script>
As always, if you make a change in a template that’s within the plugin’s folder, the change will be lost when you update. You can avoid this by copying the modified template over to /wp-content/uploads/espresso/templates. There is more information about customizing templates in Event Espresso 3 here:
The support post ‘Auto-populate 1 attendee in registration’ 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.