捆绑产品如何在price.phtml中检查模式(网格/列表) [英] Bundle product how check mode(grid/list) in price.phtml

查看:58
本文介绍了捆绑产品如何在price.phtml中检查模式(网格/列表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何检查网格或列表中的内容

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 work thx 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中检查模式(网格/列表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