Latest News: (loading..)
Sign in to follow this  
Followers 0
andes1

manufacturer2 2.0

98 posts in this topic

Hey just wanted to say a huge thanks to everyone involved in this mod. I am working on a store where they want to create three groups (Companies, Styles and Designers) and then assign those entries to their products. This mod was absolutely perfect and works a treat. If you need an extra group or two - just take all the modifications in this contribution and duplicate them (change Manufactuers2 to Manufacturers3 and so on in each instance).

 

Thanks again - this contribution saved me many, many hours of extra work.

 

cheers

 

Jason

Share this post


Link to post
Share on other sites

Hi vey nice contribution

 

look o how they use the functionality .

 

http://www.perizitito.gr/product.php?produ...49368&page=

 

 

 

they have multiple authors per book but the url per author is like that:

http://www.perizitito.gr/authors.php?authorid=65797

http://www.perizitito.gr/authors.php?authorid=58442

 

 

and by clicking on an author when taken to the authors page you see all the entries even those that he is the second or third author .

 

Again thanks everyone involved in this contribution

Share this post


Link to post
Share on other sites

Hi to all!

 

I need some help to adapt this module for "manufacturers" to "manufacturers2", i test to modify but not work.

 

<?php

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

new infoBoxHeading($info_box_contents, true, false);

$info_box_contents = array();
$fullstring = '<table width=100% border=0 cellpadding=0 cellspacing=3><tr>';		
$row=0;
			$manufacturers_query = tep_db_query("select manufacturers_name, manufacturers_id, manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_image  not like '' order by manufacturers_name" );
				if (tep_db_num_rows($manufacturers_query) >= '1') {
					  while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
$row++;
$fullstring .= '<td align=center valign=middle class=smallText>';
$fullstring .= '<a href=' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] , 'NONSSL', false) . '>';
if ($manufacturers['manufacturers_image']) {
$fullstring .= '<img src='. DIR_WS_IMAGES . $manufacturers['manufacturers_image'] . ' width=56 height=46 border=0> ';
} else {
$fullstring .= '<a href=' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'], 'NONSSL', false) . '>'. $manufacturers['manufacturers_name'];
}
$fullstring .= '</a>';
$fullstring .= '</td>';
if ((($row / 7) == (double)floor($row / 7))) {
$fullstring .='<tr>';
 }

}

}
$fullstring .= '</td></tr></table>';		
 $info_box_contents = array();
  $info_box_contents[] = array('text' => $fullstring);
//echo $fullstring;

  new infoBox($info_box_contents);

?>

 

This module shows the manufacturers logo ;)

 

Thnks 4 your help!

 

P.D.: Sorry my bad english.

Share this post


Link to post
Share on other sites

I believe the box is manufacturers_info.php, the box that displays the manufacturers info in the right column on stock osc installs.

 

Create a page in includes/boxes/manufacturer2_info.php

 

Paste this there:

 

