Skip Navigation

[Resolved] Split: How to link Events and Products

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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/Karachi (GMT+05:00)

Author
Posts
#1640703

hi there,

I have been working with the above described elements and I need some more help.

So on the website it has to be possible to buy a ticket for the event. So when the host create the event through the frontend template that I created following the above guide, it should also be possible to enter a price and there should be an add to cart button.

I don't know if this means that I need to involve WooCommerce, but I imagine that it does.

So:
The host types in the information about the event including the price.
The template automatically creates a listing / product with an add to cart button, so the customer can buy a ticket.

How do I make this happen?

Thanks 🙂

#1641323

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thanks for asking! I'd be happy to help.

Your understanding is correct and to include the cart and checkout functionality, you'll need an eCommerce plugin like WooCommerce.

To link events and tickets, using only Toolset and WooCommerce plugin's built-in features with minimum need for the customization, you can follow these steps:

1. Your website would already have a post type for "Events" and when you'll activate the WooCommerce plugin you'll also get a post type "Products".

Each ticket for an event can be saved as an individual product post.

2. You'll create a one-to-many post-relationship between "Events" and "Products" so that a single event can be linked to multiple posts.

3. Since a single Toolset post form can only add one post into one post type, you'll need two separate forms for your "Event hosts"

a). The first form will be used to create the "Event" post.

b). The second form will be used to create the "Product" post which will represent the ticket for that event.
( ref: https://toolset.com/learn/create-an-ecommerce-wordpress-site/how-to-create-a-front-end-form-for-adding-woocommerce-products/#adding-the-product-price-field-to-your-form )

4. On the event's template page, you'll be able to show the related tickets (i.e. product posts) and the Event participants/customers will be able to checkout using that product.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1660501

Hi again!
Thanks so much for the detailed guiding!

I tried following your guide and it's great until the part where I have to register the _regular_price field. When I visit the Select Post Type dropdown, select Products and in second dropdown select Include Hidden Fields, then click Apply, I don't see a _regular_price field. I see these:
total_sales
views_woo_in_stock
views_woo_on_sale
views_woo_price
_backorders
_downloadable
_download_expiry
_download_limit
_dt_footer_hide_on_mobile
_dt_footer_show

I just thought I would try using views_woo_price instead but when I complete the register and then move on to Toolset -> Post Forms and open my form again, I can't find an Add Post Fields. Only:
"Post elements"
"Extra elements"
"Generic fields"

This means I can't add Custom Fields, and then select the _regular_price field - which now should be view_woo_price.

Can you please help? Let me know if you need a login.

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