media\catalog\product\cache \1\small_image\120x120\9df78dab3d52sd08dse5fw8d27w36e95 a\ b\ d\ ...
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you wish to know more about that hash key, I believe it is created in the Mage_Catalog_Model_Product_Image class, at the bottom of the setBaseFile function, it basically takes properties of the image, implodes them together and creates a hash.
// add misk params as a hash $miscParams = array( ($this->_keepAspectRatio ? '' : 'non') . 'proportional', ($this->_keepFrame ? '' : 'no') . 'frame', ($this->_keepTransparency ? '' : 'no') . 'transparency', ($this->_constrainOnly ? 'do' : 'not') . 'constrainonly', $this->_rgbToString($this->_backgroundColor), 'angle' . $this->_angle, 'quality' . $this->_quality ); // if has watermark add watermark params to hash if ($this->getWatermarkFile()) { $miscParams[] = $this->getWatermarkFile(); $miscParams[] = $this->getWatermarkImageOpacity(); $miscParams[] = $this->getWatermarkPosition(); $miscParams[] = $this->getWatermarkWidth(); $miscParams[] = $this->getWatermarkHeigth(); }
If you need to generate the hash yourself you can use the same steps. Obviously HASH'ing is a one way process, so it is impossible to take the value and find out the image properties.