We’re on EE3 and trying to use your suggestion from the topic “Prerequisite Adult Ticket before Child Ticket Purchase” to enforce a full price adult ticket before adding discounted additional adult tickets or children tickets and that part is working fine. However, while the script automatically adds 1 full price adult ticket to the cart, the cart total at the bottom is initially blank. I tried adding
after the jscript snippet but that just rendered the total as “0.00” instead of blank. How can I get the initial total to reflect that a full price adult ticket is already in the cart?
The quickest option is to just us Javascript to click the Refresh Total button after the above change, so add:
$("#event_espresso_refresh_total").click();
To the script after you’ve set the dropdown to one and removed option 5.
Something like:
<script>jQuery(document).ready(function($){
$("select[name='price_id[1947][2251]'] option[value='0']").remove();
// removes the 0 option for the adult ticket
$("select[name='price_id[1947][2252]'] option[value='5']").remove();
// removes the 5 option for the child ticket
$("#event_espresso_refresh_total").click();
// refresh cart total
});
</script>
Viewing 3 reply threads
The support post ‘Prerequisite Adult Ticket’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.