Is there a way to put the manufacturer's logo in the product listings instead of the text names?
Is there a way to put the manufacturer's logo in the product listings instead of the text names?
To add the manufacturers_image to the /includes/modules/product_listing.php ...
Copy the file to your overrides directory:
/includes/modules/your_template_dir/product_listing.php
And around lines 102 - 105 ...
Change the case statement to read:
This shows both manufacturers_image and name ... and you can adjust accordingly ...PHP Code:case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id'])) . '<br>' . $listing->fields['manufacturers_name'] . '</a>';
break;
NOTE: edited for incorrect field ...
Last edited by Ajeh; 27 Jun 2006 at 07:16 PM.
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!
For some reason its giving me the "nopic.gif" instead of the logos.
Ok Changed:
zen_get_products_manufacturers_image($listing->fields['manufacturers_id']))
To:
zen_get_products_manufacturers_image($listing->fields['products_id']))
Looks like that worked now I just need to make the logo smaller.
Thanks Ajeh!
Silly silly me ... must need more coffee ...![]()
Thanks for the catch!
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!
Any idea how to resize the logos smaller, or to use a small version of the logo?
You could peek at the function for the image and pass different paramaters for the width and height ...
Or, you would need to get trickie and add an additional peice to the path to the image such as have it peek in a subdirectory or something along the lines of how the /images
/images/medium
/images/large
work for regular images ...
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!