Ticket sorting doesn't work

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 4 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37260

    Since updating to Pro 3 the ticket sorting functions don’t seem to be working. Clicking on the sort up/down buttons gives the following in the Console:

    TypeError: b is undefined 2 event-pro.min.js:2:3960

    I have tried to track the error, but with only partial success!

    Looking at the page source code and debug.log, while the tickets returned by the call to eo_get_event_tickets() do include an order.

    [27-Jan-2020 12:22:02 UTC] array (
      718953 =>
      array (
        'order' => 1,
        'name' => 'B&B single occupancy Fri',
        'price' => 49.0,
        'spaces' => 85,
        'from' =>
        DateTime::__set_state(array(
           'date' => '2020-01-31 23:55:00.000000',
           'timezone_type' => 3,
           'timezone' => 'Europe/London',
        )),
        'to' =>
        DateTime::__set_state(array(
           'date' => '2020-06-01 23:55:00.000000',
           'timezone_type' => 3,
           'timezone' => 'Europe/London',
        )),
        'occurrence_ids' =>
        array (
          0 => 2565,
        ),
        'mid' => '718953',
      ),
    

    the tickets output using wp_localize_script in includes/register.php:519 do not:

    var eo = {"tickets":[{"mid":718953,"name":"B&B single occupancy Fri","spaces":85,"price":49,"from":"31-01-2020","to":"01-06-2020","occurrence_ids":[2565],"selected":"24-07-2020","from_time":"23:55","to_time":"23:55"}
    

    The resulting HTML markup shows all tickets as having order 0.

       
        <td class="eo-ticket-cell ticket column-ticket">
            <input type="hidden" value="update" class="eo-ticket-action" name="eventorganiser_pro[ticket][c1][action]">
            <input type="hidden" value="0" class="eo-ticket-order" name="eventorganiser_pro[ticket][c1][order]">
            <input type="hidden" value="718953" class="eo-ticket-id" name="eventorganiser_pro[ticket][c1][ticket_id]"> 
            B&B single occupancy Fri
        </td>
            
        <td class="eo-ticket-cell ticket_spaces column-ticket_spaces">
            85
        </td>
            
        <td class="eo-ticket-cell ticket_price column-ticket_price">
             49
        </td>
    

    As the move_ticket_up / move_ticket_down functions use the order to perform the move, clearly they are going to fail!

    Unfortunately, even if I manually set a ticket order by editing the ticket metadata in the database, it is overwritten back to all tickets having order 0 if the event is subsequently updated.

    I still had an old copy of the pro plugin (v 1.11.15) which I temporarily reverted to on my dev site – reverting allows the ticket sorting to work almost properly – though it still throws a TypeError when trying to move a ticket up to the top position!

    Owen Morris
    #37483

    Hi Owen,

    Thank you for reporting this, it should be fixed in the 3.0.12 update.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 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.