Skip Navigation

[Resolved] All variation plugins failed when the Toolset "Add to cart" shortcode is used

This support ticket is created 4 years, 5 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Tagged: 

This topic contains 11 replies, has 3 voices.

Last updated by Minesh 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1360327

Pat

Hello,

On a current site using Toolset and WC, I want to display the variations as a table instead of drop / down.
So, there are some plugins that offer this functionality and I have tried some of them :
- Ni WooCommerce Product Variations Table
- Woo Variations Table

For each of these plugins, as soon as it is enable, the add to cart button disappear and nothing is displayed. Sounds like the Tollset shortcode was not following the WC way of working !

Any idea?
Regards
Pat

#1360401

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Actually - WooCommerce Views integration allows you to create custom templates for single products and the product archive, and provides shortcodes that is you can customize the product page, shop page and product archives.
=> https://toolset.com/documentation/user-guides/getting-started-woocommerce-views/
=> https://toolset.com/home/WooCommerce-views/

So, on product page if you list variation as table it will not have any effect as it needs to be added as form input to know what variation you would like to add to cart without that its not possible. Maybe you should check if you can able to display product variation as table (just to display it) and keep the variation filed as dropdown as well.

#1360405

Pat

Hi Minesh,

Thanks for the feedback.
In fact, this is the second time I'm facing an issue with the Toolset "Add to cart" shortcode. The first one has been reported in this ticket :
https://toolset.com/forums/topic/restrict-buy-button-to-specific-hour-ranges/

So, I'm not sure the way Toolset shortcode is fully compatible with the Woocommerce API.
Is there a way to make sure that we can benefit from all WC add to cart button functionalities with the Toolset shortcode?

Regards
Pat

#1360417

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As a supporter - if there is a way I should have already guided you but WooCommerce Views offers you limited features to customize your product template.
=> https://toolset.com/home/WooCommerce-views/#wcv-product-detail

As shane said with the ticket you shared - you can file feature requests and our Devs will review it:
=> https://toolset.com/forums/topic/restrict-buy-button-to-specific-hour-ranges/#post-1357973

There is nothing much I can offer you here.

#1361207

Pat

Hi Minesh,

This I can understand and I appreciate all that you are doing in terms of support !

Now, I would like to have a better understanding on how the Toolset "Add to cart" shortcode is managed. Even if Views commerce offer limited functionalities, it should ensure that important functions of WC works the same and offer the same compatibility.

Could you ask a 2nd tier supporter to give me some inputs about this, in order to better understand what I can do and what I cannot do with this shortcode?

Regards
Pat

#1361215

Hi Pat,

I'm Mohammed, a third-tier supporter in Toolset.

As per our documentaton:
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-154336
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-buy-options

wpv-woo-buy-options displays the add to cart button in the product details page
wpv-woo-buy-or-select displays the add to cart button in a view/archive that lists products

So, mainly, these shortcodes display the add to cart button with some options that are available from WooCommerce.
We don't customize the behavior of WooCommerce but we make it possible to design your eCommerce website using Toolset.

But, if any of Toolset products cause conflicts with other plugins/themes that affect your website, then, it's or responsibility to fix these conflicts.

I see in the topic description that WooCommerce views conflict with these plugins:
- Ni WooCommerce Product Variations Table
- Woo Variations Table

Can you please guide Minesh on how to reproduce these compatibility issues to be able to fix them if they are from our side?

Thanks.

#1361243

Pat

Hi Mohammed and thanks for taking care.

In fact, this is quite simple to reproduce :
Create a site with Toolset + WC

Add one of the following plugins (I'm sure there are others that could have the same issue):
- Ni WooCommerce Product Variations Table
- Woo Variations Table
- Order Hours Scheduler for WooCommerce

All these plugins work perfectly if you use the WC product page template but if you try to use a Toolset template in which you integrate the "Add to card" single product page shortcode, then, nothing is displayed (ie : on some cases, you should have the add to cart button only, or some other the table with all variations or for the last one, either the add to cart button or a text if you are not in the opening hours) !!!

So, it seems like the Toolset shortcode does not follow the WC way of displaying (perhaps this is due to a hook which is not setup when the Toolset shortcode is used)?

Let me know if you need further info
Regards
Pat

#1362031

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I checked and noticed that when "Ni WooCommerce Product Variations Table" plugin is active if you use default product template it successfully render the variation table but it fails when you set to use woocommerce view's single product template.

I will report this as compatibility issue and let's wait what next-level support says on this issue. However, I would also like to know are you using Layouts to display a single product - correct?

I've also split this ticket to check the issue with Woo Variations Table plugin but for that I need the plugin zip.

Regarding issue with "Order Hours Scheduler for WooCommerce" plugin - I suggest you open a new ticket.

#1364067

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As a workaround, you can copy the WCV single-product.php template file and create a child theme and inside that child theme paste that file.

child-theme/woocommerce/single-product.php

Now, you can make the edits to the template shown above, and then in Toolset > WooCommerce Views choose that edited template for single products.

Please check the following Doc - you need to follow almost the same steps:
=> https://toolset.com/documentation/user-guides/customizing-woocommerce-product-templates-genesis/#copy-woocommerce-views-single-product-php-to-your-themes-woocommerce-folder

You need to add the following line of code to display the variation table:

do_action( 'woocommerce_after_single_product_summary' );
#1364119

Pat

Hi Minesh,

Thanks for your explanations.

If I try to summarize, I need to make a copy of the Woocommerce Views plugin file : single-product.php and place it into a folder of the child theme as described.
Then, I'm not sure to understand where to place the do_action( 'woocommerce_after_single_product_summary' );
Can you explain a little in detail this part?

Thanks
Pat

#1364133

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Please use the following singe-product.php file where I've added the changes with the comment:
=> hidden link

You need to create child theme and place the above shared file as mentioned with the following link:
=> https://toolset.com/documentation/user-guides/customizing-woocommerce-product-templates-genesis/#copy-woocommerce-views-single-product-php-to-your-themes-woocommerce-folder

#1514205

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Please check the workaround shared by our Devs that may be useful for you in order to resolve this issue:
=> https://toolset.com/errata/woocommerce-views-hides-third-party-themes-plugins-elements/

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