2010-05-19 139 views
6

Magento 1.4Magento產品詳細圖片尺寸

默認產品詳細信息圖片尺寸爲265x265。

我們所有的產品圖片都可能比寬度高2倍,即使我們用它們填充以使它們變爲265,也會太小而無法看到圖像中的細節,因此我們希望使圖像更高。

我發現media.phtml文件

我們怎麼會去修改這個文件/ Magento的,這樣的產品詳情頁圖像是265W X 530H。

這看起來像顯示圖像的代碼。

<p class="product-image"> 
    <?php 
     $_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />'; 
     echo $_helper->productAttribute($_product, $_img, 'image'); 
    ?> 
</p> 

回答

5

高度參數簡單地傳遞到調整大小功能以及:

<p class="product-image"> 
    <?php 
     $_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265, 530).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />'; 
     echo $_helper->productAttribute($_product, $_img, 'image'); 
    ?> 
</p> 

希望幫助!

謝謝, 喬

2

使用auto(或完全去除的數量),然後再通過寬度隨CSS和高度將相應地設置。 的CSS是boxes.css或者如果你是在空白的主題及其所有styles.css

.product-view .product-img-box .product-image img { 
    width: 560px 
} 
相關問題