L
L
ligisayan2018-12-06 20:33:57
WordPress
ligisayan, 2018-12-06 20:33:57

How to set different sizes of product images in the catalog and in the cart in woocommerce?

Hello! There is a store on woocommerce. I want to make it so that in the product catalog and in the cart thumbnails of different sizes are displayed: in the catalog more - within 250 by 300, and in the basket less - within 184 by 184.
But, as far as I understand, from woocommerce 3+ version they left the possibility resizing only on the product page and for the catalog-basket general. How to be?
Code to set custom thumbnail size in functions.php

add_filter('woocommerce_get_image_size_thumbnail','add_thumbnail_size',1,10);
function add_thumbnail_size($size){

    $size['width'] = 250;
    $size['height'] = 300;
    $size['crop']   = 0;
    return $size;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vova, 2018-12-10
@ligisayan

For convenience, there is this article
Works in WooCommerce 3.5.2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question