Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Alter Manufactor infobox


Guest

Recommended Posts

Hi to all, is there a way that I can get my manufactor infobox to act exactly like my category infobox?? I want to display different products in my manufactors box but how do I get it to act like a category box....I already changed the name of the manufactor box....

Link to comment
Share on other sites

There is a contribution that will display all of the products related to a manufacturer when a manufacturer is clicked. I don't recall its name though but I believe it is in the infobox section. There is also a menu type one that displays the paths with a mouse over. See my contributions for that one.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi to all, is there a way that I can get my manufactor infobox to act exactly like my category infobox?? I want to display different products in my manufactors box but how do I get it to act like a category box....I already changed the name of the manufactor box....

 

 

Hi,

 

I just tried to find a solution for your query

 

Please checkout following link

 

http://www.oscommerce.com/forums/index.php?showtopic=164239

 

I hope your problem solve with this link :)

 

Thanks

Narayan K

India

Link to comment
Share on other sites

Hi,

 

I tested following code for your query

 

 

open manufacturers.php (/boxes) (make sure you have taken backup up that file before editing it.)

 

 

find following code and delete it

 

 $info_box_contents = array();
   $info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURERS);

   new infoBoxHeading($info_box_contents, false, false);

   if ($number_of_rows <= MAX_DISPLAY_MANUFACTURERS_IN_A_LIST) {
// Display a list
     $manufacturers_list = '';
     while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
       $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
       if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>';
       $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';
     }

     $manufacturers_list = substr($manufacturers_list, 0, -4);

     $info_box_contents = array();
     $info_box_contents[] = array('text' => $manufacturers_list);
   } else {
// Display a drop-down
     $manufacturers_array = array();
     if (MAX_MANUFACTURERS_LIST < 2) {
       $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
     }

     while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
       $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
       $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
                                      'text' => $manufacturers_name);
     }

     $info_box_contents = array();
     $info_box_contents[] = array('form' => tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'),
                                  'text' => tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"') . tep_hide_session_id());
   }

   new infoBox($info_box_contents);

 

add these line in place

$info_box_contents = array();
  $info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURERS);

  new infoBoxHeading($info_box_contents, false, false);


//hack by Monika in Germany to show manufacturer names, clickable, instead of dropdown

// Display a list
    $manufacturers_list = '';
    while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
      $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
      if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>';
      $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';
    }

    $manufacturers_list = substr($manufacturers_list, 0, -4);

    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'center',
                   'text' => $manufacturers_list);

  new infoBox($info_box_contents);

 

 

Narayan K

India

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...