Forums / General Questions / Changing Product Info Manufacturer Images

Changing Product Info Manufacturer Images

Locked

Views: 533

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
23 Dec 2010, 8:15 PM
#1
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Changing Product Info Manufacturer Images

I would like to do something similar as done here http://www.zen-cart.com/forum/showthreadp?t=119585 but on my product_info page for the output of manufacturer image.

I see that zen_get_products_manufacturers_image() does not support being passed image dimensions, I see I would have to use zen_image() in conjunction with the MYSQL changes above to get the same results for the product info page?

23 Dec 2010, 11:23 PM
#2
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Changing Product Info Manufacturer Images

Well I solved my own issue :flex:

Using code from the above reverenced link but with a small change:

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  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 Image Height', 'IMAGE_MANUFACTURER_HEIGHT', '80', 'Default = 80', 4, 81, NULL, NOW(), NULL, NULL);

Then changed to product_info_display:

<!-- bof Manufacturer Image-->
	<?php
	if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) {
	echo zen_image(DIR_WS_IMAGES . $check_image, IMAGE_MANUFACTURER_WIDTH, IMAGE_MANUFACTURER_HEIGHT);
	} else {
	// echo 'NO IMAGE';
	}
	?>
<!--eof Manufacturer Image -->
23 Dec 2010, 11:56 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Changing Product Info Manufacturer Images

Thanks for the update on what worked for you on this ... good solution ... :smile:

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!]
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!

24 Dec 2010, 6:13 AM
#4
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Changing Product Info Manufacturer Images

In case people do not read the code before they just apply it there was a small error :ohmy:

I forgot to handle the alt text and as a result one of them was being used in the alt field, I added $manufacturers_name after $check_image you can also leave it blank by putting in '' instead.

echo zen_image(DIR_WS_IMAGES . $check_image, $manufacturers_name, IMAGE_MANUFACTURER_WIDTH, IMAGE_MANUFACTURER_HEIGHT);

Thanks Linda, I hope this helps others....