• Resolved nicknagle

    (@nicknagle)


    Have the Default ticket to 1 addon installed but still not defaulting to 1
    can you please help or provide the place in code where we can change?

    If we change in code, can we do on a child theme so updates wont take it away?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    It looks like the id and classes in the ticket form markup have been changed since that extension was last updated. I was able to get it working again.

    Replace the contents of tribe-custom.js in the extension with the following:

    (function ($) {
        var container = $('.tribe-events-tickets');
        var block_container = $('#tribe-tickets__tickets-form');
    
        var Tribe_Ticket_Qty = {
            init: function () {
                var self = this;
                // wrapper.find( 'input.tribe-ticket-quantity, .woocommerce .quantity input.qty, .edd.quantity input.edd-input' ).val(1);
                if (container.length) {
                    $inputs = container.find(
                        'input.tribe-tickets-quantity, .woocommerce .quantity input.qty, .edd.quantity input.edd-input'
                    );
                    $inputs.val(1);
                    $inputs.trigger('change');
                }
    
                if (block_container.length) {
                    $inputs = block_container.find(
                        'input.tribe-tickets__tickets-item-quantity-number-input'
                    );
                    $inputs.val(1);
                    $inputs.trigger('change');
                }
            },
        };
    
        $(function () {
            Tribe_Ticket_Qty.init();
        });
    })(jQuery);
    

    Let me know if that helps!

    Best,
    Sky

    Thread Starter nicknagle

    (@nicknagle)

    Hi – Entered this information and it still does not work.

    Thread Starter nicknagle

    (@nicknagle)

    Any more advise or suggestions on this? WooCommerce and Event Tickets +

    Again tried the plug in to default to 1 and tried the code above – neither work.

    Hi again,

    I double checked just now and this works as expected for me. Not sure what you’re doing different, but I’d check to make sure you are copying and pasting all of the code and that you’re putting it in the right file.

    Best,
    Sky

    Thread Starter nicknagle

    (@nicknagle)

    I am not sure either – I have copied this information to the PlugIn Folder for the Default to 1 plugin –

    Not sure why it will still not work.

    Thread Starter nicknagle

    (@nicknagle)

    Ok – so new issue. It shows default 1 now.

    However it does not allow the buy tickets to work – you have to increase by 1 then decrease to allow adding to cart

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Default to 1 plugin not working’ is closed to new replies.