<?php
/*
 $Id: manufacturer2_info.php,v 1.11 2003/06/09 22:12:05 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 if (isset($HTTP_GET_VARS['products_id'])) {
$manufacturer2_query = tep_db_query("select m2.manufacturers2_id, m2.manufacturers2_name, m2.manufacturers2_image, mi2.manufacturers2_url from " . TABLE_MANUFACTURERS2 . " m2 left join " . TABLE_MANUFACTURERS2_INFO . " mi2 on (m2.manufacturers2_id = mi2.manufacturers2_id and mi2.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p  where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers2_id = m2.manufacturers2_id");
if (tep_db_num_rows($manufacturer2_query)) {
  $manufacturer2 = tep_db_fetch_array($manufacturer2_query);
?>
<!-- manufacturer2_info //-->
	  <tr>
		<td>
<?php
  $info_box_contents = array();
  $info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURER2_INFO);

  new infoBoxHeading($info_box_contents, false, false);

  $manufacturer2_info_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
  if (tep_not_null($manufacturer2['manufacturers2_image'])) $manufacturer2_info_string .= '<tr><td align="center" class="infoBoxContents" colspan="2">' . tep_image(DIR_WS_IMAGES . $manufacturer2['manufacturers2_image'], $manufacturer2['manufacturers2_name']) . '</td></tr>';
  if (tep_not_null($manufacturer2['manufacturers2_url'])) $manufacturer2_info_string .= '<tr><td valign="top" class="infoBoxContents">- </td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers2_id=' . $manufacturer2['manufacturers2_id']) . '" target="_blank">' . sprintf(BOX_MANUFACTURER2_INFO_HOMEPAGE, $manufacturer2['manufacturers2_name']) . '</a></td></tr>';
  $manufacturer2_info_string .= '<tr><td valign="top" class="infoBoxContents">- </td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers2_id=' . $manufacturer2['manufacturers2_id']) . '">' . sprintf(BOX_MANUFACTURER2_INFO_OTHER_PRODUCTS, $manufacturer2['manufacturers2_name']) . '</a></td></tr>' .
							   '</table>';

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

  new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- manufacturer2_info_eof //-->
<?php
}
 }
?>

 

in includes/languages/yourlanguage.php (Mine would be english.php)

 

Paste this at the bottom of that page:

 

// manufacturer2 box text
define('BOX_HEADING_MANUFACTURERS2', 'Change Me');
define('BOX_HEADING_MANUFACTURER2_INFO', 'Change Me Info');
define('BOX_MANUFACTURER2_INFO_HOMEPAGE', '%s Homepage');
define('BOX_MANUFACTURER2_INFO_OTHER_PRODUCTS', 'More from %s');

 

In includes/column_right.php add this:

 

 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer2_info.php');

 

Be sure you have that info table in includes/database_tables.php (I think it may have been missing in the original instructions)

 

  define('TABLE_MANUFACTURERS2_INFO', 'manufacturers2_info');

 

 

I have modified this code to work for my own store. You may need to tweak it to match your other boxes if it is different. Just copy these and change the 2 to a 3 and so on for more than one additional manufacturer.

 

I hope that is what you were looking for.

Edited by theantiquestore

Share this post


Link to post
Share on other sites

I need the ability to add various sports (manufacturers) to each product but not have them individually listed on the website. Ideally the ability to search by sport (manufacturer) that ties in all lists created. Does anyone know if this can do it?

 

Nav

Share this post


Link to post
Share on other sites

Hello

I have followed all the instruction on how to install extra manufacturers using "Manufacturer2_3_0"

 

However the Manufacturers 2 appears in the admin side, but not on the actual website in the left column. There still only exists the original Manufacturers. I have gone through it all again aswell, however still cannot work out the problem.

 

Please can anyone help

 

my website is www.firstnoor.co.uk/shop

 

Thank You

Share this post


Link to post
Share on other sites

Is anyone here using the contribution Quick Research? I've just finished installing it and would like to add all my manufacturers.

I'm having problems including them in the $from query where its states "left join, using manufacturers_id".

I know nothing about sql syntax and query commands, and after reading up on the USING command I still get a syntax error.

Share this post


Link to post
Share on other sites
I need the ability to add various sports (manufacturers) to each product but not have them individually listed on the website. Ideally the ability to search by sport (manufacturer) that ties in all lists created. Does anyone know if this can do it?

 

Nav

It would seem that if you don't want them to be visible on the catalog side, you don't include the boxes in left column.

Or am I| not getting what you're saying?

Share this post


Link to post
Share on other sites

I got it:

 $from_str = "from ((" . TABLE_PRODUCTS . " p) left join
		  (" . TABLE_MANUFACTURERS . " m) USING(manufacturers_id) left join
		  (" . TABLE_MANUFACTURERS3 . " m3) USING(manufacturers3_id) left join
		  (" . TABLE_MANUFACTURERS4 . " m4) USING(manufacturers4_id)) left join
		  " . TABLE_SPECIALS . " s on p.products_id = s.products_id";

This way it includes all the manufacturers in a search query on quick_search.php

Share this post


Link to post
Share on other sites

I've been trying to include the manufacturers name in the manufacturers2 product listing.

Does anyone know how to achieve this?

Edited by JSR

Share this post


Link to post
Share on other sites

I've been trying to include the manufacturers name in the manufacturers2 product listing.

Does anyone know how to achieve this?

I have not yet found the right sql query to achieve this so any help would be immensely appreciated... Anyone? Pls? :blush:

Share this post


Link to post
Share on other sites

Hello, thanks for this great contribution. I have successfully installed it but I would like to know how to change the aspect. It is currently setup as drop down list, I would like to have it as the category box.

 

I went to the setup in admin where you in maximum value, but when I changed that it disappeared.

 

Can anyone please help me?

 

Thank you.

Share this post


Link to post
Share on other sites

hello there ,

 

 

thx for the work ...

 

i would like to know if i can get advise about this problem i have:

 

 

in products_new.php .... the product_listing module send back all products whatever it is a manufacturer1 or 2 ....

 

the problem i have is : my product listing is supposed to return and write the name of manufacturer .... i get the name of manufacturer 1 but not from manufacturer2

 

 

 

in index.php we filter first to know if isset($HTTP_GET_VARS['manufacturers2_id']) , if so we request the database to return products that match manufacturer 2

 

 

 

can i get advise on how to return manufacturers name and manufacturers 2 name in the request made on products_new

 

 

 

thanks a lot , excuse my english skill !!

Edited by cijumaya

Share this post


Link to post
Share on other sites

ok i fix my problems ..just get a little bit problem in the search area.. that do not search in table manufacturer2

Share this post


Link to post
Share on other sites

Hello all,

first I would like to say thanks for a really great contribution! I installed it without any problems and I added, on a basic of code manufacturers2, a similar table "authors" authors.php... etc and it worked.

 

To the point:

 

I'm just wondering how to change a pull down menu in box manufacturers2.php and in advanced_search.php to an input field so the customer could write name of a manufacturer2 (or author in my case) and it would show the results page? Is it possible? My knowledge about sql an php is limited to "copy & paste" so any advices will be welcome :)

 

Thank you for any advice,

very sorry for my english, I'm not sure if I described my problem correctly... :(

Share this post


Link to post
Share on other sites

Was trying to install this contrib on my site, but there is'nt any /Includes/column_left.php in v2.3.1...

 

How can I get the on the frontend? Search seems to work in some way.

Share this post


Link to post
Share on other sites

Thank you for the reply Andes,

 

YES, It was a time consuming, but worth it.

I will be posting the 5 manufaturers install package soon so no one

else has to go through it again.

 

I gust have one bug and it's not with the manufacturers I installed.

 

It's my original manufaturers, I have it moded to work as Shop by price.

 

The additional box that shows with (All categories) when a price range is selected

is not sorting, It's just refreshing the page.

 

Any idea where I can find this bug?

 

Thanks again,

Ronnie

 

 

Hello I am very interested.

Where can I find this package of 5 manufacturers?

Share this post


Link to post
Share on other sites

Thanks a lot, Rachael!

Your sample helped me to show manufacturer2 on my product listing.

 

I added a data as PRODUCT_LIST_MANUFACTURER2 on configuration table.

And I duplicated PRODUCT_LIST_MANUFACTURER & renamed it as PRODUCT_LIST_MANUFACTURER2 on index.php and product_listing.php.

 

Thanks,

Aki

 

It's not that easy for me. Can you show me your complete index.php file? I got manufacturer 1, 2 and 3. The code itself seems ok. But I can only show one manufacturer at the time in the product listing. Not all together.

Share this post


Link to post
Share on other sites

It's not that easy for me. Can you show me your complete index.php file? I got manufacturer 1, 2 and 3. The code itself seems ok. But I can only show one manufacturer at the time in the product listing. Not all together.

 

hello

 

first this is for 2.2 version of oscommerce.

second, do the same steps in order to create manufacturers 3,4,5 etc

Share this post


Link to post
Share on other sites

Hi this is a wonderful little add-on, but I am having one problem that I have identified is somewhere in the index portion. I have three little pulldown menus in my column_left.php that operate from manufacturers.php, manufacturers2.php, and categories.php in that order. When I add the code to my index in the instructions, it does not function. I copied the code in my index that uses manufacturers and just started adding the 2 on the end of everything. The manufacturers2 works great after that, but the regular manufactures.php and categories.php no long sort...something with the filter? I've included my code below and a screenshot of the pulldown menus. Does anyone know how I might get all three functioning?

(I have the manufactures2 section commented out for now so the other two pulldowns work)

<?php
/*
 $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2003 osCommerce
 Released under the GNU General Public License
 960 grid system adapted from Nathan Smith http://960.gs/
 OSCommerce on CSS Grid960 v2.0 http://www.niora.com/css-oscommerce.php
*/
 require('includes/application_top.php');
 // fix manufacture reset bug
