Magento产品详细图片尺寸

问题描述:

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> 

高度参数简单地传递到调整大小功能以及:

<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> 

希望帮助!

谢谢, 乔

使用auto(或完全去除的数量),然后再通过宽度随CSS和高度将相应地设置。 的CSS是boxes.css或者如果你是在空白的主题及其所有styles.css

.product-view .product-img-box .product-image img { 
    width: 560px 
}