Single ticket only per order

This topic contains 4 replies, has 2 voices, and was last updated by  Stephen Harris 6 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27397

    Hi Stephen,

    I only sell one ticket per booking. Meaning when there is one or more tickets remaining for sale I would like the ticket amount to be set to 1. In this situation when possible I do not want to let the user change the quanity, but it would friendly to just show the quanity.

    I have taken a look at the posts from May 1, 2017 from Jos and August 1, 2015 for David.
    I am unable to figure out how to make it only one.

    I have been working on the file: eo-ticket-picker.php is this correct?

    enter code here <td class="eo-booking-ticket-qty">
                    <?php  $value = ( isset( $input['tickets'][$ticket_id] ) ? $input['tickets'][$ticket_id] : 0 ); ?>
                    <input type="number"
                        class="<?php echo esc_attr( $this->element->get_class() );?>" 
                        data-eo-ticket-qty="<?php echo esc_attr( $ticket_id );?>" 
                        name="eventorganiser[booking][tickets][<?php echo esc_attr( $ticket_id );?>]" 
                        max="<?php echo $spaces; ?>" style="width:auto;" 
                        min="0" 
                        value="<?php echo esc_attr( $value );?>" />
                    <?php esc_html_e( 'Sold out', 'eventorganiserp' );?>
                </td> 
    

    Thanks.

    Regards,
    Tony

    Tony
    #27411

    Hi, I have been looking at some other options found at this forum, but still. Cannot find quite what I am looking for.
    The way I am selecting the events against date must be blocking the feature “enable simple booking mode”.

    This post is all most what I am looking for: https://wp-event-organiser.com/forums/topic/hide-quantity-of-tickets/
    I have tried the checkbox version that is offered, but the user must still select a ticket. I added checked=”checked” to the checkbox input, but found this didn’t work. When submitting the form a error message requests the ticket quantity to be selected.
    Is it possible have the ticket value set to 1 when the form loads, so the user does not need to make this selection and to still have the total amount of tickets shown just below as it does when manually selecting the quanity.
    If there is away to achieve my wish I would like to know how to do it.

    Many thanks.
    Regards,
    Tony

    Tony
    #27419

    Hi Tony,

    Single booking mode will achieve most of what you’re after (gives them quantity one, for the one available ticket type), but it will not display the selected quantity (since it’s always one).

    Given that the user doesn’t make a selection, you could include this information elsewhere in the booking form. (E.g. adding a HTML element, and putting the the text in there, of it is dynamic, based on the event, use the hook element and render the text in PHP).

    Stephen Harris
    #27427

    Hi Stephen,

    Single booking mode is that the same as “simple booking mode” which I have read somewhere in the online information.
    How do I activate Single booking mode, I am not seeing the options or I am looking in the wrong place.

    Regards,
    Tony

    Tony
    #27437

    Sorry Tony, I meant “Simple Booking Mode”

    You can enable this via the Ticket Picker settings in the booking form customiser (Settings > Event Organiser > Booking Form). Just click the ticket picker field, and that will open the settings panel.

    Please note that it only applies to events which have one ticket type, and – if you are selling by date – is not recurring.

    The feature is documented here: http://docs.wp-event-organiser.com/quick-start/adding-a-simple-rsvp/

    Stephen Harris
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.