问题描述
我想知道如何检查网格或列表中的内容
I wonder how can I check that we have grid or list in
\template\bundle\catalog\product\price.phtml
我想根据模式(网格/列表)设置格式价格,在list.phtml中,我们可以通过
I would like set a format price depending on mode(grid/list), in list.phtml we can check type of mode by
<?php if($this->getMode()!='grid'): ?>
但是在price.phtml中,此方法不起作用寻求帮助
but in price.phtml this method didn't workthx for help
推荐答案
$ _ GET ['mode']将包含模式,如果未设置,则为默认模式(取决于您的配置).如果还不够干净,而您仅使用一种模式,则可以通过getStoreConfig或通过Mage_Catalog_Block_Product_List getMode()方法获得此模式;)
$_GET['mode'] will contain the mode, if it's not set it's the default mode (depending on your configuration). If it's not clean enough and you only use 1 mode, you can have this through getStoreConfig or with Mage_Catalog_Block_Product_List getMode() method ;)
这篇关于捆绑产品如何在price.phtml中检查模式(网格/列表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!