if (isset($_GET['manufacturers_id']) && !tep_not_null($_GET['manufacturers_id'])) { tep_redirect(tep_href_link(FILENAME_DEFAULT));} 
// the following cPath references come from application_top.php
 $category_depth = 'top';
 if (isset($cPath) && tep_not_null($cPath)) {
   $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
   $cateqories_products = tep_db_fetch_array($categories_products_query);
   if ($cateqories_products['total'] > 0) {
	if ($cateqories_products['total'] == 1)

{

 $query = tep_db_query("select p2c.products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where categories_id = '" . (int)$current_category_id . "'");

$prods_arr = tep_db_fetch_array($query);

$prods_id = $prods_arr['products_id'];

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO,'products_id='.$prods_id));

}


     $category_depth = 'products'; // display products
   } else {
     $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
     $category_parent = tep_db_fetch_array($category_parent_query);
     if ($category_parent['total'] > 0) {
       $category_depth = 'nested'; // navigate through the categories
     } else {
       $category_depth = 'products'; // category has no products, but display the 'no products' message
     }
   }
 }
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
echo $doctype;

?>
<html <?php echo HTML_PARAMS; ?>>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<?php echo $stylesheet; ?>
<?php // Start Banner Rotator; ?>
 <script type="text/javascript" src="includes/functions/jquery-1.4.2.min.js"></script>
 <script type="text/javascript" src="includes/functions/bannerRotator.js"></script>
 <script type="text/javascript">
   $(document).ready(function(){
     bannerRotator('#bannerRotator', 500, 5000);
   });
 </script>
