Forums / Templates, Stylesheets, Page Layout / Adding manufacturer's logo to products

Adding manufacturer's logo to products

Locked

Views: 1,712

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
15 May 2009, 1:20 PM
#1
jenniesummitreks avatar

jenniesummitreks

New Zenner

Join Date:
Apr 2009
Posts:
17
Plugin Contributions:
0

Adding manufacturer's logo to products

Hi

I'm new to Zencart and PHP. I need to display the manufacturer's logo above all the product images.

I have found a couple of old threads that I thought might help and have been trying to include extra code into an override tpl_index_product_list.php that will pull the manufacturer's image uploaded via the admin system and place it in a div above the product images.

So far my success is limited to knowing I am working on the correct file as I've managed to make the page disappear a couple of times!

:oops:

Could some kind and knowledgeable person perhaps post the code that I need to insert? I would be most grateful.

Thank you

Jennie

17 May 2009, 2:28 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Adding manufacturer's logo to products

A search on:
manufacturers_image

will give you numerous posts on how to display the manufacturer's image on various areas on the Catalog ... that may help get you started on this ... :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!

21 May 2009, 12:18 PM
#3
jenniesummitreks avatar

jenniesummitreks

New Zenner

Join Date:
Apr 2009
Posts:
17
Plugin Contributions:
0

Re: Adding manufacturer's logo to products

Ajeh:

A search on:
manufacturers_image

will give you numerous posts on how to display the manufacturer's image on various areas on the Catalog ... that may help get you started on this ... :smile:

Hi Ajeh

Thank you for your reply, I have searched as you suggested and wanted to try the suggestion on one of your previous posts to replace the product_listing.php case statement with:

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;

However am using the 3 column addon module so this had no effect - I thought this was because it only applied to if row layout was true, but changing to row layout still displayed nothing.

Is there anything I have to do besides adding the code? I have the manufacturers set up with their logos as images, and the products have been associated with the images.

Seems to me there must be a simple way to call this image in but I am so new to all this stuff I can't see how everything fits together.

Any help would be most appreciated.

Many thanks

A very boggled Jennie
:blink:

21 May 2009, 1:57 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Adding manufacturer's logo to products

Keep in mind that where you have that listed will only work if you have the manufactuer turned on in the Product Listing ...

Your code works fine for me ... be sure you have it in the right file ...

If you are using overrides then it needs to be in the override file ...

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!

27 May 2009, 3:37 PM
#5
jenniesummitreks avatar

jenniesummitreks

New Zenner

Join Date:
Apr 2009
Posts:
17
Plugin Contributions:
0

Re: Adding manufacturer's logo to products

Hi Ajeh

Sorry for intermittent communication, I come in one day a week to work on this job.

Thank you so much for your help, I am now getting a logo appearing.

:clap:

However I want to remove the text with the manufacturer's name and just have the logo on its own.

Tried removing a likely looking section of the code but the whole section disappeared again!

Any chance you could advise me which bit or bits needs removing?

Thanks again

Best wishes
Jennie

27 May 2009, 3:49 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Adding manufacturer's logo to products

I am assuming in the tpl_product_info_display.php you added it to this line:

  <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>

Or, you added it separately and want to get rid of that line ...

Notice, that has a setting on whether or not to display the manufacturer's name or not ...

If you are not using that line of text on your logo display, then just turn it off in your Zen Cart Admin in the Catalog ... Product Type ... EDIT LAYOUT ... :smile:

If you are using that code as part of your logo display, then the manufacture's name is the;
$manufacturers_name

The text in front of the manufacturer's name is the:
TEXT_PRODUCT_MANUFACTURER

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!

27 May 2009, 3:53 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Adding manufacturer's logo to products

And now that I think I answered your question totally wrong for the Product Listing and answered more for the product _info page ... I shall try again ... :blush:

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'])) [B]. '<br>' . $listing->fields['manufacturers_name'] [/B]. '</a>';
break; 

The section in read is adding a line break and the manufacturers_name, just remove that part ...

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!

27 May 2009, 4:30 PM
#8
jenniesummitreks avatar

jenniesummitreks

New Zenner

Join Date:
Apr 2009
Posts:
17
Plugin Contributions:
0

Re: Adding manufacturer's logo to products

Hi Ajeh

I swear that was the bit I removed before when the page disappeared! Got it now, thank you so much.

I haven't got to the product info page yet, that will be the next one to do so I may well need to refer to your previous post!

Thanks again

Jennie
:smile:

27 May 2009, 5:38 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Adding manufacturer's logo to products

We must of been zenning ... :cool:

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!