Sorry this is not possible. It's because WooCommerce Views relies on default WooCommerce plugin functionality for displaying variation products on listing pages like search results. By default, WooCommerce don't show relevant options but only displays a link to the product page (see screenshot) for users to see in details/select. WooCommerce Views follows this principle for display, since our shortcodes like the add to cart are calling native WooCommerce core functions.
There is already a feature suggestion under discussion for WooCommerce regarding this: hidden link
Please let me know if you have some other questions. 🙂 Thanks.
I found another potential solution to this issue, I removed my view and modified this code and it functioned the way I want from a basic WooCommerce "Shop" (catalog) page, but I'm not sure how to integrate it into Views:
Can you run PHP code in a view or is there another way to get this modified?
Thanks for the tip. I added this permanently as a new feature to WooCommerce Views. So any users don't need to deal with custom PHP. I sent you a copy of the development version so you can see how this works.
It is integrated as a new parameter to [wpv-woo-buy-or-select] shortcode. To output buy now buttons with options for variable products in search results:
Step1.) Backup your test site and database.
Step2.) Update your copy of WooCommerce Views with the one I provided you in the email.
Step3.) Go to your WP Archive View or Content Template or anything else that outputs your search results. Open it for editing.
Step4.) Click 'Fields and Views' to insert Views Shortcodes. Click 'WooCommerce' section to access WooCommerce Views shortcodes.
Step5.) Click 'Add to cart button - product listing pages' shortcode. A GUI pop for shortcode parameters will then appear ''Configure this shortcode: Add to cart button - product listing pages'
Step6.) Scroll down and you can find a new parameter added 'Display product variation options in product listing page? (Only applicable for WooCommerce "variation" products)'
Make sure this is checked. (see attached screenshot).
Step7.) Click "Insert shortcode" to insert this to your View,etc. The shortcode will then appear like this after being inserted:
Sure, I created a temporary download link to the latest development version of WooCommerce Views here: hidden link
Please confirm that you have download this and I will remove this link/file. For notes on this new feature, please refer to my reply here: https://toolset.com/forums/topic/display-buy-now-buttons-with-options-for-variable-products-in-search-results/#post-293578
Yes this is now a permanent feature that will be built into stable/public versions so updating should not be an issue.
We will be releasing a stable version in the coming weeks. It will be available in the wp-types downloads page. For your update. Thanks 🙂