<?php // End Banner Rotator; ?>

<?php require(DIR_WS_INCLUDES . 'template-top.php'); ?>
<?php
if ($category_depth == 'nested') {
    $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
    $category = tep_db_fetch_array($category_query);

?>
<link href="css/styles.css" rel="stylesheet" type="text/css">

<?php include (DIR_WS_INCLUDES . 'page-header-inc.htc'); ?>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.dent {
margin-left: 25px;
}
-->
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="js/zoomer.jquery.js"></script>
<script type="text/javascript">
       $(function() {

       	$("#wrap").anythingZoomer({

       	   expansionSize: 30,
       	   speedMultiplier: 2.2

       	});

       });
   </script>
<script type="text/javascript">

 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-22883692-2']);
 _gaq.push(['_setDomainName', 'none']);
 _gaq.push(['_setAllowLinker', true]);
 _gaq.push(['_trackPageview']);

 (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();

</script>
</head>
<span class="leftfloat"><h1><?php echo HEADING_TITLE; ?></h1></span>

<?php
echo tep_draw_separator('pixel_trans.gif', '100%', '10'); 
   if (isset($cPath) && strpos('_', $cPath)) {

// check to see if there are deeper categories within the current category
     $category_links = array_reverse($cPath_array);
     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
       $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
       $categories = tep_db_fetch_array($categories_query);

       if ($categories['total'] < 1) {
         // do nothing, go through the loop
       } else {
         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
         break; // we've found the deepest category the customer is in
       }
     }
   } else {
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
   }
   while ($categories = tep_db_fetch_array($categories_query)) { 
     $cPath_new = tep_get_path($categories['categories_id']);  
     echo '                <div class="pl categories"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></div>' . "\n";   
   }

// needed for the new products module shown below
   $new_products_category_id = $current_category_id;
?>
<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); 
 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
   $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                        'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
					 'PRODUCT_LIST_SUBNAME' => PRODUCT_LIST_SUBNAME,
                        'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
                        'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                        'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                        'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                        'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                        'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

   asort($define_list);
  $column_list = array();
  reset($define_list);
   while (list($key, $value) = each($define_list)) {
     if ($value > 0) $column_list[] = $key;
   }
   $select_column_list = '';
   for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
     switch ($column_list[$i]) {
       case 'PRODUCT_LIST_MODEL':
         $select_column_list .= 'p.products_model, ';
         break;
       case 'PRODUCT_LIST_NAME':
         $select_column_list .= 'pd.products_name, ';
         break;
	  case 'PRODUCT_LIST_SUBNAME':
         $select_column_list .= 'pd.products_subname, ';
         break;
       case 'PRODUCT_LIST_MANUFACTURER':
         $select_column_list .= 'm.manufacturers_name, ';
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $select_column_list .= 'p.products_quantity, ';
         break;
       case 'PRODUCT_LIST_IMAGE':
         $select_column_list .= 'p.products_image, ';
         break;
      case 'PRODUCT_LIST_WEIGHT':
         $select_column_list .= 'p.products_weight, ';
         break;
     }
   }

// show the products of a specified manufacturer
// BOF qpbpp
   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
       //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
     } else {
// We show them all
       //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
     }
   } else {
// show the products in a given categorie
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
       //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     } else {
// We show them all
       //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     }
   }
