【发布时间】:2013-08-01 02:20:17
【问题描述】:
我卸载了一个扩展程序,然后我在类别页面上显示的所有产品图片都调整为 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;
}
你可以看到我的问题here
【问题讨论】:
-
你用了什么扩展,卸载了
-
您确定您查看的是正确的
list.phtml文件吗?很可能是某个扩展程序覆盖了它,因为您网站上的图片已明确调整为 135x135(您可以在文件路径中看到135x),并且width和height属性为 135。 -
@VIVEK-MDU 我卸载了“删除订单”See it here
-
@giaour 从我能够找到的所有内容中,list.phtml 应该是正确的,但我确实检查了大多数其他 phtml 文件,但找不到任何会导致其大小调整为 135 的内容.我还看到它的文件路径,我只是不知道它从哪里得到 135px。
-
如果您有任何影响产品列表页面的扩展,请检查它们在布局 xml 文件中是否有类似这样的内容:
<action method="setTemplate"><template>XXX.phtml</template></action>
标签: php css magento magento-1.6