cancel
Showing results for 
Search instead for 
Did you mean: 

Configurable Products Images Not Showing

Configurable Products Images Not Showing

I have a configurable product set up with two simple products associated to it. For demonstration purposes I have used the configurable product "Pet Test" with the two simple products "Test Product Dog" & "Test Product Cat". The url for demonstration is: https://www.design-a-cake.co.uk/pet-test.html

The initial problem I had was I got the error: Invalid method Mage_Catalog_Block_Product_View_Media::isGalleryImageVisible

I added the function as such in Media.php that I found in a template file online (cannot be sure if it is correct)

 

    public function isGalleryImageVisible($image)
{
    if (($filterClass = $this->getGalleryFilterHelper()) && ($filterMethod = $this->getGalleryFilterMethod())) {
        return Mage::helper($filterClass)->$filterMethod($this->getProduct(), $image);
    }
    return true;
}

Now the url loads fine but it does not get the child images when they are selected in the dropdown, it simply shows the parent image but larger? The description changes but is duplicated. If you look at the url you will see quite clearly the issues.

Does anybody have any ideas about this? Thank you.

3 REPLIES 3

Re: Configurable Products Images Not Showing

This issue sounds super tricky—Magento’s configurable products can be so finicky at times! I remember helping a friend set up a pet accessories site, and we had a similar issue where the product images didn’t update when selecting different options. Turned out, we had to recheck the JavaScript for the image gallery and make sure the child product images were properly assigned in the backend.

By the way, one of the test products we used was a Chow Chow puppy plush toy—it was adorable and made debugging a bit more fun! Hope you get your issue sorted soon.

Re: Configurable Products Images Not Showing

 

You're encountering a common issue in Magento (especially Magento 1.x or early Magento 2 versions) where configurable product child images are not being swapped properly when a user selects a variation (like "Test Product Dog" or "Test Product Cat").

Issues Observed:

  • You're using a custom method isGalleryImageVisible() — possibly introduced from a third-party theme or extension.

  • After patching the error, the child product image does not load when selecting a variation.

  • The description changes, but is duplicated — likely caused by faulty JavaScript rendering.


    Step-by-Step Debug & Fix:

    ✅ 1. Check Simple Product Image Setup

    Ensure the simple products ("Test Product Dog" and "Test Product Cat") have:

    • An image set under base, small, and thumbnail.

    • Visibility set to "Not Visible Individually" (which is correct for simples in configurables).

    • Stock status is In Stock.

      ✅ 2. Enable Dynamic Image Swapping

      Magento uses JavaScript to change images on configurable product option selection. This depends on:

      • media.phtml rendering the gallery.

      • configurable.js or related JS listening to option changes and fetching child images.

        Check:

        • In your theme's view/media.phtml, ensure you're using the correct jsonConfig that maps simple product IDs to image URLs.

        • Look for the following block (or similar) in your theme:

           

          php
          CopyEdit
          <script type="text/javascript"> var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>); </script>

           

           

          If it's missing or overridden poorly, image switching will fail.


          🛠️ 3. Try This Community Fix

          If your child product images are not showing, you might need to extend the configurable product JS or install a module like:

          • Simple Configurable Products (for Magento 1)

          • Or use a fix like this one:

            Update your media.phtml file and ensure it's using the getGalleryImages() method correctly and rendering all images including those from child products.

            If child images are missing from the initial gallery JSON, you can inject them like this (pseudo-fix):

             

            php
            CopyEdit
            $_product = $this->getProduct(); $galleryImages = $_product->getMediaGalleryImages(); if ($_product->isConfigurable()) { foreach ($_product->getTypeInstance(true)->getUsedProducts(null, $_product) as $simpleProduct) { foreach ($simpleProduct->getMediaGalleryImages() as $image) { $galleryImages->addItem($image); } } }
             

            ⚙️ 4. Check JavaScript Console for Errors

            In your browser's developer tools (F12), inspect the Console tab and reload the page. If there are JavaScript errors (e.g., undefined method or Bonuscodes object), the image switching logic won't execute.


            ✅ 5. Use Extensions If Needed

            You may consider using a free or premium extension like:

            • Magento 1 Simple Configurable Products

            • Amasty’s Improved Configurable Products

              These offer robust fallback mechanisms for image switching.


              📌 Summary

              Your current custom isGalleryImageVisible() may not be the issue anymore, but rather:

              • The child product images are not being passed to the front-end.

              • The JavaScript logic responsible for dynamic switching is either broken or incomplete.


                ✅ Recommendations:

                • Check whether getJsonConfig() is overridden in your theme and fix any incorrect merging of simple product images.

                • Ensure all products have complete image attributes set.

                • Revert to default media.phtml temporarily to test.

                • Install a tested module if native Magento features don't suffice.


                  Let me know if you want me to look into the exact theme you’re using or inspect your HTML/JS/CSS more deeply based on the live site.

                •  
    •  

  •  

  •  

Re: Configurable Products Images Not Showing

It’s a bit like managing setups — everything must be linked properly to display smoothly. For those who appreciate seamless performance in  , senpai du stream offers a similar kind of reliability when it comes to stable video playback and user experience.