How to add search features

          

How to add search features


Adding Search Capabilities 

Doug tested the website with a few friends and family members, and their main issue with it was the diffi culty in fi nding products they wanted.

The first thing we need to do is install the Search module, which is grouped under the Core - optional section of Modules in the Administer area.

With the module installed, we now need to enable the Search feature from the Blocks section; otherwise the search box won't be displayed on the website. We can select this feature by going to Administer | Site Building | Blocks, then set it up in the same way as for the shopping cart and save the settings.

We now have a search box on our website under the header but above the main menu!

Let's try searching for one of our products, for instance T-Rex. Notice something? No results found! This seems quite strange as we have a product with T-Rex in the name, so why didn't we get any results?

The reason for this is that Drupal has not yet been indexed. Drupal uses a cron job to create the index of the site. Without the indexing done Search options cannot work. The Search settings under Administer | Site confi guration allow us to specify how many pages are indexed per "cron run" and allow us to set the site to be re-indexed.  

 
  Book Excerpt: Selling Online with Drupal e-Commerce
  Chapter Contents

This excerpt from Selling Online with Drupal e-Commerce   by Michael Peacock, is printed with permission from Packt Publishing, Copyright 2007. 


Related Links
>Oracle Interview Questions
>Working with ASP.NET DataList Control
>.Net Framework Interview Questions
>ASP.NET Tutorial
>ASP.NET Interview questions
>Remoting.Net
>ASP.NET Validation Control
>.NET Assembly
>ADO.NET

We can manually run the cron task, by opening the cron.php fi le in our web browser. In this case we just open: http://www.dougsdinos.com/cron.php 

Once we have opened this page, let's try searching for T-Rex again. This time we will get some results! 

Customers will now be able to find products and other content on Doug's website much more easily!
 


Page 1 | Page 2 | page 3 | page 4 | page 5 | page 6 | page 7 | page 8



Write your comment - Share Knowledge and Experience


 

Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring