Forums / Templates, Stylesheets, Page Layout / Displaying manufacturers image on product page

Displaying manufacturers image on product page

Views: 7,809

Results 21 to 40 of 41
17 Feb 2009, 11:37 AM
#21
kurrupt avatar

kurrupt

New Zenner

Join Date:
Feb 2009
Posts:
1
Plugin Contributions:
0

Displaying manufacturers image on product page

Amazing Guys. Thanks

19 May 2009, 10:05 AM
#22
teva avatar

teva

Zen Follower

Join Date:
Sep 2004
Posts:
101
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

How about adding name and link to more products? Can this be done?

tnx

19 May 2009, 1:26 PM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Displaying manufacturers image on product page

Use the same IF condition for the manufacturers_name:
($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))

to control when to show or not show the image ...

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!

19 May 2009, 3:52 PM
#24
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Hi Ajeh,

I moofed something up here :

<?php 
if ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) { ?>
<?php echo '' . zen_image(DIR_WS_IMAGES .  zen_get_products_manufacturers_image($product_info->fields['products_id'])); ?>
```I am trying to display the manufacturer's image if there is a manufacturer associated with the item AND display nothing if there is no manufacturer associated with the item....

Thanks!
19 May 2009, 5:25 PM
#25
ajeh avatar

ajeh

Oba-san

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

Re: Displaying manufacturers image on product page

Did you close the IF statement? :unsure:

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!

19 May 2009, 6:10 PM
#26
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Errrrrrr... :blush:

Thanks.

19 May 2009, 6:42 PM
#27
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Would you say the "best" way to move it around would be to wrap in it a div tag and use the css stylesheet for positioning?

Thanks.

19 May 2009, 7:19 PM
#28
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

OK got it positioned correctly. Now if there is a manufacturer set, but there is no image associated with that manufacturer it displays the no image gif... How can we set it to display nothing... ie just blank space (instead of the no image gif)?

Thanks!

20 May 2009, 3:57 AM
#29
ajeh avatar

ajeh

Oba-san

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

Re: Displaying manufacturers image on product page

Extend your test to check if there is an image returned from the function or if it is blank ... if the zen_get_products_manufacturers_image is returning a blank then don't call the image with the zen_image ... :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!

20 Apr 2011, 7:41 PM
#30
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Is it also possible to link the img to all products by the particular manufacturer?

21 Apr 2011, 1:07 PM
#31
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Soniccc:

Is it also possible to link the img to all products by the particular manufacturer?I meant that perhaps it's possible to link the manufacturer image (logo) showing up on the product info page to all products by that manufacturer, I've seen it on some sites and it displays pretty neat..

1 Oct 2011, 5:14 PM
#32
alexiss avatar

alexiss

New Zenner

Join Date:
Jun 2009
Posts:
63
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Ajeh:

Extend your test to check if there is an image returned from the function or if it is blank ... if the zen_get_products_manufacturers_image is returning a blank then don't call the image with the zen_image ... :smile:

Hello Can some tell me how I can do this I dont know that much php but i am slowly learning.

THanks

Lexxis

22 Oct 2011, 12:31 AM
#33
alexiss avatar

alexiss

New Zenner

Join Date:
Jun 2009
Posts:
63
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Alexiss:

Hello Can some tell me how I can do this I dont know that much php but i am slowly learning.

THanks

Lexxis

Can I get some help with this. I can not seem to get any answers for this. I used the snip of code in the above post. And it works very well. But what I want to tell the code is to only show if there is a manufacturers image. Currently when there is no image it shows the noimage.gif.

Any help to help me sort this would be very well appreciated. :frusty

Thanks Lexxie:cry:

6 Apr 2012, 5:40 AM
#34
awhfy99 avatar

awhfy99

Zen Follower

Join Date:
Feb 2007
Location:
Burleson. Texas
Posts:
196
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Ajeh:

Geeze louise ... can't you guys do what I mean and not what I say? :frusty:

Try using the right field ... silly me ... :blush:

<?php echo 'I see the : ' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($product_info->fields['products_id'])); ?>
 
Thanks Ajeh, that was what I was looking for!

Dennis
www.stampdays.com
Over 80,000 stamps and still growing!

6 Apr 2012, 1:00 PM
#35
ajeh avatar

ajeh

Oba-san

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

Re: Displaying manufacturers image on product page

You are most welcome ... thanks for the update that this was able to help you ... :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!

25 Sep 2013, 1:20 PM
#36
tadj_hemingway avatar

tadj_hemingway

New Zenner

Join Date:
Apr 2013
Location:
Eastpointe, Michigan, United States
Posts:
20
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Ajeh, I have taken this code <?php echo 'I see the : ' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($product_info->fields['products_id'])); ?> and have added it to the Tabbed Products Pro module Details list with a link to the manufacturer's page and Schema mark up for SEO.

$fmtDOT .= (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li style="width:100%;" itemprop="brand" itemscope itemtype="http://schema.org/Organization">' . '<a class="manufacturer" href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers_id) . '">' . TEXT_PRODUCT_MANUFACTURER . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($product_info->fields['products_id'])) .'<span itemprop="name">' . $manufacturers_name . '</a></span>' .'</li>' : '') . "\n";

However in both the original code and my conversion the image alt tag is empty. Can you help modify the code to add the manufacturer's name for the image alt tag. Thank you:smile:

25 Sep 2013, 1:55 PM
#37
ajeh avatar

ajeh

Oba-san

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

Re: Displaying manufacturers image on product page

I believe:
$manufacturers_id

needs to be:
$product_info->fields['manufacturers_id']

as based on your code that is not there for your link ...

One the ALT tag, where in your code do you think you have an ALT tag? As in I am not seeing it anywhere ... :lookaroun

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!

26 Sep 2013, 1:03 AM
#38
tadj_hemingway avatar

tadj_hemingway

New Zenner

Join Date:
Apr 2013
Location:
Eastpointe, Michigan, United States
Posts:
20
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

Ajeh, Thank you for your quick response. Here is a sample of the image link the php produces.
<img width="204" height="84" alt="" src="images/advanced_elements_logo.jpg"></img> It's all there, but the alt tag is empty. It's that way with all the different brands. any ideas to fill in that alt tag will be appreciated.

26 Sep 2013, 1:23 AM
#39
ajeh avatar

ajeh

Oba-san

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

Re: Displaying manufacturers image on product page

You have to use the function correctly ...

function zen_image($src, $alt = '', $width = '', $height = '', $parameters = '', $rules = '') 

You are not including an ALT tag to be displayed ...

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!

26 Sep 2013, 3:57 PM
#40
tadj_hemingway avatar

tadj_hemingway

New Zenner

Join Date:
Apr 2013
Location:
Eastpointe, Michigan, United States
Posts:
20
Plugin Contributions:
0

Re: Displaying manufacturers image on product page

the zen_image function is already set up in the includes/functions/html_output.php file. For some reason the alt image field is null. Any ideas why?