Forums / Setting Up Categories, Products, Attributes / How to show manufacturer image and name with link?

How to show manufacturer image and name with link?

Locked

Views: 1,393

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
28 Aug 2007, 4:43 AM
#1
yairoz avatar

yairoz

New Zenner

Join Date:
May 2007
Posts:
60
Plugin Contributions:
0

How to show manufacturer image and name with link?

hey guys

in my online store, when listing products, you can see the manufacturer image, as you can see here:
http://www.academyfloor.com/index.php?main_page=index&cPath=24
Someone helped me with that a few months ago... don't remember his name but 10x..
anyway, i want to show the manufucturer name at the bottom of the picture (at the center of course) with the link to the manufucturer products, like it was before.

I've got both of the codes, just can't combine between them... i keep getting error messages...

The first code, the i have right now, showing the manufacturer image is:

 
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = 'center'; 
/* 
if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) { 
$lc_text = ''; 
} else { 
if (isset($_GET['manufacturers_id'])) { 
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; 
} else { 
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; 
} 
} 
*/ 
$lc_text = zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id'])); 
break; 

The second code, the original, the one that shows the manufucturer name with the link is:

 
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;

Please help... thank u

28 Aug 2007, 5:33 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: How to show manufacturer image and name with link?

$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'])) . '</a>';

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!

28 Aug 2007, 3:28 PM
#3
yairoz avatar

yairoz

New Zenner

Join Date:
May 2007
Posts:
60
Plugin Contributions:
0

Re: How to show manufacturer image and name with link?

thak you... but it still showing only the manufucturer image... without the name...
I want the name will be underneath the logo...

thank u for your help...

this is what i did:

 
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = 'center'; 
$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'])) . '</a>';  
break;  

28 Aug 2007, 7:54 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to show manufacturer image and name with link?

Try this:```php
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = 'center';
$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;

28 Aug 2007, 8:22 PM
#5
yairoz avatar

yairoz

New Zenner

Join Date:
May 2007
Posts:
60
Plugin Contributions:
0

Re: How to show manufacturer image and name with link?

Working Great!!!

tank u very much for all of you