我正在使用 Magento 扩展来控制我的色板。此模块还控制目录列表缩略图。我有使用调整大小的经验,但目前似乎不起作用。
在开发人员模式下,我启用了模板路径提示,它告诉我它位于 frontend/.../default/template/catalog/product/list.phtml (典型目录)
问题:单击之前,图像默认大小正确。但是当我单击缩略图时,它们会调整为 135x135(倾斜和较低的分辨率)。
我在 list.phtml 中的产品网格:
<ul class="products-grid">
<?php endif ?>
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img id="<?php echo $_product->getId();?>" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(146,196); ?>" width="146" height="196" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
<?php echo $this->getLayout()->createBlock("colorselectorplus/listswatch")->setTemplate("colorselectorplus/listswatches.phtml")->setData('product', $_product)->toHtml(); ?>
<?php if($_product->getRatingSummary()): ?>
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
<?php endif; ?>
<?php echo $this->getPriceHtml($_product, true) ?>
</li>
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
</ul>
如果我是正确的,这应该由
resize(146,196)
是否有可能 onclick 图像由不同的 phtml 加载?
谢谢!如果您需要网址,请告诉我。(我们还没上线)
我已经联系了作者,并阅读了常见问题解答。我还没有听到回应。