Zen Cart Logo

Manufacturers logo

Locked

Views: 1,221

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
13 May 2010, 8:43 PM
#1
fredz avatar

fredz

New Zenner

Join Date:
Jan 2007
Posts:
66
Plugin Contributions:
0

Manufacturers logo

Hi Everyone

I am wanting to know if there is a way of scaling a manufacturers logo to automatically fit within the sidebox.

The Problem: I have dowmloaded various manufacturers logos and have uploaded them directly to my site. But a number of them are far to big for the sidebox. I didn't want to have to go through the several hundred logos I have and rescale them manually and then have to reload them all.

I look forward to your comments.

Regards

Fred

13 May 2010, 8:49 PM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,182
Plugin Contributions:
0

Re: Manufacturers logo

Fred,
I am sorry, but I believe you will have to take the time and use Photoshop and resize each Mfg logo to the width of the sidebox you are using...

13 May 2010, 8:58 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Manufacturers logo

It would be best to use the right sizes, but if push comes to shove you could customize the template file for the sidebox and add in the parameters for the images ...

  $content .= '<div class="centeredContent">' . zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image'], $manufacturer_info_sidebox->fields['manufacturers_name']) . '</div>';
13 May 2010, 11:56 PM
#4
fredz avatar

fredz

New Zenner

Join Date:
Jan 2007
Posts:
66
Plugin Contributions:
0

Re: Manufacturers logo

I had no idea on how to modify that line so I scaled all images to fit the sidebar.

I found that if you have imagemagic installed you can use the commandline "mogrify -resize 140 *.jpg" to scale all .jpg files to 140px wide and retains the aspect ratio. Just change the extention to modify the image type.

It would be helpfull if there was a mod to display manufacturers logos inside the sidebox and have that size dependent on the width you have your sidebox set to.

I am not a coder so I am not even going to attempt it.

Regards

Fred

2 Jul 2010, 3:39 PM
#5
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Manufacturers logo

I would be grateful if someone could say if there is any easy way of adding the manufacturer's logo to the results page when someone selects a particular manufacturer from the drop-down menu on the main page. THX.

2 Jul 2010, 8:35 PM
#6
fredz avatar

fredz

New Zenner

Join Date:
Jan 2007
Posts:
66
Plugin Contributions:
0

Re: Manufacturers logo

Under Tools|Layout Boxes Controller there are 2 manufacturers side boxes.

manufacturer_info.php
manufacturers_list.php

manufacturers_list.php provides the list of manufacturers you refer to.

manufacturer_info.php displays the manufacturers information. This is only displayed once you have selected a product from the list.

Example, you select Sony from the list, it will display a list of products from that manufacturer, once you select a product the manufacturers details will display.

I don't know how to display the manufacturers information prior to selecting a product.

Regards

Fred

5 Jul 2010, 6:34 PM
#7
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Manufacturers logo

Thanks, both of those sideboxes are on. I tried what you suggested but still can't see logos.

5 Jul 2010, 8:08 PM
#8
fredz avatar

fredz

New Zenner

Join Date:
Jan 2007
Posts:
66
Plugin Contributions:
0

Re: Manufacturers logo

Sorry if these are really stupid questions, but sometimes we assume to much.

  1. Did you create the required manufacturers under Catalog|Manufacturers with their associated logos?
  2. When you created the products did you select a manufacturer from the list (Products Manufacturer:)
  3. Are the logos in the correct format. I only use .jpg .gif .png files.

The assumption here is that you used the default manufacturers directory to save the logos.

Regards

Fred

5 Jul 2010, 8:45 PM
#9
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Manufacturers logo

Not stupid, and yes I did all of those things.

5 Jul 2010, 9:15 PM
#10
fredz avatar

fredz

New Zenner

Join Date:
Jan 2007
Posts:
66
Plugin Contributions:
0

Re: Manufacturers logo

I am using a custom template and have just checked to see if I had done something custom to get manufacturers logos working.

I do have a custom template for the manufacturers list but not the logo.

Here is my /includes/templates/template_default/sideboxes/tpl_manufacturer_info.php

<?php
/**
 * Side Box Template
 *
 * @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: tpl_manufacturer_info.php 3429 2006-04-13 06:11:47Z ajeh $
 */
  $content = "";
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
      if (zen_not_null($manufacturer_info_sidebox->fields['manufacturers_image']))
  $content .= '<div class="centeredContent">' . zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image'], $manufacturer_info_sidebox->fields['manufacturers_name']) . '</div>';
  $content .= '<ul style="margin: 0; padding: 0; list-style-type: none;">' . "\n" ;
      if (zen_not_null($manufacturer_info_sidebox->fields['manufacturers_url']))
  $content .= '<li><a href="' . zen_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturer_info_sidebox->fields['manufacturers_id']) . '" target="_blank">' . sprintf(BOX_MANUFACTURER_INFO_HOMEPAGE, $manufacturer_info_sidebox->fields['manufacturers_name']) . '</a></li>' . "\n" ;
  $content .= '<li><a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_info_sidebox->fields['manufacturers_id']) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a></li>' . "\n" ;
  $content .= '</ul>' . "\n" ;
  $content .= '</div>';
?>

Also check that the actual logo file exists in /images/manufacturers

Question: Do product images show as expected?

Apart from this I have no real suggestions.

Regards

Fred

5 Jul 2010, 9:26 PM
#11
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Manufacturers logo

Thanks, yes the logos are in the right folder and I can see all my other pictures. Perhaps it is something in the page template... anyway, I think I can pick up something from your custom code - thanks.

5 Jul 2010, 9:32 PM
#12
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Manufacturers logo

OK can now see the logo in the left hand sidebox on the product pages. Thanks.