Forums / Templates, Stylesheets, Page Layout / Display manufacturer logos instead of list

Display manufacturer logos instead of list

Views: 1,194

Results 1 to 10 of 10
14 Apr 2011, 4:49 AM
#1
aself avatar

aself

New Zenner

Join Date:
Feb 2011
Posts:
29
Plugin Contributions:
0

Display manufacturer logos instead of list

I've searched the forum but haven't been able to find what I'm trying to do. In the manufacturer sidebox, I'd like to remove the box listing the manufacturers and only display their logos. Is that possible?

14 Apr 2011, 6:27 AM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Display manufacturer logos instead of list

Could try this Add On:

Sidebox for list Manufacturers logos

Hope this helps!

14 Apr 2011, 8:32 PM
#3
aself avatar

aself

New Zenner

Join Date:
Feb 2011
Posts:
29
Plugin Contributions:
0

Re: Display manufacturer logos instead of list

Worked great - thank you!:clap:

14 Apr 2011, 9:09 PM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Display manufacturer logos instead of list

Glad this worked for you!

19 Sep 2012, 1:25 PM
#5
geryjuhasz avatar

geryjuhasz

New Zenner

Join Date:
Jun 2012
Posts:
14
Plugin Contributions:
0

Re: Display manufacturer logos instead of list

I downloaded it, copied those 2 files, enabled the sidebox from admin,but nothing shows up.Any ideea?
Best regards.

20 Sep 2012, 10:59 AM
#6
geryjuhasz avatar

geryjuhasz

New Zenner

Join Date:
Jun 2012
Posts:
14
Plugin Contributions:
0

Re: Display manufacturer logos instead of list

got it.it was really simple

14 Apr 2013, 1:15 AM
#7
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: Display manufacturer logos instead of list

rbarbour:

Could try this Add On:

Sidebox for list Manufacturers logos

Hope this helps!

Hi,

Does anyone know how to make this work in Zen Cart v1.5.1 please?

Here are the 2 files of code:

includes/modules/sideboxes/classic/manufacturers_img.php

<?php
/**
 * manufacturers_img sidebox - displays a list of manufacturers logos so customer can choose to filter on their products only
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id:modification of manufacturers.php 2834 2006-01-11 22:16:37Z birdbrain $
 * @ modify by: Alejandro Hurtado <ahurt2000######################>
 */

// test if manufacturers sidebox should show
  $show_manufacturers= true;


// for large lists of manufacturers uncomment this section
/*
  if (($_GET['main_page']==FILENAME_DEFAULT and ($_GET['cPath'] == '' or $_GET['cPath'] == 0)) or  ($request_type == 'SSL')) {
    $show_manufacturers= false;
  } else {
    $show_manufacturers= true;
  }
*/


if ($show_manufacturers) {
  // uncomment this section for fast response if you not use the URL manufacturers link
  /*
  $manufacturer_sidebox_img_query = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
                            from " . TABLE_MANUFACTURERS . " m
                            order by manufacturers_name";
  */                          
  $manufacturer_sidebox_img_query = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url
                            from " . TABLE_MANUFACTURERS . " m
                           left join " . TABLE_MANUFACTURERS_INFO . " mi
                           on (m.manufacturers_id = mi.manufacturers_id
                           and mi.languages_id = '" . (int)$_SESSION['languages_id'] . "')
                            ORDER BY RAND() LIMIT 0,". BOX_MANUFACTURER_MAX_LOGOS ;
                            

  $manufacturer_sidebox_img = $db->Execute($manufacturer_sidebox_img_query);

  if ($manufacturer_sidebox_img->RecordCount()>0) {

      require($template->get_template_dir('tpl_manufacturers_img_select.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_manufacturers_img_select.php');


    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
  }
} // $show_manufacturers
?>

includes/templates/sideboxes/classic/tpl_manufacturers_img_select.php

<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: modification of tpl_manufacturers_select.php 4771 2006-10-17 05:32:42Z ajeh $
 * @modify by Alejandro Hurtado <ahurt2000######################>
 */
  if (!defined(BOX_HEADING_MANUFACTURERS_IMG)) define(BOX_HEADING_MANUFACTURERS_IMG,'Manufacturers'); // define sidebox header
  if (!defined(BOX_MANUFACTURER_HOMEPAGE_IMG)) define(BOX_MANUFACTURER_HOMEPAGE_IMG,'web');			 // define link to manufacturers URL 
  
  $title = '<label>' . BOX_HEADING_MANUFACTURERS_IMG . '</label>';
  $title_link = false;
  $content = "";
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
  while (!$manufacturer_sidebox_img -> EOF){
    $content.='<div >';
	$content.='<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_sidebox_img->fields['manufacturers_id']) . '">';		
	$content.=zen_image(DIR_WS_IMAGES . $manufacturer_sidebox_img->fields['manufacturers_image'], $manufacturer_sidebox_img->fields['manufacturers_name']);
	$content.= '</a></div>';
	if (zen_not_null($manufacturer_sidebox_img->fields['manufacturers_url']))
		$content.='<a href="' . zen_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturer_sidebox_img->fields['manufacturers_id']) . '" target="_blank">' . sprintf(BOX_MANUFACTURER_HOMEPAGE_IMG, $manufacturer_sidebox_img->fields['manufacturers_name']) . '</a>';
	
	$manufacturer_sidebox_img->MoveNext();
  }
  $content .= '</div>';
?>

Any suggestions would be much appreciated. :blink:

14 Apr 2013, 1:36 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Display manufacturer logos instead of list

tpl_manufacturers_img_select.php needs to be in both the default and templates and overrides ...

You are also missing the define:

define('BOX_MANUFACTURER_MAX_LOGOS', '10');

Sticking it at the top of manufacturers_img.php works a quick solution ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Apr 2013, 9:13 PM
#9
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: Display manufacturer logos instead of list

Ajeh:

tpl_manufacturers_img_select.php needs to be in both the default and templates and overrides ...

You are also missing the define:

define('BOX_MANUFACTURER_MAX_LOGOS', '10');

> 
> Sticking it at the top of manufacturers_img.php works a quick solution ...

Once again thank you for your help Ajeh! :D
15 Apr 2013, 10:36 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Display manufacturer logos instead of list

You are most welcome ... glad that this is now working for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!