public function getGalleryImages()
 {
     $mgiKey = $this->_mgiKey . 'collection';
     if (!$this->getProduct()->hasData($mgiKey)) {
         $images = new Varien_Data_Collection();
         $usedKeys = array();
         foreach ($this->_getGalleryImages('thumb', false) as $image) {
             $imgName = preg_replace('#(\\.jpg).*$#i', '$1', @$image['url']);
             if (!empty($usedKeys[$imgName])) {
                 continue;
             }
             $usedKeys[$imgName] = 1;
             $gImage = new Varien_Object($image);
             $gImage->setThumb($gImage->getThumbUrl());
             $images->addItem($gImage);
         }
         $this->getProduct()->setData($mgiKey, $images);
     }
     return $this->getProduct()->getData($mgiKey);
 }
Example #2
0
 /**
  * File thumb URL getter
  *
  * @param  Varien_Object $file
  * @return string
  */
 public function getFileThumbUrl(Varien_Object $file)
 {
     return $file->getThumbUrl();
 }