Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jun 2006
    Posts
    3
    Plugin Contributions
    0

    Default Manufacturer Image in Product Display

    Zen Cart v.1.3.0.1

    K, what im looking to do is display the manufacturer image in the product info display page. After doing a little searching, came across this which looked very promising...

    From this thread: Manufacturer's Url In Product Info Display

    Please consider that I'm not a programmer, just a GFX designer, but I'm guessing that this of course was for an older version of Zen Cart. So essentially, can someone please walk me through adding the Manufacturers image on the page or help me revise this to make it work with the new version of Zen Cart?


    in tpl_product_info_display.php

    <td align="left">

    <?php echo '<a href ="' . $manufacturers_url . '" target="_blank">[img]images/' . $manufacturers_image .'[/img]</a>';?></td>

    in main_template_vars.php

    $manufacturers_image= zen_get_products_manufacturers_image((int)$_GET['products_id']);

    IN general.php

    function zen_get_products_manufacturers_image($product_id) {
    global $db;

    $product_query = "select m.manufacturers_image
    from " . TABLE_PRODUCTS . " p, " .
    TABLE_MANUFACTURERS . " m
    where p.products_id = '" . (int)$product_id . "'
    and p.manufacturers_id = m.manufacturers_id";
    $product =$db->Execute($product_query);
    return $product->fields['manufacturers_image'];}


    now it shows a logo

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Manufacturer Image in Product Display

    As you are most probably a distributor for these mfg's, I would try to get images from them and use these for the image that you load when setting up your product. This precludes any linking problems like their site is down or they have moved or deleted, or renamed the image.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Manufacturer Image in Product Display

    Look for the code:
    PHP Code:
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
    And then replace with:
    PHP Code:
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
      <?php
       
    if ($check_image zen_get_products_manufacturers_image((int)$_GET['products_id'])) {
         echo 
    zen_image(DIR_WS_IMAGES $check_image);
       } else {
         echo 
    'NO IMAGE';
       }
     
    ?>
    You will need to do the designer thing as to how you want this to look ... and you can change that echo 'NO IMAGE'; to // echo 'NO IMAGE'; so you do not see it on manufacturers with no image defined ...
    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: v1.5.5]
    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!

  4. #4
    Join Date
    Jan 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Manufacturer Image in Product Display

    Where does this code go? i did a search and found 8 matches



    Quote Originally Posted by Ajeh View Post
    Look for the code:
    PHP Code:
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
    And then replace with:
    PHP Code:
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
      <?php
       
    if ($check_image zen_get_products_manufacturers_image((int)$_GET['products_id'])) {
         echo 
    zen_image(DIR_WS_IMAGES $check_image);
       } else {
         echo 
    'NO IMAGE';
       }
     
    ?>
    You will need to do the designer thing as to how you want this to look ... and you can change that echo 'NO IMAGE'; to // echo 'NO IMAGE'; so you do not see it on manufacturers with no image defined ...

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Manufacturer Image in Product Display

    Each of the Product Types has its own template such as Product General which uses:
    /includes/templates/template_default/tpl_product_info_display.php

    This gets copied to your templates and overrides directory ...

    Then find the code to replace and change it in your override file ...

    If you use the other product types, you would need to customize those files too ...
    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: v1.5.5]
    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!

  6. #6
    Join Date
    Aug 2006
    Location
    ulaanbaatar
    Posts
    94
    Plugin Contributions
    0

    Default Re: Manufacturer Image in Product Display

    When I put some logos of manufacturers there are all different sizes, so I would work on them each time. Is there any possibility to arrange the sizes hard-fixed by admin and all entering logos and pictures of manufacturers will be just as a same.
    Please suggest me the code to fix it.

    Thank you

  7. #7
    Join Date
    Mar 2005
    Location
    Helsinki
    Posts
    570
    Plugin Contributions
    0

    Default Re: Manufacturer Image in Product Display

    yep works fine.. now I'd just need to add the manufacturer url link to the img.. andI don't know why but seems like impossible task to find an aswer from the forum how to digg up the manufacturer link

  8. #8
    Join Date
    Jul 2004
    Location
    The Netherlands, Wierden
    Posts
    430
    Plugin Contributions
    0

    Default Re: Manufacturer Image in Product Display

    Quote Originally Posted by poosk View Post
    yep works fine.. now I'd just need to add the manufacturer url link to the img.. andI don't know why but seems like impossible task to find an aswer from the forum how to digg up the manufacturer link
    Are you looking for this?
    http://www.zen-cart.com/forum/showthread.php?t=71285

    example in website:
    http://www.legavenue.nl/la86002-lang...ief-p-113.html

  9. #9
    Join Date
    Mar 2005
    Location
    Helsinki
    Posts
    570
    Plugin Contributions
    0

    Default Re: Manufacturer Image in Product Display

    BEAUTIFUL! thanks I owe you one Raimond

  10. #10
    Join Date
    Mar 2005
    Location
    Helsinki
    Posts
    570
    Plugin Contributions
    0

    Default Re: Manufacturer Image in Product Display

    actually it would be even better for me if I'd be able to use the url determined from the admin... any idea?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. display manufacturer image in product listing?
    By familynow in forum Templates, Stylesheets, Page Layout
    Replies: 51
    Last Post: 2 Jan 2016, 11:49 PM
  2. Display manufacturer image on top of product index listing page
    By Thannaree in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Oct 2012, 12:49 PM
  3. Add Manufacturer image to Manufacturer product page
    By vito in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Jul 2010, 05:05 PM
  4. Display Product Manufacturer Image
    By NullMind in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 30 Aug 2007, 10:18 PM
  5. Display Product Manufacturer Image
    By Svanis in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Jun 2006, 04:39 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR