This function will show small image of each product together with product ID. It would be useful for admins who have a lot of products or products with very similar names. It's easier to find the product you need by seeing its image.
1. Open core/files.php and paste new function. You can change image size. I use 70px wide. * find the code:
} // end function getDefaultImage
... and change it with the followin:
} // end function getDefaultImage
/** * Displays a small image */ public function getSmallImage( $iLink, $iLinkType = 1, $bLinks = null, $sLink = null ){ if( isset( $this->aImagesDefault[$iLinkType][$iLink] ) ){ return '<img src="'.DIR_FILES.$this->aImagesDefault[$iLinkType][$iLink]['iSizeValue1'].'/'.$this->aImagesDefault[$iLinkType][$iLink]['sFileName'].'" alt="'.( isset( $this->aImagesDefault[$iLinkType][$iLink]['sDescription'] ) ? $this->aImagesDefault[$iLinkType][$iLink]['sDescription'] : $this->aImagesDefault[$iLinkType][$iLink]['sFileName'] ).'" width="70" />'; } } // end function getSmallImage
2. Open core/products-admin.php * in the function ListProducts change the code:
Now go to admin side, open products list and you are supposed to see small images in the left side of each product. This upgrade is not professional, but it's ok.
Also we can do the same in shorter way, for example, by using the current default getDefaultImage function...