Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Number of attendees set to 0 by default | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Number of attendees set to 0 by default

Number of attendees set to 0 by default

Posted: January 17, 2014 at 5:26 pm

Viewing 3 reply threads


Robin Nicholl

January 17, 2014 at 5:26 pm

It doesn’t make sense that, when a user has clicked ‘Add to cart’, the quantity for that item is 0 by default when the cart is viewed. How can I change this so it defaults to 1?

Also, because I am only allowing one registration per event, I would like to remove/hide the ‘Attendee 1’ headings that appear on the checkout/registrant details page, as this is superfluous.

Thanks


Sidney Harrell

  • Support Staff

January 17, 2014 at 5:50 pm

In includes/functions/cart.php change line 1236 to be:

$att_qty = empty($_SESSION['espresso_session']['events_in_session'][$event_id]['price_id'][$result->id]['attendee_quantity']) ? '1' : $_SESSION['espresso_session']['events_in_session'][$event_id]['price_id'][$result->id]['attendee_quantity'];

If you have 2 or more prices on an event, however, then the dropdown for each price will default to 1 as well. That’s why they default to 0.
In the file templates/multi_registration_page.php, comment out line 75:

echo '<h3 class="section-heading">' . __('Attendee ', 'event_espresso') . $attendee_number . '</h3>';


Robin Nicholl

January 20, 2014 at 8:34 am

Thanks, Sidney. This works great… except that when you first view the cart, the total is blank (e.g. ‘Total £’) until/unless you click the ‘Refresh Total’ button. Is there anywhere I can call the javascript EECART.calculate_total() when the cart page is first loaded?


Dean

  • Support Staff

January 21, 2014 at 4:32 am

Hi Robin,

An alternative would be this thread which uses JavaScript to achieve what you are after http://staging.eventespresso.com/topic/set-minimum-attendees-at-1-not-0-mulitple-registration/

Viewing 3 reply threads

The support post ‘Number of attendees set to 0 by default’ 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 - Staging Server