display manufacturer image in product listing?
I'm looking to display the manufacturer image in lieu of the manufacturer name. Has anyone done this?
I was thinking this[1] would work but I don't know where to put it.
ref.
[1]
<!--bof display manufacturer image on page-->
<?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) : '');
?>
<!--eof display-->
Re: How to display manufacturer image in product listing
k. I think I'm a little further ahead now. Never fails, as soon as I post something I find more info on my own...Anyway.
In ../modules/my_theme/product_listing.php I found:
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
break;
Would integrating the aforementioned code in that work?
Re: How to display manufacturer image in product listing?
Re: How to display manufacturer image in product listing?
Those are both for the manufacturer sidebox. I'm looking for the product listing page. When you enable Display Product Manufacturer Name it adds a column to the product listing page. I'd really like to add the manufacturers image in there. Instead of the manufacturers name.
Re: How to display manufacturer image in product listing?
You could customize with your templates and overrides the module:
/includes/modules/product_listing.php
and add the code:
Code:
zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']), $listing->fields['manufacturers_name'])
where you want the image to show ...
Example: for the Manufacturers Name you can add it to:
Code:
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '<br>' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']), $listing->fields['manufacturers_name']) . '</a>';
break;
Re: How to display manufacturer image in product listing?
Hm. I don't understand how to implement that.
Am I replacing this:
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
break;
w/this:
zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']), $listing->fields['manufacturers_name'])
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '<br>' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']), $listing->fields['manufacturers_name']) . '</a>';
break;
Or am I putting the image statement somewhere else?
Re: How to display manufacturer image in product listing?
Nevermind. Got it!
Didn't realize you had already broken it down for me.
Re: How to display manufacturer image in product listing?
Re: How to display manufacturer image in product listing?
You are most welcome and thanks for the update that this is now working for you ... :smile:
Re: How to display manufacturer image in product listing?
Now that time has passed I'm finding I don't fancy the manufacturer name AND the image.
How do I strip the name and keep the image?