Okay
  Public Ticket #1995256
Problem with overbooked event
Closed

Comments

  • tomiwarti started the conversation

    Hello,


    We have a problem with the booking on the event When event is full:

    1. there is no change on the event, no message or anything showing people that it's complete ! it should be showed on the global view (grid view, month view, list view...) AND/OR should be showed when the event is clicked on.

    2. When visitor wants to register if it's full, he cannot choose the ticket, the dropdown 


    Bonus question that might be very helpful for our visitors:

    - is it possible to have auto value in the number of ticket to 1 ? (people usually take only one ticket and it makes a lot of clicks)

    - Is it possible to have auto filled choice for the ticket, because we use 1 ticket by event, and there is no choice, it's useless to have the dropdown and would be easier for visitors to have it auto filled !

    -----------

    More info, with the lack of customization on your plugin I've had to hide a lot of fields through CSS, here is my custom CSS, in case it comes from my mishandeling: (By the way you could have checkboxes for these options)

    .button-stroke .list .portfolio-item .list_style_header { min-height: 51px; }

    .post-meta{
    display:none;}

    .stec-style-float-left {
        font-size: 64px;
    }

    .stec-layout-single-export{
    display:none;}

    .stec-form-booking-add-to-cart{
        zoom:1.2;
    }

    .stec-layout-grid .stec-layout-grid-event.stec-has-guests .stec-layout-grid-has-guests .stec-layout-grid-guest-name{
    display:none;}
    .stec-layout-grid .stec-layout-grid-event.stec-has-guests .stec-layout-grid-has-guests{
    display:none;}

    .stec-layout-grid .stec-layout-grid-event .stec-layout-grid-has-guests .stec-layout-grid-guest{
    display:none;}

    .stec-layout-grid .stec-layout-grid-event.stec-has-products .stec-layout-grid-has-products{
    display:none;}

    .stec-layout-grid-date{
        font-color: #000000
    }

    body .stec-layout-grid .stec-layout-grid-event span:not(.stec-layout-grid-event-short-desc){
    color: #212121;
    }

    .stec-style-float-left{
        zoom:2;
    align:center;
    }

    .stec-layout-single-preview .stec-layout-single-preview-right{
    display:none;}

    body .stec-layout-single-preview{
    display:none;}


  •  785
    Zhivko replied

    Hi,

    We'll be redesigning the whole booking section in future update in order to improve the user experience.

    Meanwhile open your theme functions.php file and at the bottom add following code:

    add_action('wp_footer', function() {
        ?>
        <script type="text/javascript">
            (function ($) {
                $('.stec').on('onEventToggleOpen', function (e,m) {
                    
                    var $th = $(this).find('.stec-layout-event.active');
                    
                    var items = m.event.bookable_products;
                    var disabled = true;
                    
                    $.each(items, function (){
                        if (this.is_in_stock === true) {
                            disabled = false;
                        }
                    });
                    
                    // If tickets are out of stock
                    // show notice the event is full
                    if (true === disabled) {
                        $th.find('.stec-form-booking').html('<p class="stec-booking-full-notice">Event is full</p>');
                        return;
                    }
                    
                    // Preselect ticket values (date, ticket, quantity)
                    setTimeout(function () {
                        $th.find('select[name="stec_book_date"]').prop("selectedIndex", 1);
                        $th.find('select[name="stec_book_item"]').prop("selectedIndex", 1);
                        $th.find('input[name="stec_book_quantity"]').val(1); // optional set quantity to 1
                    });
                });
            })(jQuery);
        </script>
        <?php
    });

    This will insert notice if the booking is full and will predefine selectors such as item quantity.


    Stachethemes Developer

  • tomiwarti replied

    Thank you for your reply. 

    Is there anyway to display the number of tickets left for an event on the calendar/grid view? 

    That would help us a lot. 

  •  785
    Zhivko replied

    Tickets left will be something we'll add for sure.


    Stachethemes Developer