Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding Manufacturer to products listing display.

Adding Manufacturer to products listing display.

Locked

Views: 790

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
4 Aug 2010, 7:10 PM
#1
yourguide avatar

yourguide

New Zenner

Join Date:
Apr 2010
Posts:
10
Plugin Contributions:
0

Adding Manufacturer to products listing display.

Using Glacial Age Template on Zen Cart v1.3.9d
I have searched the forums and the internet to no avail as of yet.
I would like to be able to display the Manufacturers Logo (Not just the name) on the product listing pages. (Search Results, Categories, etc.)
Currently it does it for the Individual Item Display only.. not the listing pages.

I have begun digging into the code and think product_listing.php around line 98 is where I would do this... but I am not quite sure what to do.

Any suggestions?

Thanks.

16 Aug 2010, 8:17 PM
#2
yourguide avatar

yourguide

New Zenner

Join Date:
Apr 2010
Posts:
10
Plugin Contributions:
0

Re: Adding Manufacturer to products listing display.

ANY help would be greatly appreciated.
I know the code is in there somewhere to display the logo... just not sure where.
Thanks.

17 Aug 2010, 12:49 AM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Adding Manufacturer to products listing display.

In this section of the code, you know the manufacturers_id and manufacturers_name but not the manufacturers_image ...

        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;

You could use a function to obtain the manufacturers_image in this section with:
function zen_get_products_manufacturers_image($product_id)

The $products_id can be referenced with:
$listing->fields['products_id']

and use something like:
zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']
), $listing->fields['manufacturers_name'])

Now if you are not displaying the manufactuers_name, you can add that code for the image in any column that you are using, such as the products_name etc.

18 Aug 2010, 9:09 PM
#4
yourguide avatar

yourguide

New Zenner

Join Date:
Apr 2010
Posts:
10
Plugin Contributions:
0

Re: Adding Manufacturer to products listing display.

:clap: Thank you so much for steering me in the right direction! :clap: