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
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.
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?
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.