Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if($_filter->getItemsCount()):?>
- <?php $show=1;?>
- <!-- curern filter price and currentc Cat match -->
- <?php if($_filter->getFilter()->getRequestVar()!=='price'){?>
- <?php if(Mage::registry('current_category') &&(Mage::registry('current_category')->getId()==$catId)):
- $show=0;
- endif;
- ?>
- <?php } ?>
- <!-- check show
- <?php if($show==1){?>
- <?php echo $_filter->getHtml() ?>
- <?php } ?>
- <?php endif;?>
- <?php
- // create an array of the category ids in which you don't want the price filter
- $restricted_categories = [3, 4, 10, 14];
- $currentCategoryId = $block->getLayer()->getCurrentCategory()->getId();
- ?>
- .....
- .....
- .....
- <?php foreach ($block->getFilters() as $filter): ?>
- <?php
- if (in_array($currentCategoryId, $restricted_categories) && $filter->getRequestVar() == 'price') {
- continue;
- }
- ?>
- .....
- .....
- .....
- <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement