下面是一個創建該文件名路徑的代碼,在Mage_Catalog_Model_Product_Image
發現:
// build new filename (most important params)
$path = array(
Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath(),
'cache',
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);
if((!empty($this->_width)) || (!empty($this->_height)))
$path[] = "{$this->_width}x{$this->_height}";
// 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();
}
$path[] = md5(implode('_', $miscParams));
// append prepared filename
$this->_newFile = implode('/', $path) . $file; // the $file contains heading slash
所以,哈希是從配置信息(寬高比等)以及水印信息生成的。這些信息通常不會改變。但是,我確實看到該路徑部分來自當前商店的store_id
,所以您的麻煩可能在那裏。
有沒有理由讓Magento在兩家商店中都使用正常的緩存過程?由於Magento檢查文件系統的緩存圖像,應該不會有衝突。
希望有幫助!
謝謝, 喬
在沉思,你只是想獲得目錄圖像在這兩個領域的工作?目錄圖像的非緩存版本爲%magento%/media/catalog/product
。從該位置複製目錄,並且您的目錄圖像應該可以工作。
謝謝喬。 我試圖複製只是目錄/產品/圖像,仍然沒有喜悅,然後我試圖刪除緩存的圖像,再次,沒有喜悅。結果 - 仍然快樂,仍然卡住試圖讓圖像在4天后加載! – 2010-05-27 08:53:03
兩個安裝都有相同的store_id – 2010-05-27 11:59:18