Hi,
I have spent most of the day trying to find a solution and experimenting but with no luck
I wonder if a kind soul could advise me. I'm nearly there but stuck.
The idea is to add an extra search field in the "Advanced Search" form. The field is the product's model, entered in the appropriate box when a product is listed. I'm using v1.3.9h and have so far changed the advanced_search.php file to include an entry for Model (I copied all the entries for Manufacturers and renamed them accordingly). The lines in red below show my added entries in the file.
Next, I added the lines in red below the manufacturer list lines in the tpl_advanced_search_default.phpCode:define('TEXT_SEARCH_IN_DESCRIPTION', 'Search in product descriptions'); define('ENTRY_CATEGORIES', 'Search by category'); define('ENTRY_INCLUDE_SUBCATEGORIES', 'Include subcategories'); define('ENTRY_MANUFACTURERS', 'Search by manufacturer'); define('ENTRY_MODELS', 'Search by model'); define('ENTRY_PRICE_RANGE', 'Search by price range'); define('ENTRY_PRICE_FROM', 'Price from:'); define('ENTRY_PRICE_TO', 'Price to:'); define('ENTRY_DATE_RANGE', 'Search by date added'); define('ENTRY_DATE_FROM', 'Date from:'); define('ENTRY_DATE_TO', 'Date to:'); define('TEXT_SEARCH_HELP_LINK', 'Need help for a better search?'); define('TEXT_ALL_CATEGORIES', 'All categories'); define('TEXT_ALL_MANUFACTURERS', 'All manufacturers'); define('TEXT_ALL_MODELS', 'All models'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_PRODUCTS', 'Product name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy now');
Is there a way to replace the big bold parameters in the above code with the corresponding ones that will allow the "Search by model" to operate?Code:<fieldset class="manufacturerList"> <legend><?php echo ENTRY_MANUFACTURERS; ?></legend> <?php echo zen_draw_pull_down_menu('manufacturers_id', zen_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)), PRODUCTS_MANUFACTURERS_STATUS), $sData['manufacturers_id']); ?> <br class="clearBoth" /> </fieldset> <br class="clearBoth" /> <fieldset class="modelList"> <legend><?php echo ENTRY_MODELS; ?></legend> <?php echo zen_draw_pull_down_menu('manufacturers_id', zen_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MODELS)), PRODUCTS_MANUFACTURERS_STATUS), $sData['manufacturers_id']); ?> <br class="clearBoth" /> </fieldset> <br class="clearBoth" />
I wouldn't want to use add ons or extra side boxes for this facility. I also know that it's simple for the developers to provide an answer, which I couldn't find using the Developers Tool Kit or searching in the forum, the FAQs and the Wiki.
Please note that the above changes were made to my local installation and are not reflected in the live site.
Thanks in advance for any assistance and kind regards.



Reply With Quote
