WooCommerce single product page.

This support request was posted in Smart by Alex

Request ID #33850 Resolved
  • Hi Juan.
    Nice to hear from you.
    Actually the problem is that:
    1) the product image is more than 100% of height of the visible part. Need about 60%.
    2) Product image shows in a portrait view but the image size relate to landscape image size.
    3) And for fit the portrait size (wich I dose non whant) it crop it.
    Alex.

    Hi Alex,

    Thanks for the follow-up. I hope all is well.

    I think that most of the problems with that images are related to the addition that you have made to the WooCommerce configuration. The image displayed is the one with the size you have chosen on “WooCommerce Settings > Product > Display > Single Product image”. You have selected to have images with 580x730px and to hard crop them.

    Best,
    Juan.

    This reply has been marked as private.

    Hi,

    Thanks for the follow-up.

    Unfortunately WordPress doesn’t regenerate the images automatically once you change the different image sizes. This doesn’t have to do with the theme or the plugin, but a problem that WordPress has.

    As you can see in WooCommerce documentation, “Saving changes does not automatically update all previously uploaded product imagery. To update old images, WordPress needs to regenerate the thumbnails.”

    Fixing Blurry Product Images

    They recommend to use a plugin like the following, once you modify the images size: https://wordpress.org/plugins/regenerate-thumbnails/

    Best,
    Juan.

    Hi Juan!
    Thank you for your detailed response, but this did not solve my problem.

    I tried to install wp with Smart on my localhost and I have the same problem.
    I do following:
    Go to Woocommerce – Settings – Products – Display and change any value of image size, turn off crop and than push save, and get message that all changes was saved. Than I go to tab General and comeback to Display, there I can see that the image sizes are setup to the values that I have before changing. They are Catalog image 300*378, Single product image 580*730 and Product thumbnails 110*110.
    Then I change theme to other theme, and this problem disapear. So this is problem of the theme.
    I need solution how can I change the images sizes of the woocommerce products.

    I look forwards to hearing from you.

    Kind regards
    Alex.

    Hello Alex,

    Thank you for the follow-up.

    Would you please try adding the following code to your smart/functions.php file?

    Please, after doing that I’d kindly ask you to regenerate the image thumbnails with this plugin: https://wordpress.org/plugins/regenerate-thumbnails/

    Please have in mind that the CSS rules for the WooCommerce single layout are in percentage and not in pixels. So it is quite likely that the image dimensions will be stretched and no pixel perfect.

    The theme default dimensions override the WooCommerce configuration dimensions and that’s why you didn’t see the changes when changing the settings over there. The code I shared with you will solve that problem.

    Best,
    Juan.

    Hi Juan!
    Hope you are well.
    The last solution solved my problem and it is greate.

    I have one more question. I need to disable image zoom option. I try to add some code to function.php but it does not work. Then I found plugin ” WooCommerce Product Image Gallery Options plugin” wich can disable zoom for specific page. But it doce not work too.
    It seams like, your theme has its own image zoom effect. If it is so can you give me code to remove zoom from ‘single product image’.

    Alex.

    Hi Alex,

    Thanks for the follow-up. That’s great.

    Regarding the zoom you could try adding the following code to your theme’s functions.php file

    Best,
    Juan.

    Hi Juan.

    The code works!

    Thanks!
    Alex.

    Hi Alex,

    Thank you for the follow-up.

    That’s great 🙂

    Have a nice day,
    Juan.

    Hi Juanfra!

    Can you give me function names for change woocommerce Catalogue images and Product thumbnails sizes?
    Like for single product image – ‘nice_woocommerce_integration_single_image_size’, ‘nice_woocommerce_integration_single_image_size_custom’

    Alex.

    Juanfra Aldasoro

    Hi Alex,

    Thank you for the follow-up.

    Those image sizes should be defined by the values set in the WooCommerce settings. Have you tried changing those and regenerating the images? (Have in mind you always have to regenerate the images once you change the values).

    To regenerate the images:

    1. Download and Activate Regenerate Thumbnails
    2. Go to Tools -> Regen. Thumbnails
    3. Click on “Regenerate All Thumbnails”

    To set a custom image size for the single image, you can use the following code: https://gist.github.com/juanfra/17cc79bdc5f4491850648e5e449dfec5

    Best,
    Juan.

    Hi, Juan.
    Before I written you, I tried to change the values in woocommerce settings, but it seems the same problem like with the “single product size” is overwritten by theme settings.
    Yes I remember about regeneration of the thumbnails.
    Alex.

    Juanfra Aldasoro

    Hi Alex,

    Thanks for the follow-up. Yes, that’s why I shared the code to change the “single product size” by adding it to the functions.php file: https://gist.github.com/juanfra/17cc79bdc5f4491850648e5e449dfec5

    The thumbnails should be changed in the WooCommerce settings. One thing to have in mind, please, is that these images are set to be contained by different HTML containers who have their width expressed in % values, so perhaps even if you change the image size, you may need to add some CSS if you wish to have a “pixel” value.

    Best,
    Juan.

    Hi!
    Yes, this code work, but with single product image.
    But I also want to change crop settings of “Catalogue images” and Product thumbnails. And if I change it in Woocommerce – Settings – Products – Display, it overwrites by theme.
    So I need the way to do it.
    Alex.

Viewing 15 posts - 16 through 30 (of 39 total)

This topic is marked as resolved

Only the topic author can re-open this thread.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server