小编Sus*_*ran的帖子

搜索页面上的Magento Active Filters

我想在我的magento电子商务网站上实现有效过滤器.

我已成功实现它,但问题是,代码仅适用于类别页面,而不适用于搜索页面

这是我正在使用的代码

<?php /*Create filter dependencies*/

$_activeFilters[] = array();

$_filters = Mage::getSingleton(‘Mage_Catalog_Block_Layer_State’)->getActiveFilters();

foreach ($_filters as $_filter):?>
<?php echo $this->stripTags($_filter->getLabel()) ?><a href=”<?php echo $_filter-     >getRemoveUrl() ?>” title=”<?php echo $this->__(‘Remove This Item’) ?>”><?php echo $this->__(‘Remove This Item’) ?></a>
<?php endforeach; ?>
Run Code Online (Sandbox Code Playgroud)

我在toolbar.phtml中使用此代码.任何线索,为什么它不在搜索页面上工作.任何解决方案都会有很大的帮助.

谢谢,

苏希尔

magento magento-1.7

6
推荐指数
1
解决办法
5706
查看次数

标签 统计

magento ×1

magento-1.7 ×1