//EOF qpbpp
   if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
     for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
       if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
         $HTTP_GET_VARS['sort'] = $i+1 . 'a';
         $listing_sql .= " order by pd.products_name";
         break;
       }
     }
   } else {
     $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
     $sort_order = substr($HTTP_GET_VARS['sort'], 1);

     switch ($column_list[$sort_col-1]) {
       case 'PRODUCT_LIST_MODEL':
         $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

         break;
       case 'PRODUCT_LIST_NAME':
         $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
         break;
	   case 'PRODUCT_LIST_SUBNAME':
         $listing_sql .= " order by pd.products_subname " . ($sort_order == 'd' ? 'desc' : '');
         break;
       case 'PRODUCT_LIST_MANUFACTURER':
         $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_IMAGE':
         $listing_sql .= " order by pd.products_name";
         break;
       case 'PRODUCT_LIST_WEIGHT':
         $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_PRICE':
         $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
     }
   }
?>
   <h1><?php echo HEADING_TITLE; ?></h1>
<?php
// Get the right image for the top-right
   $image = DIR_WS_IMAGES . 'table_background_list.gif';
   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
     $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
     $image = tep_db_fetch_array($image);
    $image = $image['manufacturers_image'];

   } elseif ($current_category_id) {
    $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
     $image = tep_db_fetch_array($image);
     $image = $image['categories_image'];
   }
?>	

   <?php
   // manufacturers image  
   echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT,'','stock-image'); 
   ?>
  <div class="clear"></div> 
 <?php 

// start 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 = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$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 = '" . (int)$current_category_id . "' order by m.manufacturers_name";
     }
     $filterlist_query = tep_db_query($filterlist_sql);
     if (tep_db_num_rows($filterlist_query) > 1) {
       echo '            <div class="right">' . 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('id' => '', 'text' => TEXT_ALL_CATEGORIES));
       } else {
         echo tep_draw_hidden_field('cPath', $cPath);
         $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
       }

       echo tep_draw_hidden_field('sort', $_GET['sort']).(isset($_GET['list']) ? tep_draw_hidden_field('list', $_GET['list']) : '') . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '');
       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, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
       echo tep_hide_session_id() . '</form></div><div class="clear"></div>' . "\n";
     }
   }	



