Zen Cart Logo
Forums / General Questions / Alt Text in Manufacturer Image

Alt Text in Manufacturer Image

Views: 425

Results 1 to 5 of 5
11 Nov 2020, 7:43 AM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Alt Text in Manufacturer Image

Does anybody know how to get alt text into the manufacturer image on the product information page using this code please?

if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) {     echo zen_image(DIR_WS_IMAGES . $check_image);   } else {     echo 'NO IMAGE';   }

See closed thread:

https://www.zen-cart.com/showthread.php?38748-Manufacturer-Image-in-Product-Display

11 Nov 2020, 2:28 PM
#2
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Alt Text in Manufacturer Image

Nick1973:

Does anybody know how to get alt text into the manufacturer image on the product information page using this code please?

if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) { echo zen_image(DIR_WS_IMAGES . $check_image); } else { echo 'NO IMAGE'; }

> 
> See closed thread:
> 
> <https://www.zen-cart.com/showthread.php?38748-Manufacturer-Image-in-Product-Display>

Assuming you want manufacturer name it would be ```
if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) {     echo zen_image(DIR_WS_IMAGES . $check_image, zen_get_products_manufacturers_name((int)$_GET['products_id']));   } else {     echo 'NO IMAGE';   } 

image size would be another comma '50%') for responsive, '50', '50') for non-responsive. (not tested)

11 Nov 2020, 2:32 PM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Alt Text in Manufacturer Image

davewest:

Assuming you want manufacturer name it would be ```
if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) { echo zen_image(DIR_WS_IMAGES . $check_image, zen_get_products_manufacturers_name((int)$_GET['products_id'])); } else { echo 'NO IMAGE'; }

> image size would be another comma '50%') for responsive, '50', '50')  for non-responsive. (not tested)

Hi Dave I want the product name/title not the manufacturer name
11 Nov 2020, 2:46 PM
#4
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Alt Text in Manufacturer Image

Nick1973:

Hi Dave I want the product name/title not the manufacturer name
Its ok I figured it out Dave :-)

if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) {     echo zen_image(DIR_WS_IMAGES . $check_image, zen_get_products_name((int)$_GET['products_id']));   } else {     echo 'NO IMAGE';   }
11 Nov 2020, 2:49 PM
#5
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Alt Text in Manufacturer Image

Same image - do you know how to get a link back to the parent category with a title tag wrapped around the image?

e.g. ```html
<a href="myparentcategory" title="thenameofmyparentcategory">manufacturerimage.png</a>