Jump to content

List of products in Search.tpl


Recommended Posts

Hello everyone,


I'm trying to display the list of best-selling products for the search if id doesn't produce anything results. 


 


Not being very practical, I tried to copy part of the code that I find in the best-seller.tpl and paste it in the file search.tpl.


{if $products}
<div class="sortPagiBar shop_box_row shop_box_row clearfix">
{include file="./product-sort.tpl"}
{include file="./nbr-product-page.tpl"}
</div>
{include file="./product-list.tpl" products=$products}
<div class="bottom_pagination shop_box_row clearfix">
{include file="./product-compare.tpl" paginationId='bottom'}
{include file="./pagination.tpl" paginationId='bottom'}
</div>
{else}
<p class="alert alert-info">{l s='No top sellers for the moment.'}</p>
{/if}

However, I do not know how to initialize the variable $products and then nothing comes out. Can you indicate a simple solution to apply? 

 

I also tried to activate the module lock best sellers but I can not find the proper position where to show it. 

 

Thank you all for the help!

 

Best regards

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...