Product Categories Page-Display # of Variations or Gallery

eCommerce WordPress theme to create online shop with WooCommerce support
GK User
Fri Mar 06, 2015 1:20 pm
Under the product categories menu (widget) in the upper left, if I click a product category and it takes me to the screen where there are multiple products (one level above a single product page) and each has a title, price and product details button. Is there a way to display the number of variations here so the user knows there are more than style to choose from, or is there a way to display a mini version of the gallery with much smaller icons?

Thank you,
User avatar
Junior Boarder

GK User
Fri Mar 06, 2015 4:14 pm
Hi,

To display variations on product category pages you have to override woocommerce template files or use action/filters, maybe this discussion will be helpful:
http://stackoverflow.com/questions/2582 ... egory-page
User avatar
Moderator

GK User
Sat Mar 07, 2015 10:57 pm
The below code was helpful and put the color dropdown in the area I wanted. However instead of that I'd like to show a mini version of all the product gallery image thumbnails for that specific product (much like on the product page itself however each thumbnail about a quarter of the size.

I'm not a programmer but..what can I replace in the code below to display this, and if possible also to have control of the size of the thumbnails, and the number on each row?

add_action('woocommerce_after_shop_loop_item_title','woocommerce_template_single_variation', 5);
function woocommerce_template_single_variation() {
global $product;
if ($product->product_type == "variable" && (is_product_category() || is_product_tag())) {
echo woocommerce_variable_add_to_cart();
}

}
User avatar
Junior Boarder

GK User
Mon Mar 09, 2015 9:12 am
Unfortunately with the gallery it won't be so simple I think.
You should search or create new thread on the woocommerce forum, maybe someone has the same problem. In our themes we only provide visual layer for the woocommerce plugin, the functionality is the same.
User avatar
Moderator

GK User
Mon Mar 09, 2015 10:28 am
Understood, as another option..would it be possible to display some number text that stated how many color variations of a product I had? For example: "5 Colors to choose from"
Or: "five colors to choose from"

So my users know that there are more color options and click to see them As opposed to just thinking the main image is tge only one.
User avatar
Junior Boarder

GK User
Mon Mar 09, 2015 5:48 pm
Sorry, but you have to ask on woocommerce forum, because I'm not sure.
I've found also this code:
https://gist.github.com/glueckpress/357 ... 647191b4a0
User avatar
Moderator


cron