Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Changing Manufacturer's Image Size in 'Manufacturers Info' Side Box

    Hi Forum Users.....

    I've been trying to find a way to control the size of the image in the Manufacturer's Info sidebox that appears when in item description.

    Where is the variable the controls such stored, and is there an easy way to change it from the Admin controls?

    Thanks!

    Donn

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Changing Manufacturer's Image Size in 'Manufacturers Info' Side Box

    In a default cart the manufacturer image doesn't have admin-configurable dimensions: it just displays the stored image at it's natural size.

    To make the image size controllable from Admin, you'll need to add a couple of configuration keys to the database. Copy the query below and paste it into the box at Admin > Tools > Install SQL Patches, then click the Send button. You'll then have the two new configuration keys available to edit at the bottom of the page at Admin > Configuration > Images.
    Code:
    INSERT INTO configuration (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Manufacturer Sidebox Image Width', 'IMAGE_MANUFACTURER_WIDTH', '100', 'Default = 100', 4, 80, NULL, NOW(), NULL, NULL);
    INSERT INTO configuration (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Manufacturer Sidebox Image Height', 'IMAGE_MANUFACTURER_HEIGHT', '80', 'Default = 80', 4, 81, NULL, NOW(), NULL, NULL);
    Now you'll have to make an override copy of includes/templates/template_default/sideboxes/tpl_manufacturer_info.php and edit that new file to change this section of code:
    Code:
     zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image'], $manufacturer_info_sidebox->fields['manufacturers_name'])
    to this:
    Code:
    zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image'], $manufacturer_info_sidebox->fields['manufacturers_name'], IMAGE_MANUFACTURER_WIDTH, IMAGE_MANUFACTURER_HEIGHT)
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Changing Manufacturer's Image Size in 'Manufacturers Info' Side Box

    Quote Originally Posted by bunyip View Post
    In a default cart the manufacturer image doesn't have admin-configurable dimensions: it just displays the stored image at it's natural size.

    To make the image size controllable from Admin, you'll need to add a couple of configuration keys to the database. Copy the query below and paste it into the box at Admin > Tools > Install SQL Patches, then click the Send button. You'll then have the two new configuration keys available to edit at the bottom of the page at Admin > Configuration > Images.
    OK, thanks...I applied the SQL patch and it worked!!

    I was trying to find the manufacturers info file among the various tpl*.php files. (It seemed the TPL files all deal with screen output, so I figured there should be a TPL file for this, too.)

    I was looking for the manufacturer info tpl file, but I didn't even realize it SHOULD be in the sidebox folder, and so I didn't look there.

  4. #4
    Join Date
    Jun 2007
    Location
    Laurinburg, NC
    Posts
    165
    Plugin Contributions
    0

    Default Re: Changing Manufacturer's Image Size in 'Manufacturers Info' Side Box

    It was hard to find but I did find it and used it. Works Great and I used the template override system:
    /home /www /shop.nilandsplace.com /camp /includes /templates /Your custom template /sideboxes/ tpl_manufacturer_info.php
    Thanks James AKA Makoshark
    Last edited by Makoshark; 26 May 2009 at 07:43 PM. Reason: make it stand out

  5. #5
    Join Date
    Jun 2007
    Location
    Laurinburg, NC
    Posts
    165
    Plugin Contributions
    0

    Default Re: Changing Manufacturer's Image Size in 'Manufacturers Info' Side Box

    I got the code right the first time

    If anyone wants to see this in action I have set up a test account. So please do not create accounts for testing
    You can use this to test. User: [email protected] and the password is test1234
    Here is my website click Nilands Place Campsite
    Have Fun makoshark AKA James

  6. #6
    Join Date
    Apr 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Changing Manufacturer's Image Size in 'Manufacturers Info' Side Box

    That code mod worked like a charm! You're my Zencart hero!

  7. #7
    Join Date
    Feb 2011
    Posts
    3
    Plugin Contributions
    0

    Default Re: Changing Manufacturer's Image Size in 'Manufacturers Info' Side Box

    bunyip thanks for your easy to follow, perfect solution!

 

 

Similar Threads

  1. Manufacturer Info Side Box: Auto Resize Image
    By Jucks in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Jan 2011, 07:24 AM
  2. manufacturers side box is not showing the manufacturers list inside it
    By shresthashree in forum Basic Configuration
    Replies: 2
    Last Post: 31 Oct 2010, 02:49 PM
  3. changing font size and look of a side box
    By artifaxworthing in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 Sep 2010, 05:15 PM
  4. Need to change manufacturer side box, not normal side box
    By paha in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 12 Jul 2008, 01:23 AM
  5. image size side box
    By saman in forum General Questions
    Replies: 3
    Last Post: 28 Jun 2007, 04:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg