New Zenner
- Join Date:
- Feb 2009
- Posts:
- 1
- Plugin Contributions:
- 0
Displaying manufacturers image on product page
Amazing Guys. Thanks
Views: 7,809
New Zenner
Amazing Guys. Thanks
Zen Follower
How about adding name and link to more products? Can this be done?
tnx
Oba-san
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 ...
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!
Totally Zenned
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!
Oba-san
Did you close the IF statement? :unsure:
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
Totally Zenned
Errrrrrr... :blush:
Thanks.
Totally Zenned
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.
Totally Zenned
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!
Oba-san
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 ...
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!
Zen Follower
Is it also possible to link the img to all products by the particular manufacturer?
Zen Follower
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..
New Zenner
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
New Zenner
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:
Zen Follower
<?php echo 'I see the : ' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($product_info->fields['products_id'])); ?>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:
Thanks Ajeh, that was what I was looking for!
Dennis
www.stampdays.com
Over 80,000 stamps and still growing!
Oba-san
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 ...
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!
New Zenner
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:
Oba-san
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 ...
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!
New Zenner
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.
Oba-san
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 ...
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!
New Zenner
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?
Tell staff why this post should be reviewed.