Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Manufacture image layout help

Manufacture image layout help

Views: 800

Results 1 to 5 of 5
22 Oct 2011, 3:34 PM
#1
alexiss avatar

alexiss

New Zenner

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

Manufacture image layout help

I posted my first post on this on october 1 and still can not seem to get help.

originaly psted in "Displaying manufacturers image on product page"

Quote:
Originally Posted by Ajeh View Post
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 ...
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. I don want it to show anything if there is no image.

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

the code i am using

<!--bof display manufacturer image on page =^sg^= --> <?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'])); ?> <!--eof display-->

Thanks Lexxie

22 Oct 2011, 3:54 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Manufacture image layout help

You could try something like this:

<!--bof display manufacturer image on page -->
<?php
$chk_manufacturers_image = zen_get_products_manufacturers_image($product_info->fields['products_id']);
echo (!empty($chk_manufacturers_image) ? zen_image(DIR_WS_IMAGES . $chk_manufacturers_image) : '');
?>
<!--eof display-->
22 Oct 2011, 8:17 PM
#3
alexiss avatar

alexiss

New Zenner

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

Re: Manufacture image layout help

Ajeh:

You could try something like this:

<!--bof display manufacturer image on page --> <?php $chk_manufacturers_image = zen_get_products_manufacturers_image($product_info->fields['products_id']); echo (!empty($chk_manufacturers_image) ? zen_image(DIR_WS_IMAGES . $chk_manufacturers_image) : ''); ?> <!--eof display-->

:clap:

Yippiy Skippiy

Thanks

Lexxie
22 Oct 2011, 10:20 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Manufacture image layout help

You are most welcome ... thanks for the update that this worked for you ... :smile:

13 Nov 2011, 12:58 AM
#5
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: Manufacture image layout help

I can't get the code above to work for me. I've enabled manufacturer images in the admin and inserted the snippet of code above in tpl_product_display_info.php. Did I misunderstand something?