Support » Plugins » [[Woocommerce]] – Displaying product variation inside loop

  • Currently in Woocommerce if you have a variable product, it will replace the ‘add to basket’ button with a ‘select options’ which then takes you to the product page were you can select the option from dropdown and then add to your basket –

    View post on

    I’m looking to modify this so if the product has variations – display the dropdown in the loop_shop.php with a ‘add to basket’ button so users can add variable products to their basket straight from the catalogue page – like this:

    View post on

    Tried pulling in some of variable.php but can’t seem to get it to work, wondered if anyone had come across this or has a solution

Viewing 3 replies - 1 through 3 (of 3 total)
  • sk


    Would be awesome, I’m looking to do something like this too. Have you had any luck yet?

    The file single-product\add-to-cart\variable.php handles the processing, so would need to modify this then call it on the product archive page. If I have any luck I’ll post back but might be a bit too much for me.

    Thread Starter adamccc


    I got this from a good friend in the past:

    in /woocommerce/content-product.php
    look for do_action( ‘woocommerce_after_shop_loop_item’ ); and replace it by :

    remove_action(‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 );
    do_action( ‘woocommerce_after_shop_loop_item’ );

    Edit the original and create a new file, same name: content-product.php and place it in the themes folder inside woocommerce subfolder. This will do the job, style it and done!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[[Woocommerce]] – Displaying product variation inside loop’ is closed to new replies.