The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How to pass a bigger thumbnail image to cart (5 posts)

  1. luvs
    Posted 3 years ago #

    Im trying to make the product thumbnail in the cart bigger.

    I managed to do that by altering the css, but as the image passed is only 90*90 it will get all blurry.

    So I went into my woocommerce template files and found cart.php and the following line:

    <td class="product-thumbnail">
    $thumbnail = apply_filters( 'woocommerce_in_cart_product_thumbnail', $_product->get_image(), $values, $cart_item_key );
    printf('%s', esc_url( get_permalink( apply_filters('woocommerce_in_cart_product_id', $values['product_id'] ) ) ), $thumbnail );

    But I cant figure out how that translates to the 90*90 picture? Any tips on how I can pass a bigger picture?


  2. stef415
    Posted 3 years ago #

    I have the same question. The cart uses the thumbnail sizes from Settings > Catalog > Image Options > Product Thumbnails, but I want the cart thumbnails to appear larger than the thumbnails on the product page. How can the catalog image be used instead?

  3. stef415
    Posted 3 years ago #

    I ended up changing the Product Thumbnails dimensions to the size I want them to appear in the cart -- under WooCommerce > Settings > Catalog > Image Options > Product Thumbnails -- and setting the product page thumbnails to a smaller size with CSS.

  4. PearlsInternational
    Posted 3 years ago #

    Stef415 (or anyone else), could you be a bit more specific on the process for this? For some reason this didn't change the size of my cart images (I also regenerated my thumbnails to the new size). Surely there's a way to designate cart thumbnail size through the cart.php?


  5. Shieeet
    Posted 2 years ago #

    The following should work (I omitted the filter):

    <?php echo get_the_post_thumbnail( $_product->id, $size, $attr ); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic