Add Default Products To Search Result Page

Hello,



we want to place default products on the “product search result”-page in the case nothing is found.





Currently there is only the Text “No products found matching the search criteria”.



We have already tried to add a new “location” under Design => Layouts with the option “disptach” set to “search results”, but this has no effect.





What do we do wrong?





best regards,

Alex

[quote name='apr3455' timestamp='1423060011' post='204280']

Hello,



we want to place default products on the “product search result”-page in the case nothing is found.





Currently there is only the Text “No products found matching the search criteria”.



We have already tried to add a new “location” under Design => Layouts with the option “disptach” set to “search results”, but this has no effect.





What do we do wrong?





best regards,

Alex

[/quote]



I am afraid, there is no such ability in CS-Cart. Additional code modifications are required to implement this feature. We are at your service.

From programming point of view, what files do we have to edit?

You can use the get_products_post hook in the fn_get_products function (app/functions/fn.catalog.php). If the $products array is empty and you are located on the search page, fill up the array with custom products