Hi,
I need to add 3 text box for search criteria for country,state and zip and display the products accordingly.
Can you please guide me on how do i retrieve the products depending on this search criteria.
I need to develop a site similar to www.grubhub.com.
Please guide me.
add 3 search textbox in home page and display products
-
- Posts: 14
- Joined: Wed Feb 17, 2010 5:12 am
Re: add 3 search textbox in home page and display products
You would first need to create a new table, product_to_location.
Include product_id, country_id, zone_id and zip as text.
You need a controller in admin to link the product to the country->zone->zip.
The zip is the problem. For example, one city may have many zip codes. Would using city not be a better choice?
When you have that worked out, you would just add the filters in a module similar to the page display modules that filter by manufacturer and then by module. The result of each filter limits the next filter's results. You could also create a new controller and include the filters in it.
Include product_id, country_id, zone_id and zip as text.
You need a controller in admin to link the product to the country->zone->zip.
The zip is the problem. For example, one city may have many zip codes. Would using city not be a better choice?
When you have that worked out, you would just add the filters in a module similar to the page display modules that filter by manufacturer and then by module. The result of each filter limits the next filter's results. You could also create a new controller and include the filters in it.