Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1115723
    danielphillipsology
    Participant

    Hello, I am working on an e-commerce store for a client. I am using a child theme.

    I have noticed that when I upload images to the store, X does not crop catalog images properly for viewing on the store page. Items that were uploaded with different dimensions remain at their aspect ratio instead of being “cropped” for the catalog.

    I know something is going on to make sure everything looks good for retina, and some other posts have been about proper resizing of images, but as I understand it there are three types of Woocommerce images. Catalog, Single and thumbnail.

    X does not appear to be making use of the “catalog” dimensions–and is using the same image as the “single” product page image. They are both sourced from the exact same image file. So for example, my 2:3 “single product” image continues to display as 2:3 on the catalog rather than uniformly cropping to 1:1 so all images on the catalog are the same.

    Is there a way around this?

    Thank you.

    #1115734
    danielphillipsology
    Participant

    Please note that I am using WordPress 4.5.3, X 4.6.1, Cornerstone 1.3.0, and WooCommerce 2.6.4.

    Thank you.

    #1115791
    Rahul
    Moderator
    #1115831
    danielphillipsology
    Participant
    This reply has been marked as private.
    #1115912
    danielphillipsology
    Participant
    This reply has been marked as private.
    #1116007
    Jade
    Moderator

    Hi Daniel,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1116044
    danielphillipsology
    Participant
    This reply has been marked as private.
    #1116275
    Lely
    Moderator

    Hi There,

    Thank you for the credentials.
    Please try adding the following on your child theme’s functions.php file:

    //
    // Shop product thumbnails.
    //
    
    function x_woocommerce_shop_thumbnail2() {
    
      GLOBAL $product;
    
      $id     = get_the_ID();
      $thumb  = 'shop_catalog';
      $rating = $product->get_rating_html();
    
      woocommerce_show_product_sale_flash();
      echo '<div class="entry-featured">';
        echo '<a href="' . get_the_permalink() . '">';
          echo get_the_post_thumbnail( $id, $thumb );
          if ( ! empty( $rating ) ) {
            echo '<div class="star-rating-container aggregate">' . $rating . '</div>';
          }
        echo '</a>';
      echo "</div>";
    
    }
    
    add_filter('init', function() {
    
       remove_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_thumbnail', 10 );
    
    });
    
    add_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_thumbnail2', 10 ); 
    

    Hope this helps.

    #1117067
    danielphillipsology
    Participant
    This reply has been marked as private.
    #1117832
    Rad
    Moderator

    Hi there,

    Would you mind providing an FTP account that points to correct folder? It’s currently pointing to empty folder.

    Thanks!

    #1118850
    danielphillipsology
    Participant
    This reply has been marked as private.
    #1119650
    Rad
    Moderator

    Hi there,

    I think it’s already working. It’s already displaying the shop_catalog image, but, there are two thumbnails. I applied the fix, please check.

    Thanks!

    #1120066
    danielphillipsology
    Participant
    This reply has been marked as private.
    #1120405
    Rad
    Moderator

    Hi there,

    X theme doesn’t use various sizes for the product, it has only one size. It’s Woocommerce that uses multiple sizes. The code above. The code above is not to minimize the multiple sizes, but to change the single size being displayed.

    $thumb = 'shop_catalog';

    But I’ll forward your request 🙂

    Thanks!

    #1121976
    danielphillipsology
    Participant
    This reply has been marked as private.
  • <script> jQuery(function($){ $("#no-reply-1115723 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>