繁体   English   中英

Magento产品图片未调整大小

[英]Magento Product Images Not Resizing

我卸载了扩展程序,然后将类别页面上显示的所有产品图像调整为135x135而不是209x209 我检查了list.phtml ,这就是我发现的内容:

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this-   >stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(209); ?>" width="209" height="209" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>

尽管这对我来说似乎是正确的,但我也找到了一个随机的CSS属性,这似乎是罪魁祸首,但我找不到该规则的任何来源。

img[Attributes Style] {
width: 135px;
height: 135px;
}

你可以在这里看到我的问题

一个扩展名正在覆盖产品列表的模板,因此您修改的文件( list.phtml )实际上不是所显示的。

如果有影响产品列表页面的扩展名,请检查布局xml文件中是否包含类似于以下内容的内容: <action method="setTemplate"><template>XXX.phtml</template></action>

这是一个懒惰的把戏。.使用软件在文件中添加功能搜索文本,然后尝试使用搜索关键字“ resize(135)”进行搜索

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM