Skip Navigation

[Resolved] Transferring fields to new Product Template using new Blocks

This support ticket is created 4 years, 9 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.

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)

This topic contains 5 replies, has 2 voices.

Last updated by GinaM9227 4 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1585939
registration.jpg
registration2.jpg

Tell us what you are trying to do?
I am re-creating the Product Template using the new Blocks and there are some fields from woo and 3rd parties that I do not now to pull. Do I need to use short code or is there a way with Blocks?

Is there any documentation that you are following?
Please see attached the screenshot of the existing Custom Template for products, it includes the Registration fields that are generated by 3rd party plugin (Yith Tickets). However on the Old template it shows as [wpv-woo-buy-options].

Is there a similar example that we can see? See attached what it's supposed to look like and the short code from the Old Template.

What is the link to your site? hidden link

#1586271

Hi Gina,

Thank you for contacting us and I'd be happy to assist.

Before answering your specific question, I feel it would be useful to share a summary of the relationship between the new Blocks editor and third-party plugins/themes.

The new blocks based editor "Gutenberg" was introduced by WordPress:
https://wordpress.org/gutenberg/

Toolset and other third-party plugins/themes are also continuously extending that editor to include their own functionality blocks.

For example, when Toolset plugins are active, you'll see their respective blocks in the list of the available blocks.
Screenshot: hidden link

Based on this, the core idea remains the same, irrespective of the plugins/themes. If for any plugin or theme's specific functionality, a block is available, it can be used.

However, if a direct block is not available, then the older/existing method of using a respective shortcode can still be used for the same.

As for the "wpv-woo-buy-options" shortcode ( https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-woo-buy-options ), it shows the "Add to cart" functionality from the WooCommerce plugin.

If that shortcode is showing registration fields from the "Yith Tickets" plugin in your template, then it means that this plugin filters the default "Add to cart" functionality from the WooCommerce plugin to include a registration form. And it should work the same whether you're using a classic editor or a blocks editor.

Note: For most accurate and up-to-date information regarding a third-party plugin/theme, we recommend consulting its official support and documentation.

I hope this explanation helps.

regards,
Waqar

#1586667

Hi, I tried to use the short code on the old template [wpv-woo-buy-options] and the output on the front end did not look anything like what I had?

Why is it that that code is working on the Old Template but I am not able to transfer it to the new template using Toolset Blocks. How can I work around it?

Thank you

#1586677
woo_buy.png
woo_buy2.jpg

In fact, once I enter that short code on the front end, it only shows Add To Chart but none of the Registration Fields that were in the old template. See attached - why is it not working now and it worked before..

#1587855

Thanks for writing back.

From the Toolset's side, the shortcode "wpv-woo-buy-options" shortcode should work the same whether it is in a classic editor or a blocks editor.

Here is a workaround that you can try:

1. Please create a new content template using the classic editor and insert the "wpv-woo-buy-options" shortcode in that.

2. Next, in your actual product template that is using the blocks editor, you can insert the shortcode to call that new template with shortcode "wpv-post-body":
( ref: https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-post-body )


[wpv-post-body view_template="slug-of-the-new-ct"]

Note: Please replace "slug-of-the-new-ct" with the actual slug of this new content template.

I hope this helps and in case the registration form is still not included with the add to cart button, then it would be best to get in touch with the "Yith Tickets" plugin's support team.

#1588355

My issue is resolved now. Thank you!