• Resolved DavidMHall

    (@davidmhall)


    I am running wordpress with the Mystiles Theme and Woocommerce. I have encountered a major problem with the display of the thumbnail or Gallery images on my live Product page. What I mean by this is that my Product images is displayed as it should but the Gallery images are of the same size and resolution as the full product image. They appear one above each other as there is not enough screen width to accommodate them side by side. I have satisfied myself that the thumbnail images are imported correctly into the backend of my web site. They are 180 px and there is no need to regenerate. The problem occurs when these thumbnail images are displayed on the Product Page. By testing I am satisfied that the thumbnails are taking on the size in the Single Product Image (to test this theory I reset this value to 180 and both the Product Image and the Thumbnails showed up as blurry when I clicked Preview Changes). Unless I am missing something major (and I would like to hear if I am) could anyone give me the CSS code to reset the thumbnail size prior to product being displayed.

    Obviously I am not knowledgeable about CSS and would really appreciate help on this matter as my project is not at a standstill. Many Thanks in advance.

    P.S. Those thumbnails were displaying fine UNTIL I clicked save on the woocommerce/Settings/Products/Display page. I did not change any of the image settings but was “playing” with the Shop Page display.

Viewing 10 replies - 16 through 25 (of 25 total)
  • I found the issue, I had some other css code, which was conflicting, just fixed it, thank you!!

    @davidmhall No you don’t have to have a child theme for it to work

    There are two lots of code to go into two different locations. Functions to go into the functions.php & CSS to go into custom.css

    I have outlined that in the post above with the pictures
    https://www.ads-software.com/support/topic/css-to-fix-a-woocommerce-image-display-proble/#post-9006666

    Those screen captures/pictures are from the Mysite theme I downloaded last night and set up to test the code.

    Re. your concerns about lightbox and being different than before – it is just going to be. The gallery is now designed to suit mobile devices better, which 75% of your customers will most like be viewing your website on. The thumbnails are now in percentages not fixed pixel widths, this allows them to scale better for mobile phones etc. On a mobile the gallery images now swipe (as they should).

    The gallery is just one advantage of the new woocommerce – there are other new features I am keen to implement – particularly grouped products which is a new addition to the simple/variable choice.

    If you find a way to wind woocommerce back or reinstall an old back up you run the risk of an unsupported plugin version that may be at risk of future vulnerabilities.

    • This reply was modified 7 years, 7 months ago by NightL.
    Thread Starter DavidMHall

    (@davidmhall)

    Okay Nightl,

    I will give it a crack over the weekend. This is way deep for my knowledge. I started programming in 1966 but have not kept up technically. I have a feeling you will be there to support me even it not till Monday. First question: Where do I find the functions.php or have you already told me. I will have more basic questions when I start.

    Many Thanks.

    @davidmhall
    The location is in the picture in the post
    https://www.ads-software.com/support/topic/css-to-fix-a-woocommerce-image-display-proble/#post-9006666

    Appearance / Editor / Select theme to edit: Mystile then click Select

    Scroll down, on the right, and click functions.php

    paste the following code into the location indicated in the picture I provided in previous post https://headspace-concepts.com/function-code.png:

    add_action( 'after_setup_theme', 'yourtheme_setup' );
    
    function yourtheme_setup() {
    add_theme_support( 'wc-product-gallery-zoom' );
    add_theme_support( 'wc-product-gallery-lightbox' );
    add_theme_support( 'wc-product-gallery-slider' );
    }

    In the end my approach didn’t work for @davidmhall – but he located another that solved his gallery issue perfectly
    https://createandcode.com/broken-photo-gallery-and-lightbox-after-woocommerce-3-0-upgrade/

    I gave this CSS a shot hoping it may fix the zoom issue I was having – and it failed in a couple of areas – mainly the thumbnails were back displaying the same size as the main image.

    I went back to my earlier code offering and deleted the zoom in the functions.php

    @nightl would you be able assist me with issue? I’ve done what you’ve suggested in this post with my website but I’m still having issues :(. Here’s a link to view my problem” https://thepinupchronicles.com/store/product/bunny-whale-plush-keychain-copy/

    @nightl Thank you so much! You are my saviour!

    @questionabout Did you ever find a fix to display the product images on mobile devices?

    I am having the same issue since the WC 3 update. It displays fine on a desktop, but on mobile device – the image disappears as soon as start scroll down page. Even the placeholder for the gallery is gone on the mobile.

    @nightl great thanks for your help. This post was a life saver.

    dr

    (@daniel_richard)

    .flex-viewport at width 100% but still getting this

    Yeah, I’m still stuck at fixing the mobile part where:

    .flex-viewport {
    width: 100%;
    }

    gave that.

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘CSS to fix a Woocommerce Image Display Proble.’ is closed to new replies.