Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manufacturer Drop Down Box


jonsteward

Recommended Posts

Basically when a customer clicks on a manufacturer he/she is taken to a list of all products by that manufacturer. At the top of this page is a drop down box so that you can go to different types of product by that manufacturer. I was just wondering how I could change the text in this box. For example in this image I have clicked on the Bausch & Lomb Manufacturer link and i am being offerd the drop down box which has got Bausch & Lomb listed twice is there a way of changing just the text in this box to something better like B & L Full Size Binos and B & L Compact Binoculars.

dropdown.jpg

Link to comment
Share on other sites

They are in the subcategories as follows:

 

Binoculars -> Compact Binoculars -> Bausch & Lomb

Binoculars -> Full Size Binoculars -> Bausch & Lomb

 

 

This is how I would like the categories to be is there a way of changing what text is displayed in the drop down box. For example how could I add a field on the product description which is for the drop down box which is then read and displayed in the drop down box.

 

Thanks

Link to comment
Share on other sites

  • 1 month later...

I have a question related to this.

 

The drop-down we are talking about here seems to do things in two ways:

 

a) if somewhere in the store i click on a manufacturer name, i get a list of all products from this manufacturer displayed. The drop-down box at the top seems to now list the CATEGORIES in which this artist appears.

 

B) if i just navigate through the regular category menu (on the left side) into a category, the drop-down shows a list of all the artists in this category.

 

I love the drop down in scenario B), but would love to remove the drop-down in scenario a). Is there any way of doing this?

 

Thanks much,

Dan

Link to comment
Share on other sites

to CodeConfused:

to eliminate scenario A you can do this:

edit index.php (or default.php)

 

find this

if (PRODUCT_LIST_FILTER) {

     $filterlist = tep_db_query($filterlist_sql);

 

and add this right after it

if ($manufacturers_id) {

echo "";

}else{

 

then find this

// Get the right image for the top-right

and type } above this line

 

thanks

Link to comment
Share on other sites

hi prosto,

 

the code in my default.php looks slightly different (I have 2.2CVS May 18, 2003 snapshot).

 

this is the code i have:

 

// optional Product List Filter

   if (PRODUCT_LIST_FILTER > 0) {

     if (isset($HTTP_GET_VARS['manufacturers_id'])) {

       $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' and p.manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";

     } else {

       $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by m.manufacturers_name";

     }

     $filterlist_query = tep_db_query($filterlist_sql);



     if (tep_db_num_rows($filterlist_query) > 1) {

       echo '            <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'GET') . TEXT_SHOW . ' ';

       if (isset($HTTP_GET_VARS['manufacturers_id'])) {

         echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);

         $options = array(array('text' => TEXT_ALL_CATEGORIES));

       } else {

         echo tep_draw_hidden_field('cPath', $cPath);

         $options = array(array('text' => TEXT_ALL_MANUFACTURERS));

       }

       echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);

       while ($filterlist = tep_db_fetch_array($filterlist_query)) {

         $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);

       }

       echo tep_draw_pull_down_menu('filter_id', $options, $HTTP_GET_VARS['filter_id'], 'onchange="this.form.submit()"');

       echo '</form></td>' . "n";

     }

   }



// Get the right image for the top-right

 

how would i need to change this code to get rid of scenario A?

thanks much,

dan[/code]

Link to comment
Share on other sites

Can anybody tell me how to sort the manufarurers by my own sort order, I figure this could be a little code splice or a nightmare. I am currently having to prefix my entries with a number to force them to list in the order I want. Just to give you the bigger picture I've changed this funtions title to "Price Range".

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...