Skip Navigation

[Resolved] Buttons added by 3rd-party plugins in views or layouts

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 thread is resolved. Here is a description of the problem and solution.

Problem:
1. How do I get the 3rd party Plugin Button to show on the Toolset woocommerce views product and archive templates (no shortcodes are provided for button by 3rd party plugin)?

2. Alternatively, using only the standard woocommerce template files, how do I get Toolset types/custom fields to show in the standard woocommerce template?

Solution:
1. The 3rd party Plugin Plugin should provide a shortcode or someway to display its button in a page or view, this is very common thing and usually comes with each plugin you can refer to documentation of the plugin or ask that plugin author. Other way is to create a custom shortcode so that it can be used in WP Pages or Views or anywhere within site.

2. You can show Types fields into php code using API, examples are given here as well for each field type:
https://toolset.com/documentation/customizing-sites-using-php/functions/

- WooCommerce Views shortcodes are given here, you can use them in the Views or in PHP template file as well: https://toolset.com/documentation/user-guides/views-shortcodes/

- For example to use this WC Views shortcode [wpv-woo-display-tabs] you will need to add it using do_shortcode function, something like this:

<?php echo do_shortcode( '[wpv-woo-display-tabs]' ); ?>

Relevant Documentation:
https://developer.wordpress.org/reference/functions/do_shortcode/

This support ticket is created 6 years, 9 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Cec1413 6 years, 9 months ago.

Assisted by: Noman.

Author
Posts
#547752
Screen Shot 2017-07-12 at 2.36.37 PM.png

I am trying to: Figure out how to keep 3rd-party plugin elements on the frontend (woocommerce product and archive templates) while using views, content templatess or layouts

The main issue is that I have a woocommerce plugin to add items to wishlists and another to allow users to add products to an enquiry list (add button below product thumbnail on shop listings, as well as on single product pages) - see the first image attached.
Scenario 1 - Upon setting up toolset with layouts for woocommerce, these elements disappear, and I can't figure out how to get them to show up. There are no shortcodes either.
Scenario 2 - If i disable layouts and content templates and set toolset to use the default woocommerce template files, then i get the 3rd-party plugins' elements, but now, the issue is displaying custom fields and terms.

How can I stick to the default woocommerce templates thus retaining 3rd-party plugin frontend elements, while still displaying custom field and taxonomy data in the single product and product listings pages?

#547797

Noman
Supporter

Languages: English (English )

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

WooCommerce Views Settings.png
Load non Types custom fields.jpg

Hi,

Thank you for contacting Toolset support.

1. You can use Toolset WooCommerce Views plugin to modify WooCommerce Archive and product pages. Please download WooCommerce Views plugin from your account:
https://toolset.com/download/toolset-woocommerce-views/

2. After that go to your Content Template >> use Filed and Views button >> there you will find a button called “Load non-Types custom fields” >> click on it >> it will show all 3rd party custom fields that you can insert into the template, please see attached screenshot.

Below are the links for “WooCommerce Views initial setup & guideline. Please make sure to follow the “WooCommerce Views initial setup” process completely as explained in this doc and please see attached screenshot:
https://toolset.com/documentation/user-guides/getting-started-woocommerce-views/

- For main Shop page (Archive page / products listing page):
https://toolset.com/learn/create-an-ecommerce-wordpress-site/designing-woocommerce-product-catalog/

- For Single Product page:
https://toolset.com/learn/create-an-ecommerce-wordpress-site/single-product/

Thank you

#547935

Thanks for the links, Noman, but I've already got the steps you mentioned sorted. What I'm faced with is the interoperability of toolset components with the php code of other plugins/themes applied to standard woocommerce templates. Also, the 3rd-party elements are buttons and not custom fields.
I'll elaborate again:
a. Plugin A calls a function that displays a Button on standard Woocommerce single product template.
b. Toolset replaces standard Woocommerce single product template with Toolset single product template.

Q1. How do I get the Plugin A button to show on the Toolset template (no shortcodes)?
Q2. Alternatively, using only the standard woocommerce template files, how do I get Toolset types/custom fields to show in the standard woocommerce template?

I hope my issue has been made clearer.

#548001

Noman
Supporter

Languages: English (English )

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

1. The Plugin A should provide a shortcode or someway to display its button in a page or view, this is very common thing and usually comes with each plugin you can refer to documentation of the plugin or ask that plugin author. Other way is to create a custom shortcode so that it can be used in WP Pages or Views or anywhere within site.

2. You can show Types fields into php code using API, examples are given here as well for each field type:
https://toolset.com/documentation/customizing-sites-using-php/functions/

- WooCommerce Views shortcodes are given here, you can use them in the Views or in PHP template file as well: https://toolset.com/documentation/user-guides/views-shortcodes/

- For example to use this WC Views shortcode [wpv-woo-display-tabs] you will need to add it using do_shortcode function, something like this:

<?php echo do_shortcode( '[wpv-woo-display-tabs]' ); ?>

Doc: https://developer.wordpress.org/reference/functions/do_shortcode/

Thank you

#548074

Thanks, Noman. The links and references you provided are helpful. I do agree that plugins should include shortcodes, but I guess that's not always going to be the case for some developers.
My best option seems to be modifying the WC single product template to rend Types data.

Have a great day.
C.

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.