/*  } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers2_id'])) {
// create column list
   $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                        'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
					 'PRODUCT_LIST_SUBNAME' => PRODUCT_LIST_SUBNAME,
                        'PRODUCT_LIST_MANUFACTURER2' => PRODUCT_LIST_MANUFACTURER2,
                        'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                        'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                        'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                        'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                        'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

   asort($define_list);
  $column_list = array();
  reset($define_list);
   while (list($key, $value) = each($define_list)) {
     if ($value > 0) $column_list[] = $key;
   }
   $select_column_list = '';
   for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
     switch ($column_list[$i]) {
       case 'PRODUCT_LIST_MODEL':
         $select_column_list .= 'p.products_model, ';
         break;
       case 'PRODUCT_LIST_NAME':
         $select_column_list .= 'pd.products_name, ';
         break;
	  case 'PRODUCT_LIST_SUBNAME':
         $select_column_list .= 'pd.products_subname, ';
         break;
       case 'PRODUCT_LIST_MANUFACTURER2':
         $select_column_list .= 'm.manufacturers2_name, ';
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $select_column_list .= 'p.products_quantity, ';
         break;
       case 'PRODUCT_LIST_IMAGE':
         $select_column_list .= 'p.products_image, ';
         break;
      case 'PRODUCT_LIST_WEIGHT':
         $select_column_list .= 'p.products_weight, ';
         break;
     }
   }

// show the products of a specified manufacturer
// BOF qpbpp
   if (isset($HTTP_GET_VARS['manufacturers2_id'])) {
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
       //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers2_id, p.products_price, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS2 . " m2, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers2_id = m2.manufacturers2_id and m2.manufacturers2_id = '" . (int)$HTTP_GET_VARS['manufacturers2_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
     } else {
// We show them all
       //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers2_id, p.products_price, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS2 . " m2 where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers2_id = m2.manufacturers2_id and m2.manufacturers2_id = '" . (int)$HTTP_GET_VARS['manufacturers2_id'] . "'";
     }
   } else {
// show the products in a given categorie
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
       //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers2_id, p.products_price, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS2 . " m2, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers2_id = m2.manufacturers2_id and m2.manufacturers2_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     } else {
// We show them all
       //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers2_id, p.products_price, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS2 . " m2 on p.manufacturers2_id = m2.manufacturers2_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     }
   }
//EOF qpbpp
   if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
     for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
       if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
         $HTTP_GET_VARS['sort'] = $i+1 . 'a';
         $listing_sql .= " order by pd.products_name";
         break;
       }
     }
   } else {
     $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
     $sort_order = substr($HTTP_GET_VARS['sort'], 1);
  $listing_sql .= ' order by ';

     switch ($column_list[$sort_col-1]) {
       case 'PRODUCT_LIST_MODEL':
         $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

         break;
       case 'PRODUCT_LIST_NAME':
         $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
         break;
	   case 'PRODUCT_LIST_SUBNAME':
         $listing_sql .= " order by pd.products_subname " . ($sort_order == 'd' ? 'desc' : '');
         break;
       case 'PRODUCT_LIST_MANUFACTURER2':
         $listing_sql .= " order by m2.manufacturers2_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_IMAGE':
         $listing_sql .= " order by pd.products_name";
         break;
       case 'PRODUCT_LIST_WEIGHT':
         $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_PRICE':
         $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
     }
   }
?>
   <h1><?php echo HEADING_TITLE; ?></h1>
<?php
// Get the right image for the top-right
   $image = DIR_WS_IMAGES . 'table_background_list.gif';
   if (isset($HTTP_GET_VARS['manufacturers2_id'])) {
     $image = tep_db_query("select manufacturers2_image from " . TABLE_MANUFACTURERS2. " where manufacturers2_id = '" . (int)$HTTP_GET_VARS['manufacturers2_id'] . "'");
     $image = tep_db_fetch_array($image);
    $image = $image['manufacturers2_image'];

   } elseif ($current_category_id) {
    $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
     $image = tep_db_fetch_array($image);
     $image = $image['categories_image'];
   }
?>	

   <?php
   // manufacturers image  
   echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT,'','stock-image'); 
   ?>
  <div class="clear"></div> 
 <?php 

// start optional Product List Filter

if (PRODUCT_LIST_FILTER > 0) {
     if (isset($HTTP_GET_VARS['manufacturers2_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 = '" . (int)$languages_id . "' and p.manufacturers2_id = '" . (int)$HTTP_GET_VARS['manufacturers2_id'] . "' order by cd.categories_name";
     } else {
       $filterlist_sql= "select distinct m2.manufacturers2_id as id, m2.manufacturers2_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS2 . " m2 where p.products_status = '1' and p.manufacturers2_id = m2.manufacturers2_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m2.manufacturers2_name";
     }
     $filterlist_query = tep_db_query($filterlist_sql);
     if (tep_db_num_rows($filterlist_query) > 1) {
       echo '            <div class="right">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' ';

       if (isset($HTTP_GET_VARS['manufacturers2_id'])) {
         echo tep_draw_hidden_field('manufacturers2_id', $HTTP_GET_VARS['manufacturers2_id']);

         $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
       } else {
         echo tep_draw_hidden_field('cPath', $cPath);
         $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS2));
       }

       echo tep_draw_hidden_field('sort', $_GET['sort']).(isset($_GET['list']) ? tep_draw_hidden_field('list', $_GET['list']) : '') . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '');
       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, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
       echo tep_hide_session_id() . '</form></div><div class="clear"></div>' . "\n";
     }
   }*/

include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
 } else { 
?> 
<div class="indhide"> 
<div class="grid_8 alpha">

<?php require('souvenirs.php'); ?>
<?php require('category_map.php'); ?>
</div></div>
<?php 
 }
require(DIR_WS_INCLUDES . 'template-bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php'); 
?>

post-278577-0-07043000-1314116291_thumb.jpg

Edited by steffanih

Share this post


Link to post
Share on other sites

Hello. I appreciate this contribution. It helps me a lot.

But I have a problem same as lsousa04.

I installed MANUFACTURER2 MODULE but when I add or update a product, I can't save manufacturer2.

The data is saved except manufacturers2_id.

 

I checked sql which is provided and saw my database. There is manufacturers2_id column in products table.

And I checked installation of the module. I think I did as it says.

I didn't get 'check the code that write on your db. consult the installation instucctions'.

 

Could anyone give me some advice?

 

i have the same problem with this contribution.... What's the solution to make it work ?

Something else, the manufacturers_2 box doesn't appear, and there's no manufacturer in categories...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0