Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2010
    Posts
    87
    Plugin Contributions
    0

    help question Manufacturer image link

    On my product info page, I would like to have the manufacturer image linking to a list of all their products. I've got a basic idea how it's done. I already have the manufacturer image on the product info page, so we can skip that step. I'm just stuck on the php coding. Could someone please correct the error for me?

    <?php echo '<a href="http://mydomain.com/store/index.php?main_page=index&manufacturers_id=' . $product_info->fields['manufacturers_id'] . '" alt="Click here for all products from this brand">Link here</a>'; ?>
    I'm quite proficient in HTML, but very limited in my ability to work in PHP. Any help appreciated :) TIA!
    Last edited by Jace; 26 Jul 2011 at 02:02 AM. Reason: Correcting coding error

  2. #2
    Join Date
    Nov 2010
    Posts
    87
    Plugin Contributions
    0

    Default Re: Manufacturer image link

    Nevermind .. managed to figure it out myself.

    Any moderators around, please delete this thread.

  3. #3
    Join Date
    Jul 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: Manufacturer image link

    Quote Originally Posted by Jace View Post
    Nevermind .. managed to figure it out myself.

    Any moderators around, please delete this thread.
    would you mind posting your tpl_product_info_display.php file? I would like to see how you went about a solution. I need the same thing for my site.

    It would be greatly appreciated

  4. #4
    Join Date
    Nov 2010
    Posts
    87
    Plugin Contributions
    0

    Default Re: Manufacturer image link

    Sure, would be happy to. Here's my coding below. The first line should already be in the tpl_product_info_display.php file, and the second line, from memory, I added in to show and link the image:

    Code:
      <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
    
    <?php echo '<a href="index.php?main_page=index&manufacturers_id=' . $product_info->fields['manufacturers_id'] . '"><BR>' . zen_image(DIR_WS_IMAGES .  zen_get_products_manufacturers_image($product_info->fields['products_id'])) . '</a><br>&nbsp;<br><font size=1>(Click logo for all products<br>from this brand)</font>'; ?>

  5. #5
    Join Date
    Jul 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: Manufacturer image link

    Quote Originally Posted by Jace View Post
    Sure, would be happy to. Here's my coding below. The first line should already be in the tpl_product_info_display.php file, and the second line, from memory, I added in to show and link the image:
    Thanks for the quick response! I ended up using a line from another post and it worked just fine. After a little modification and surrounding it in a div I was able to position it as I pleased with a little CSS.

    For those that find this thread in the future. This what I used.

    PHP Code:
    <?php echo (($flag_show_product_info_manufacturer == and zen_get_products_manufacturers_image((int)$_GET['products_id']) != '' ) ? '<div class="forward">' .'<a href="' zen_href_link(FILENAME_DEFAULT'manufacturers_id=' $product_info->fields['manufacturers_id']) . '">' zen_image(DIR_WS_IMAGES zen_get_products_manufacturers_image((int)$_GET['products_id']), 'click to view products by this manufacturer') . '</a>' '</div>' ''); ?>
    I didnt place it in the <ul> of the other attributes. I placed it directly under the product name div

    to see the results on my site

 

 

Similar Threads

  1. 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
  2. manufacturer image on manufacturer page
    By bigbadboy in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 27 Dec 2009, 10:00 AM
  3. Removing Manufacturer Image without losing manufacturer
    By Jamie Bower in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 30 Jan 2009, 10:42 PM
  4. How to show manufacturer image and name with link?
    By YairOz in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 28 Aug 2007, 09:22 PM

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