garnet Posted July 3, 2009 Share Posted July 3, 2009 Hi all and thanks you for writing contibs for all of us the 'unelightened' users. I use 2 very useful contribs - advanced search with attributes http://addons.oscommerce.com/info/2337/v,22 and shop by price http://addons.oscommerce.com/info/1276/v,22 The latter gives you a box where you can choose price ranges and it returns products. My suggestion is, if some one can combine the two codes so the shop by price box not only has the proce ranges but also the attributes. And if one select an attribute to see all products with it. That is very quick way of selecting products which will attract buyers. It would be great if there is a 'search' button so people can do 'and' querries, e.g show me everything that is size 12 (attribute) and costs $10-$20. But any implementation will work. Thanks and I hope someone combine these 2 great contrib into an even better one. Quote OSC beginner Link to comment Share on other sites More sharing options...
garnet Posted July 8, 2009 Author Share Posted July 8, 2009 Hi all can anybody help me with this please, can someone combine these two contribs in one. Much appreciated. Quote OSC beginner Link to comment Share on other sites More sharing options...
multimixer Posted July 8, 2009 Share Posted July 8, 2009 (edited) Do you need help to do it your self or do you want that somebody do it for you? What kind of help you seek? What did you try so far? Edited July 8, 2009 by multimixer Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
garnet Posted July 8, 2009 Author Share Posted July 8, 2009 Do you need help to do it your self or do you want that somebody do it for you? What kind of help you seek?What did you try so far? Hi i tried myself to copy bits of code, but it doesnt work as expected. this is what i have: <table border="0" width="790" cellspacing="1" cellpadding="2" class="infoBox" align="center"> <tr class="infoBoxContents"> <?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get', 'OnChange="return check_form(this);"') . tep_hide_session_id(); ?> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php // ******************************************************************************** ******** // ******************************************************************************** ******** // This code has been added in order to make the attributes on products searchable by selecting // the attribute through a drop down list box, if you notice on your advanced_search.php page // that a select box is empty it means there are no option values for that option // Please leave these commented lines in this file. This contribution was built by Adam, // If it helps you, then you can help me by donating through paypal, my email address is: [email protected] $attributes_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "'"); while ($attributes = tep_db_fetch_array($attributes_query)) {?> <tr> <td class="fieldKey"><?php echo $attributes["products_options_name"]; ?></td> <?php $option_values_query = tep_db_query('select pv.products_options_values_id as id, pv.products_options_values_name as text from ('. TABLE_PRODUCTS_OPTIONS_VALUES . ' pv, '. TABLE_PRODUCTS_OPTIONS .' po) join ' . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . ' popv on (pv.products_options_values_id = popv.products_options_values_id) where popv.products_options_id = po.products_options_id and popv.products_options_id =' . $attributes['products_options_id'] . ' and po.language_id ='. (int)$languages_id . ' group by pv.products_options_values_id, products_options_values_name'); $option_values_list = array(); // MySQL5 Fix echo '<td class="fieldValue">'; $count = 0; $option_values_list[$count] = array('id' => '', 'text' => ''); while ($option_values = tep_db_fetch_array($option_values_query)) { $option_values_list[++$count] = $option_values; } echo tep_draw_pull_down_menu($attributes['products_options_name'], $option_values_list); ?> </td> </tr><?php } //// End of code added to advanced_search.php ///////////////////////////////////////////// // ******************************************************************************** ******** // ******************************************************************************** ******** ?> </table></td> </tr> </table></td> if you copy this to header or the 'search by price' box in the left column it shows the attribute fields, but there are some problems 1. I am not sure how to add the 'search' button. I can select values, but cant do anything with them. 2. ideally I'd like to have multiple selection - e.g. price above 50 and size 42 - this will require some small mods but I am stuck with it. It wold be super if the search by price box is updated with the attributes and a 'search' button is added to execute the query. 3. the size of the table of the above code doesnt fit with my site design - or if if it is in the left column it screws it up. PS. I have removed it from the site now, but if you want I can post it again to header. www.kupuvalnik.com/index.php Quote OSC beginner Link to comment Share on other sites More sharing options...
garnet Posted July 9, 2009 Author Share Posted July 9, 2009 Could anybody give me some directions, please. Quote OSC beginner Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.