I have 3 categories set up to display Static Block & Products however I would like the static block to be displayed under the category grid. As this is not for every category only a few is there a way to achieve this either using the Custom Layout Update tab or similar solution.
2 Answers
You can create a new yes/no attribute for the category names 'Show block below grid' with code block_below_grid. See here how (or search the web - this is common)
Now edit app/design/frontend/{interface}/{theme}/catalog/category/view.phtml and replace this :
<?php elseif($this->isMixedMode()): ?> <?php echo $this->getCmsBlockHtml() ?> <?php echo $this->getProductListHtml() ?> with this:
<?php elseif($this->isMixedMode()): ?> <?php if ($_category->getBlockBelowGrid()) : ?> <?php echo $this->getProductListHtml() ?> <?php echo $this->getCmsBlockHtml() ?> <?php else : ?> <?php echo $this->getCmsBlockHtml() ?> <?php echo $this->getProductListHtml() ?> <?php endif;?> <?php elseif($this->isMixedMode()): ?> <?php echo $this->getProductListHtml() ?> <?php echo $this->getCmsBlockHtml() ?> - Please explain. How is this code an answer to the question?Fabian Schmengler– Fabian Schmengler2016-04-07 14:29:28 +00:00Commented Apr 7, 2016 at 14:29