Re: How to display manufacturer image in product listing?
Take the name out of the code:
Code:
$lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '<br>' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']), $listing->fields['manufacturers_name']) . '</a>';
Re: How to display manufacturer image in product listing?
Interesting...That worked perfectly for what I wanted except that now in the product_info I no longer have the manufacturer listed ie Manufactured by: is blank.
Here's the code[1] I'm using now...Not clear on how/why this would also strip the display from another page. I'm inclined to think that in searching for my above solution I may have been slightly over-zealous in removing things with the term "manufacturer name" perhaps?
ref.
// BoF DISPLAY MANUFACTURER IMAGES
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']), $listing->fields['manufacturers_name']) . '</a>';
break;
//EoF DISPLAY MANUFACTURER IMAGES
Re: How to display manufacturer image in product listing?
The change to that file should only affect the listings ...
If you changed other files, you need to look and see what changes you made and adjust them accordingly ...
Re: How to display manufacturer image in product listing?
Quote:
Originally Posted by
Ajeh
The change to that file should only affect the listings ...
If you changed other files, you need to look and see what changes you made and adjust them accordingly ...
Thought so...Just wanted to be certain. So here's[1] where I 'tinkered' in product_info_display.php
ref.
[1] <!--bof Product details list -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul>
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $chk_manufacturers_name . '</li>' : '') . "\n"; ?>
</ul>
<?php
}
?>
<!--eof Product details list -->
Re: How to display manufacturer image in product listing?
What is this suppose to be:
$chk_manufacturers_name
If you are testing whether or not there is a Manufacturers Name with:
$manufacturers_name
Why are you using a different variable for the Manufacturers Name that does not appear to exist in the code you listed?
What happens if you change it to be:
$manufacturers_name
Re: How to display manufacturer image in product listing?
In comparing the above with the ZC source I'm not seeing anything different. There was one point when I attempted to add the manufacturer image to that page also and I removed that code while editing - I know always edit one thing at a time! Here's the code[1] I had in place. Perhaps that somehow enabled the displaying of the manufacturer!?
ref.
[1] <!--BoF display manufacturer image-->
<?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 manufacturer image-->
Re: How to display manufacturer image in product listing?
That was to get the image ... and only display it if there was one ...
What do you want to see on the product_info page? :unsure:
Re: How to display manufacturer image in product listing?
Quote:
Originally Posted by
Ajeh
What is this suppose to be:
$chk_manufacturers_name
If you are testing whether or not there is a Manufacturers Name with:
$manufacturers_name
Why are you using a different variable for the Manufacturers Name that does not appear to exist in the code you listed?
What happens if you change it to be:
$manufacturers_name
Spot on!
details...details...details.
Thank you!
Re: How to display manufacturer image in product listing?
Quote:
Originally Posted by
Ajeh
That was to get the image ... and only display it if there was one ...
What do you want to see on the product_info page? :unsure:
I pulled the plug on that because I felt it was just too much to load even-tough it looked good. I've got the manufacturer logo for branding in the product_list and only the name in the product_info I think that's the best compromise for sales/performance.
Re: How to display manufacturer image in product listing?
It's driving me crazy... I've edited my product_listing.php to have the manufacturer's image appear in product listing & I can't figure out why it's not showing. A product listing at site is: http://spottedsheepyarnshoppe.com/ze...products_id=37 and edit in .php is below. Please help!
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'] . '<br>' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']), $listing->fields['manufacturers_name']) . '</a>';
break;