Magento分层导航PHP-删除URL中的过滤器
我正在操作内置的分层导航过滤器,以使用复选框代替使用过滤器时出现的“当前购物”部分。我已成功设置复选框系统,以便使用以下方法添加过滤器:Magento分层导航PHP-删除URL中的过滤器,php,url,magento,magento-1.5,Php,Url,Magento,Magento 1.5,我正在操作内置的分层导航过滤器,以使用复选框代替使用过滤器时出现的“当前购物”部分。我已成功设置复选框系统,以便使用以下方法添加过滤器: <input type="checkbox" id="filter-checkbox-<?php echo $_item->getLabel() ?>" class="filter-checkbox" onclick="setLocation('<?php echo $this->urlEscape($_item->g
<input type="checkbox" id="filter-checkbox-<?php echo $_item->getLabel() ?>" class="filter-checkbox" onclick="setLocation('<?php echo $this->urlEscape($_item->getUrl()) ?>');"/>
<a href="<?php echo $this->urlEscape($_item->getUrl()) ?>" class="m-notselected-ln-item" title="<?php echo $_item->getLabel() ?>">
<?php echo $_item->getLabel() ?>
</a>
我只是在取消选中复选框时无法使用用于onclick的php。i、 e.从URL中删除已过滤的属性=xx
查看标准模板文件-删除过滤器按钮使用:
<?php echo $_filter->getRemoveUrl() ?>
但这会破坏页面,导致分层导航的其余部分无法加载
(我知道它仍然很混乱,我会清理复选框/锚标记等的双URL,并在一切正常后转换为SEO URL)解决:
需要使用
<?php echo $_filter->getRemoveUrl() ?>