Magento 1.7 product images issue

by kmax01   Last Updated July 11, 2019 19:09 PM

I am facing a strange problem with my magento 1.7 installation. If I upload images for any product, save and check the product on the frontend, facing this error

a:5:{i:0;s:1203:"Invalid method Mage_Catalog_Block_Product_View_Media::isGalleryImageVisible(Array ( [0] => Varien_Object Object ( [_data:protected] => Array ( [value_id] => 8 [file] => /1/0/10425097_688517641274252_8269930450739102673_n.jpg [label] => [position] => 1 [disabled] => 0 [label_default] => [position_default] => 1 [disabled_default] => 0

Product works fine if no image is attached.

Any thoughts what is causing the issue?



Answers 1


Mage_Catalog_Block_Product_View_Media::isGalleryImageVisible is a method in 1.9.1 and later

Probably you have used gallery plugin for compatible with Magento 1.9.1 and you are currently in Magento 1.7

in your theme file: app/design/frontend/YOUR_THEME/default/template/catalog/product/view/media.phtml comment out the condition where isGalleryImageVisible method is calling. Something like this:

    <?php $i=0; foreach ($this->getGalleryImages() as $_image): ?>
        <?php //if ($this->isGalleryImageVisible($_image)): ?>
        <img id="image-<?php echo $i; ?>"
             class="gallery-image"
             src="<?php echo $this->getGalleryImageUrl($_image); ?>"
             data-zoom-image="<?php echo  $this->getGalleryImageUrl($_image); ?>" />
        <?php //endif; ?>
    <?php $i++; endforeach; ?>

This function would be calling 2 times in same file, make sure you remove both.

Shoaib Munir
Shoaib Munir
July 11, 2019 18:44 PM

Related Questions




How can I add exception for image extension?

Updated March 13, 2017 09:09 AM

Images uploaded but not saved

Updated May 07, 2016 08:03 AM