Hello,
some month ago I bought your step-by-step-categories module. When you open some category in shop, you see some Products. In future there will be more than 100 products. On the left side I set a filter to select different types of this product category. My customer wants now, that the filter is shown above the list of the articles, not on the left side. But this seems to be impossible. Would it be possible with the step-by-step module? In the Backend I could not find a possibily to put your module at that place. Frank
Hello
PrestaShop does not have a "hook" to execute the modules there, so by default it is not possible to put the modules right above the list of products.
But there are some possibilities that allow to move the filters there.
for exmaple
Website you linked do not use right column. So we can use it to show the filters module there. Firstly we need to move the right column hook execution code to position located right above the product list.
Open category.tpl file in your theme directory, put the code to show rightColumn hook code:
{$HOOK_RIGHT_COLUMN}
right before the code: {include file="./product-list.tpl" products=$products}
after this go to your shop back office to section modules > positions, search there for list of modules named displayRightColumn and unhook all modules from this position.
Then use transplant tool and move "block layered navigation" module to displayRightColumn Hook.
it is applicable also for step by step module.
how to do the same in PrestaShop 1.7 ?
- i went to design > positions
- clicked on "transplant" button
- transplanted "faceted search" module to "displayRightColumn" hook
- i went to design > positions
- unassigned "faceted search" from list of modules named "displayLeftColumn" (removed faceted search from left column to avoid conflicts)
- then i altered file: /themes/classic/templates/catalog/listing/product-list.tpl - i added there code to execure displayRightColumn hook:
{if $smarty.get.controller=="category"}
{hook h='displayRightColumn'}
{/if}
i added this code right after the<section id="products">
{if $listing.products|count} ... HERE CODE ...
the result is: faceted search on category page, right above the list of products:
https://i.imgur.com/L7VOyoy.png
https://i.imgur.com/L7VOyoy.png
0 comments:
Post a Comment