Skip Navigation

[Resolved] Add to cart button function for event tickets plus

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#542738

I hope someone can help me and I hope I can explain the problem I have.
I am running The Events Calendar Pro plugin and when the user clicks on an event on the calendar it goes to a single event page that dynamically populates. I am using a views content template to for the single event page. I've managed to get it to display times, location etc by using the add_shortcode and adding this to my functions.php

For example.

add_shortcode('venue-address', 'venue_address_shortcode');
function venue_address_shortcode() {
  global $post;
  return tribe_get_address( $post  );
}

and then adding [venue-address] to the single event content template.

I am also running event ticket plus plugin which is an addon to the events calendar pro plugin. Some of the events are paid events so you can setup tickets which are then listed as woocoommerce products. Only the ticket is a woocommerce product and not the event itself. The events sit away from the woocommerce products custom post type in a tribe events CPT but it linked to the relevant ticket woocommerce product (ticket). I can't work out how to add a 'add to cart' button / function for events that have tickets within the views content template. I've tried various tribe functions that are listed on their site but no joy.

Along with events the other part of the site is listing a number of courses that are on offer. I use the woocommerce products CPT for this and again use a views content template for the single course view. All courses are paid for and I have added a 'add to cart' button within single course content template and that works perfectly.

I am not a programmer but over the last few months I have got my head round a fair chunk of wptoolset but I've now come to a grinding halt with this problem.

I have been trying to find a similar problem within the forum and this is the nearest I can see.

https://toolset.com/forums/topic/woocommerce-views-doesnt-display-add-to-cart-on-composite-products/

I do hope someone can help me as I have got a client who is running out of patience!

If anyone needs anything explained a bit better then please do get in touch.

Many thanks
Mark

#542854

Dear Mark,

For the question:
I can't work out how to add a 'add to cart' button / function for events that have tickets within the views content template.

There are two 'add to cart' button shortcodes within Woocommerce Views plugin:
1) [wpv-woo-buy-or-select]
This shortcode outputs the Add to cart button for the product listing page.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-buy-or-select

2) [wpv-woo-buy-options]
This shortcode outputs the Add to cart button on the Product detail pages for simple products.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-buy-options

None of them can work in a single event page, so there isn't such a built-in feature within Toolset plugins, I suggest you check it with the author of plugin "event ticket plus plugin", ask how do they setup the relationships between post types "event" and "product", for example, if the relationships are based on custom fields, you can try these:
In the single "event" post, Setup a view to list related products post, in the view's loop, display the shortcode [wpv-woo-buy-or-select]

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.