Move the ticket add to cart

Home Forums Ticket Products Event Tickets Plus Move the ticket add to cart

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1071889
    rose abel
    Participant

    Right 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.

    http://dits.ndd.dk/event/dits-10-januar-1000-1300/

    #1071899
    Brian
    Member

    Hi,

    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

    #1071915
    rose abel
    Participant

    Thx 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.

    #1072304
    Brian
    Member

    Ok 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

    #1081308
    Paul
    Participant

    Hi,

    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

    #1081337
    Brian
    Member

    Hi 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

    #1081350
    Paul
    Participant

    Hi 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

    #1081366
    Brian
    Member

    Great answering there and closing this thread.

    Moving 'Tickets' from bottom of sidebar to the top

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Move the ticket add to cart’ is closed to new replies.