wootickets/tickets.php

Home Forums Ticket Products Event Tickets Plus wootickets/tickets.php

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1109642
    MIKE
    Participant

    I’m designing ticket pages with Visual Composer and I want the ticket sales portion to occur in a specific spot. There’s a lot of content and putting it before or after the content is not an option. Obviously, a component that works with VC would be great! However, in the interim, I’ve attempted to create a shortcode and placed the contents of wootickets/tickets.php within as a hack. This did not work. Is there any means of placing the ticket form exactly where I want it?

    #1109748
    Hunter
    Moderator

    Hey Mike,

    Welcome back and thanks for reaching out. I’ll attempt to provide as much assistance as I can, but please note we are limited on how much support we’re able to provide for theme/plugin support requests.

    We do have an article on how to go about moving the tickets form to different locations on your event pages. Let me know if it helps and have a great week.

    #1109805
    MIKE
    Participant

    Yes, that I’m familiar with. If there’s any chance of inserting the form somewhere in the_content(), that’s really what I’m after.

    #1110023
    Hunter
    Moderator

    Hey Mike,

    You could create a shortcode which are fairly easy to make. Just have that shortcode output Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance()->front_end_tickets_form().

    That’s for WooCommerce of course. But all of the various ticket forms can be called the same way, just change the base class. They all have a front_end_tickets_form() method.

    I hope this helps and best of luck with the customizations. Take care 🙂

    #1110049
    MIKE
    Participant

    Brilliant! Almost there. The form is displaying, but with an error. Here’s my function:

    
    function include_tickets($atts){
    	Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance()->front_end_tickets_form();
    }
    add_shortcode( 'tickets', 'include_tickets' );
    

    Returns the follow error message above the ticket form. The ticket form works perfectly.

    Missing argument 1 for Tribe__Tickets_Plus__Commerce__WooCommerce__Main::front_end_tickets_form() in my functions.php on line ### defined in /home/adgeahos/public_html/events/wp-content/plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php on line 937

    #1110693
    Hunter
    Moderator

    Hello,

    Glad to hear you’re headed in the right direction. You could send an empty string in, ie ...->front_end_tickets_form( '' );

    One other thing is it looks like that shortcode function will echo the form straightaway – with a shortcode you generally should return the string.

    I do want to point out that these types of support requests are outside the scope of support we’re able to provide, so you’ll have to take the reigns from here. Good luck getting it all squared away and have a great upcoming weekend!

    #1110721
    MIKE
    Participant

    Well, for being outside the scope, you guys nailed it! The empty string did the trick and now I have a solution for putting the ticket form anywhere I want. Thanks guys for all the help and have a great week!

    #1111049
    Hunter
    Moderator

    Thanks for the positive response and we’re more than happy to help when we have the resources. I’m glad to hear you’re all set and I’ll close this thread out. Please feel free to open a new one should anything else come up. Have a good weekend!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘wootickets/tickets.php’ is closed to new replies.