Home › Forums › Ticket Products › Event Tickets Plus › Move the ticket add to cart
- This topic has 7 replies, 3 voices, and was last updated 10 years, 1 month ago by
Brian.
-
AuthorPosts
-
February 12, 2016 at 4:33 am #1071889
rose abel
ParticipantRight now the selection of number of tickets and add to cart is in bottom of right sidebar. We would like it moved to top of sidebar or into content.
February 12, 2016 at 5:18 am #1071899Brian
MemberHi,
Thanks for using our plugins. I can help out here.
We have this guide to moving the Event Tickets form:
https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/
By default we do not have a sidebar and the tickets look like this:
http://wpshindig.com/event/events-tickets-demo/
So I am not sure exactly what hook you would have to use to get it on top of yours.
I can try to help out though.
Thanks
February 12, 2016 at 5:54 am #1071915rose abel
ParticipantThx Brian, UI use the Avada Template, and it seems to have a setup with a sidebar showing details…
Look here
http://dits.ndd.dk/event/dits-10-januar-1000-1300/Im a bit unsure where to change this in Avada template.
February 12, 2016 at 4:06 pm #1072304Brian
MemberOk try that snippet in the guide and see where it moves it and we can go from there to get it where you would like.
Thanks
February 24, 2016 at 2:22 am #1081308Paul
ParticipantHi,
I have tried adding the code at https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/ to my theme’s functions.php file but I get the following error:
Fatal error: Call to undefined function tribe_etp_move_tickets_purchase_form() in C:\wamp\www\cm\wp-content\themes\HotelRugby\functions.php on line 605
Can anyone help? I just want to move the ‘Tickets’ section at the bottom of the right sidebar to the top of the sidebar (http://catthorpemanor.co.uk/event/game-of-groans-murder-mystery-saturday-16th-april/).
Thanks.
Paul
February 24, 2016 at 4:18 am #1081337Brian
MemberHi Paul,
Thanks for posting here. I can certainly help you here, but we can help you better if you create your own topic in the forum, where we can interact with you one on one. Also, we encourage you to post on your own topic because every time we post it will email the author of the topic.
Having said, that did you add all the coding including this function:
/*
* 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 );
}
}
}Cheers
February 24, 2016 at 4:41 am #1081350Paul
ParticipantHi Brian, thanks for the prompt reply. I have added the code above to the theme’s functions.php file and the error code has gone, but the Tickets section is still at the bottom of the sidebar. I’ll create a new topic in the forum so we can communicate one on one.
Regards,
Paul
February 24, 2016 at 5:23 am #1081366Brian
MemberGreat answering there and closing this thread.
-
AuthorPosts
- The topic ‘Move the ticket add to cart’ is closed to new replies.
