Home › Forums › Ticket Products › Event Tickets Plus › Add ticket form to Map view
- This topic has 8 replies, 3 voices, and was last updated 9 years, 9 months ago by
Josh.
-
AuthorPosts
-
July 16, 2016 at 9:03 pm #1140828
Ben
ParticipantHi there,
I have tried a number of times to follow the thread here to add either an Add To Cart button or ticket form to the event list in the Map view.
No idea what I’m doing wrong (I’ve tried every way possible!), but if you could please break out the steps in the previous thread a little more, that would be great.
Thanks!
Ben.
July 18, 2016 at 5:06 pm #1141258Josh
ParticipantHey Ben,
Thanks for reaching out to us!
I do want to reiterate what Geoff mentioned in the associated thread about our limitations when it comes to customizations such as these, however let me see if I can add a little bit of clarity to the suggestion provided there.
When following the Themer’s Guide, you’ll want to look in the views folder of our Pro plugin and copy the map > single-event.php file into your theme at your theme > tribe-events > map > single-event.php.
From there, you can add the function to output the ticket form for the associated events in that view.
Let me know if this helps.
Thanks!
July 18, 2016 at 5:25 pm #1141266Josh
ParticipantHey Ben,
Following up here, he function for adding the ticket is probably what is causing the hiccup. With the latest versions, there are particular ways the ticket form would be called depending on the ecommerce plugin that you’re using.
For example, if you’re using WooCommerce, the call would look like
if (class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) { $ticket_form = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); $ticket_form->front_end_tickets_form(); }Thanks!
July 19, 2016 at 3:22 pm #1141712Ben
ParticipantHi Josh,
Thanks so much – that code has worked a charm!
I’m probably pushing the friendship boundaries, but I just have another question to get the listings just right.
Using the code you provided and a few further customisations, I have got this far in the listing view (see Screen Shot attached). I’d like to achieve something like the other attachment (Picture1.jpg). As such, I want to remove the quantity selection field (as I’m trying to get the site to only allow one event/product to be selected and added to the cart) and move the ‘Add to cart’ (or SELECT button now I’ve amended the label) to the right of the table where the price usually lives.
Is this possible? It seems I can’t simply remove the quantity selection field in the code.
Thanks! The plugin and support is ace by the way. 🙂 A very happy customer thus far.
Ben.
July 19, 2016 at 3:23 pm #1141715Ben
ParticipantAnd here’s the attachments…
July 21, 2016 at 7:30 am #1142381Josh
ParticipantHey Ben,
The simplest approach here would be to follow the Themer’s Guide and copy the Event Plus > src > views > wootickets > tickets.php form into your theme and you can then delete the quantity field there.
From there, the other adjustments would be CSS adjustments that you can make within your child theme stylesheet to get the layouts that you would like.
Let me know if this helps.
Thanks!
July 21, 2016 at 12:21 pm #1142640Ben
ParticipantThanks Josh – that’s awesome. Cheers again for all your help!
July 22, 2016 at 5:47 am #1142890Josh
ParticipantHey Ben,
No problem. Happy to help!
I’ll go ahead and close this thread for now. If you have any further questions, please don’t hesitate to open a new one.
Thanks!
-
AuthorPosts
- The topic ‘Add ticket form to Map view’ is closed to new replies.
