Tuesday, December 24, 2013

How to manage products search in ZerCart

This tutorial is going to show you how to manage products search on your Zen Cart store.


Zen Cart has two sideboxes for search search.phpandsearch_header.php. Both of them can be control both through the Admin > Tools > Layout Box Controller


zen_cart_search_1


The search.php sidebox is a conventional sidebox and can be turned on and off as normal. If you want search in the header, you will normally turn this sidebox off, though it does have the advantage of providing a link to the advanced search page.


zen_cart_search_2


The search_header.php sidebox is specifically designed to display a search box in your Zen Cart header and so doesn’t output all the HTML needed for a sidebox. It is recommended therefore that you ensure that its left/right column status is set to OFF, but that really is up to you. To display it in the header, set the single column status to ON.


zen_cart_search_3


When a customer performs a search in any of the search boxes in your store, the search results page is displayed. The search results (search product listing) use the same sort order as the other product listings (category product listing). The main difference between them is  the lack of category information in the Search product listing.


zen_cart_search_4


The configuration for the appearance of thise product listing is done via the same screen in the Admin Console.


To change the general display of the Search product listing, click on Configuration > Product Listing to access the Product Listing screen.


zen_cart_search_6


Click on a field you would like to change and follow the instruction in the corresponding side-panel to make your changes. When you are done with editing the properties, click on update to save your changes.


zen_cart_search_7


To change the number of items to display on the search results page:


  • Click on Configuration > Maximum Values to access the Maximum Values screen

zen_cart_search_8


    • Edit the Products Listing- Number Per Page field and click update to save your changes.

zen_cart_search_9


To change the number of pages show in the pagination, change the value in the Prev/Next Navigation Page Links field.


zen_cart_search_10


The source code of the product listing for both searches and category displays can be found in:


  • includes/index_filters/default_filter.php file

  • includes/modules/pages/advanced_search_result/header_php.php file

These files contain conditional statements that determine what SQL query should be executed.

The text for the Advanced Search page can be changed in the \includes\languages\english\theme###/advanced_search_result.php file.



How to manage products search in ZerCart

No comments:

Post a Comment