petsk Posted October 17, 2005 Share Posted October 17, 2005 Hi everyone, I'm using featured products contribution, http://www.oscommerce.com/community/contributions,651 Is there a way to show the product_model in front of the product name in the pull down list? I can't figure it out, I've tried to add the product_model in various places but nothing shows up. The code for pull down menu: <td class="main"><?php echo ($sInfo->products_name) ? $sInfo->products_name : tep_draw_products_pull_down('products_id', 'style="font-size:10px"', $featured_array); echo tep_draw_hidden_field('products_price', $sInfo->products_price); ?></td> Any ideas? :blink: :D Quote Link to comment Share on other sites More sharing options...
241 Posted October 17, 2005 Share Posted October 17, 2005 it would need to be added to the function tep_draw_products_pull_down in admin/includes/functions/general.php Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
petsk Posted October 17, 2005 Author Share Posted October 17, 2005 Thank you very much Steve! The general-file really did the trick :D Quote Link to comment Share on other sites More sharing options...
mvpdigital Posted July 27, 2006 Share Posted July 27, 2006 Thank you very much Steve! The general-file really did the trick :D I am trying to get the model numbers to appear in the drop down too. Can you possibly help me out with exactly what has to go where? Quote Link to comment Share on other sites More sharing options...
petsk Posted July 27, 2006 Author Share Posted July 27, 2006 (edited) Can you possibly help me out with exactly what has to go where? Sure, here comes... Open: admin/includes/functions/general.php Find this at line ~199 $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_name"); while ($products = tep_db_fetch_array($products_query)) { if (!in_array($products['products_id'], $exclude)) { $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_name'] . ' (' . $currencies->format($products['products_price']) . ')</option>'; } } Change to: $products_query = tep_db_query("select p.products_id, p.products_model, pd.products_name, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_name"); while ($products = tep_db_fetch_array($products_query)) { if (!in_array($products['products_id'], $exclude)) { $select_string .= '<option value="' . $products['products_id'] . '">[' . $products['products_model'] . ']?' . $products['products_name'] . '?(' . $currencies->format($products['products_price']) . ')</option>'; } } You can actually put almost any product information in the pulldown menu, eg stock quantity etc. // Peter EDIT: Note that this "hack" is going to show up in every pull down menu in admin Edited July 27, 2006 by petsk Quote Link to comment Share on other sites More sharing options...
mvpdigital Posted July 27, 2006 Share Posted July 27, 2006 Thank you so much! Is there a way to have the drop down menu items ordered by the model number (lowest to highest)? Sure, here comes... Open: admin/includes/functions/general.php Find this at line ~199 $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_name"); while ($products = tep_db_fetch_array($products_query)) { if (!in_array($products['products_id'], $exclude)) { $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_name'] . ' (' . $currencies->format($products['products_price']) . ')</option>'; } } Change to: $products_query = tep_db_query("select p.products_id, p.products_model, pd.products_name, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_name"); while ($products = tep_db_fetch_array($products_query)) { if (!in_array($products['products_id'], $exclude)) { $select_string .= '<option value="' . $products['products_id'] . '">[' . $products['products_model'] . '] ' . $products['products_name'] . ' (' . $currencies->format($products['products_price']) . ')</option>'; } } You can actually put almost any product information in the pulldown menu, eg stock quantity etc. // Peter EDIT: Note that this "hack" is going to show up in every pull down menu in admin Quote Link to comment Share on other sites More sharing options...
mvpdigital Posted July 27, 2006 Share Posted July 27, 2006 Thanks for your help, I figured it out. Quote Link to comment Share on other sites More sharing options...
mribeiro Posted April 4, 2008 Share Posted April 4, 2008 (edited) There is a way to use this pull down menu, that lists the products and prices and when whe select a product we can add to the cart, I've tried many contributions but can't get it working, please could some one help me on this matter. Thanks :blush: Edited April 4, 2008 by mribeiro Quote 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.