Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / How to add manufacturers url to the manufacturers image

How to add manufacturers url to the manufacturers image

Started by suedouglas on 9 May 2015, 10:16 AM · Views: 1,319

Results 1 to 4 of 4
9 May 2015, 10:16 AM
#1
suedouglas avatar

suedouglas

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Post #1 by suedouglas

I currently display the manufacturers image on my product info page, In my tpl_product_info_display.php file I have the following coding which does this (I didn't particularly want to check that the image existed on the manufacturers table, because it always will, but it's the only bit of coding I could find that actually worked and displayed the image!):

<?php $chk_manufacturers_image = zen_get_products_manufacturers_image($product_info->fields['products_id']); echo (!empty($chk_manufacturers_image) ? zen_image(DIR_WS_IMAGES . $chk_manufacturers_image) : ''); ?>

What I need to do now, is to go to the manufacturers_info.manufacturers_url when the manufacturers image is clicked on, could anyone help, please? (The manufacturers url is always present in the manufacturers_info table and the manufacturers image is also always present in the manufacturers table)

I've found this example on the net of how to add a url to an image but because I'm picking up the image from the manufacturers table and the url from the manufacturers_info table, I'm unsure what the relevant syntax would be for my coding!

<a href='http://www.......'><img src='/images/image_name.jpg'/></a>

Thanks!

11 May 2015, 1:33 AM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Post #2 by frank18

You can get some clues by looking into

includes/modules/pages/redirect/header_php.php

and

includes/templates/template_default/sideboxes/tpl_manufacturer_info.php

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

11 May 2015, 8:53 PM
#3
suedouglas avatar

suedouglas

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Post #3 by suedouglas

Thanks for your reply frank18, I'll take a look at those files.

Thanks

27 Jan 2016, 3:19 PM
#4
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Post #4 by feznizzle

Hi Sue,

Did you ever solve this? And if you did, any chance you would share your solution?

Thanks!