我在我的目录页面中显示了属性过滤器。我的客户要求是,在某些类别中,属性过滤器没有产品,我需要隐藏空属性标签。我怎样才能做到这一点请帮助我。
“我需要特定属性的产品计数,例如形状、颜色和瓦特,我怎样才能按属性计算所有产品,如果我得到计数,我将使用它来控制属性标签。”
我在目录/层/view.phtml 中的代码:
<?php if($this->canShowBlock()): ?>
<?php // echo $this->getStateHtml() ?>
<?php if($this->canShowOptions()): ?>
<?php $_filters = $this->getFilters() ?>
<?php if($_filter->getItemsCount()):
<?php echo $this->__($_filter->getName()) ?>
<?php echo $_filter->getCount();?>
<?php echo $_filter->getHtml(); ?>
<?php endif;?>
<?php endif;?>
<?php endforeach; ?>