Guest Posted November 13, 2008 Share Posted November 13, 2008 Hello, Is there an easy way to add search by products_model criteria in advanced_search_results.php ? Thanks Plamen Link to comment Share on other sites More sharing options...
Guest Posted November 14, 2008 Share Posted November 14, 2008 Anyone? Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 14, 2008 Share Posted November 14, 2008 See the Site Search Plus contribution in my add ons. It will do that. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted November 14, 2008 Share Posted November 14, 2008 Hi Jack, Thank for your reply. I did have a look at your contribution but I am not sure it's exactly what I wanted. Basically, I have a column in the products table of the database with entries like: red, white, sparkling etc. So I simply want to have a drop down menu in advanced search with "red, white, sparkling" which will return the relevant entries. Regards Plamen Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 14, 2008 Share Posted November 14, 2008 Ahh, that's different from the model number. No contribution will work for you since the field you want to search for is not standard. The search can be made to include those but it would require custom coding. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted November 14, 2008 Share Posted November 14, 2008 Thanks anyway! Link to comment Share on other sites More sharing options...
Guest Posted November 15, 2008 Share Posted November 15, 2008 It turned out to be quite an easy solution. Just this lines of code to the file - advanced_search_results.php After if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $where_str .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } Add if (isset($HTTP_GET_VARS['products_model']) && tep_not_null($HTTP_GET_VARS['products_model'])) { $where_str .= " and p.products_model = '" . $HTTP_GET_VARS['products_model'] . "'"; } Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 15, 2008 Share Posted November 15, 2008 I'm confused on what you asked. The basic shop code would find the model number by default. But you said you didn't want to search for the model number but for a special field and now you are back to the model. If the change you made works for you and you couldn't find the model before, then your shop had been altered in some way, or maybe it is an old version. But if you do really have an extra field, then it won't work. But if it is working for you, that's all that matters. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.