Skip Navigation

[Resolved] link_to_product_text not working when show_variation_options="yes"

This support ticket is created 5 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)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 5 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1249043

I'm trying to use wpv-woo-buy-or-select for a list of products. i use this shortcode (copy/pasted from another thread)

[wpv-woo-buy-or-select add_to_cart_text="Click me now" link_to_product_text="Click this select button" show_quantity_in_button="yes" show_variation_options="yes"]

as soon as show_variation_options="yes" is set, the buttontext changes to the default woocommerce text. and of course, showing the variations is kind of the point.

I want specifically to choose the variation and amount in the list and then "Click this select button" button to put the selected variation and amount into the cart.

here is a video:
hidden link

i give you access below. the view i'm testing with is "Test Products"

Thanks!

edit: once you are logged in, here is the test-page: hidden link
and here's the view hidden link

#1249157

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - the results you are getting is expected one.

As per the details are given with our Doc:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-buy-or-select

For variable products, the user first has to select a product variation, the Select options button will take the user to the product detail page, where they can select a Variant and add it to the cart.

So, for variable products, you need to display shortcode [wpv-woo-buy-or-select] with attribute show_variation_options="no" .

For example:

[wpv-woo-buy-or-select add_to_cart_text="Click me now" link_to_product_text="Click this select button" show_quantity_in_button="yes" show_variation_options="no"]

That will allow shortcode to display the select button for each variable product and when you click on that it will redirect you to product detail page where you can select your variation and add the product to cart.

#1249549

Hi Minesh! Thanks for your answer.

but sorry, expected or not, this behaviour is not correct 🙂

i guess there is some woocommerce action in there that makes control of the caption on the button difficult. But how would it make sense, that the button does not have the same caption as i define? there shouldn't even be two variables necessary. It simply should be disabled as long as the variation is not chosen by the visitor.

"That will allow shortcode to display the select button for each variable product and when you click on that it will redirect you to product detail page where you can select your variation and add the product to cart."
Well, in this case for example, this is not the desired workflow. the user will never get to a single product page.

i know i got some options, like changing the string in the language file, or changing it via jquery/javascript. but could this be a suggestion to fix this behaviour?

#1250713

Minesh
Supporter

Languages: English (English )

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

Well - which text you want to change? can you please share screenshot?

In addition to that, we can check the product is variable product or simple product by adding custom shortcode that should return boolean value and use that shortcode with Toolset's [wpv-conditional] shortcode and display the [wpv-woo-buy-or-select] shortcode for both variable and simple product.

More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/