Forum Replies Created
-
AuthorPosts
-
April 13, 2016 at 11:28 am in reply to: Events Calendar / Events Calendar PRO is preventing media uploads #1102085Matt GrayParticipant
Hey, still the same I’m afraid… but just saying HTTP error now?
Any other ideas?
Cheers
April 12, 2016 at 3:53 am in reply to: Events Calendar / Events Calendar PRO is preventing media uploads #1101221Matt GrayParticipantThis reply is private.
Matt GrayParticipantHi Barry,
This was added into Theme Options -> General:
<script> jQuery( document ).ready( function() { jQuery( tribe_ev.events ).on( 'tribe_ev_ajaxSuccess', function() { console.log("trigger"); var jQuerytestProp = jQuery( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).find( 'qty' ); if ( jQuerytestProp && jQuerytestProp.prop( 'type' ) != 'date' ) { // Quantity buttons jQuery( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).addClass( 'buttons_added' ).append( '<input type="button" value="+" class="plus" />' ).prepend( '<input type="button" value="-" class="minus" />' ); // Target quantity inputs on product pages jQuery( 'input.qty:not(.product-quantity input.qty)' ).each( function() { var min = parseFloat( jQuery( this ).attr( 'min' ) ); if ( min && min > 0 && parseFloat( jQuery( this ).val() ) < min ) { jQuery( this ).val( min ); } } ); jQuery( document ).on( 'click', '.plus, .minus', function() { // Get values var jQueryqty = jQuery( this ).closest( '.quantity' ).find( '.qty' ), currentVal = parseFloat( jQueryqty.val() ), max = parseFloat( jQueryqty.attr( 'max' ) ), min = parseFloat( jQueryqty.attr( 'min' ) ), step = jQueryqty.attr( 'step' ); // Format values if ( !currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0; if ( max === '' || max === 'NaN' ) max = ''; if ( min === '' || min === 'NaN' ) min = 0; if ( step === 'any' || step === '' || step === undefined || parseFloat( step ) === 'NaN' ) step = 1; // Change the value if ( jQuery( this ).is( '.plus' ) ) { if ( max && ( max == currentVal || currentVal > max ) ) { jQueryqty.val( max ); } else { jQueryqty.val( currentVal + parseFloat( step ) ); } } else { if ( min && ( min == currentVal || currentVal < min ) ) { jQueryqty.val( min ); } else if ( currentVal > 0 ) { jQueryqty.val( currentVal - parseFloat( step ) ); } } // Trigger change event jQueryqty.trigger( 'change' ); } ); } } ); } ); </script>
And now it works again!
Thanks for your help…
Matt GrayParticipantHi Barry,
That’s very helpful – thanks…
I’ve raised it with the Avada team too and passed on your comments – I’ll let you know what they come back with.
Alternatively, does the Events plugin have a non-AJAX version if I can’t find a solution?
Cheers,
MattMatt GrayParticipantHey,
It doesn’t show up at all on the default theme, as the tickets form is only generated through a file in my Avada child theme…
Changing the date twice is working for me, but just the ticket -/+ that isn’t…
Cheers,
MattMatt GrayParticipantHey,
No I’m afraid that’s not quite right… what it’s trying to do is remove it from the sidebar, then add it to the single event page under the content (http://aquaphysical.mattgraydesign.co.uk/class/cheshire-lido-manchester) AND the listing of the events as well (http://aquaphysical.mattgraydesign.co.uk/classes/category/floatfit-classes)
It currently moves the form to both the correct places, but fails to remove it from the sidebar under the meta…
Thanks!
MattMatt GrayParticipantAmazing – that works perfectly, and far neater than the direction I was going down before…
Thanks for that – much appreciated!
Cheers,
MattMatt GrayParticipantOh sorry – didn’t realise.
If you could try, that’d be great please…
I’m not too au fait with creating functions, so if you could just give me a block of code to copy/paste in to my functions.php that’d be much appreciated!
Thanks v much,
MattMatt GrayParticipantThis reply is private.
Matt GrayParticipantThanks… the need is that I want people to be able to buy directly from the list page as well as from the individual event.
Currently it’s moved from the sidebar to the list view only, but I can’t work out how to have it on the archive as well as on the single page view.
i.e.
Shows here: http://aquaphysical.mattgraydesign.co.uk/classes/category/floatfit-classes
But not here: http://aquaphysical.mattgraydesign.co.uk/class/cheshire-lido-manchesterCan it be on both?
Currently this is what I have added:
/* * Moves the front-end ticket purchase form, accepts WP action/hook and optional hook priority * * @param $ticket_location_action WP Action/hook to display the ticket form at * @param $ticket_location_priority Priority for the WP Action */ function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) { $etp_classes = array( 'Tribe__Tickets_Plus__Commerce__EDD__Main', // 'Tribe__Tickets_Plus__Commerce__Shopp__Main', // As of ETP v4.0 Shopp will generate errors when referenced, if not active. Uncomment this line if you have Shopp Active 'Tribe__Tickets_Plus__Commerce__WPEC__Main', 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ); foreach ( $etp_classes as $ticket_class ) { if ( ! class_exists( $ticket_class ) ) break; $form_display_function = array( $ticket_class::get_instance(), 'front_end_tickets_form' ); if ( has_action ( 'tribe_events_single_event_after_the_meta', $form_display_function ) ) { remove_action( 'tribe_events_single_event_after_the_meta', $form_display_function, 5 ); add_action( $ticket_location_action, $form_display_function, $ticket_location_priority ); } } } /* * TO MOVE THE TICKET FORM UNCOMMENT ONE OF THE FOLLOWING BY REMOVING THE // */ /* * Uncomment to Move Ticket Form Below Related Events */ //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_after_the_meta', 20 ); /* * Uncomment to Move Ticket Form Below the Event Description */ tribe_etp_move_tickets_purchase_form( 'tribe_events_after_the_content', 5 ); /* * Uncomment to Move Ticket Form Above the Event Description */ //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_before_the_content' );
Uncommenting a second line doesn’t allow it to show in both places…
Thanks,
MattMatt GrayParticipantHi Josh,
Thanks for helping – makes sense RE shortcode.Back to the moving of the ticket form, it’s successfully moved here: http://aquaphysical.mattgraydesign.co.uk/classes/category/floatfit-classes
But I need it on the single page as well…
How do you successfully move it to these two places?
tribe_etp_move_tickets_purchase_form( 'tribe_events_after_the_content', 5 );
tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_after_the_content', 5 );
It’s only doing either/or at the moment?
Thanks,
MattMatt GrayParticipantIn fact, that did work – thanks!
I was looking at an event without a ticket… stupid me!
Where’s the template to change what’s displayed in the ticket form, and can this be different in different places that it’s placed?
I also have a shortcode displaying top 3 events here: http://new.aquaphysical.com/floatfit
How would I add it there too, or would you suggest just using the Events PRO shortcode instead of the one provided with Avada template?
Cheers,
MattMatt GrayParticipantHi Josh,
Thanks for your reply – sorry I’m not particularly au fait with how this works – could you spell it out a bit more please?
I tried changing it to this, but it didn’t work?
tribe_etp_move_tickets_purchase_form( 'tribe_events_after_the_content', 5 );
I want it to end up on the list view please…
Thanks again,
Matt -
AuthorPosts