Zen Follower
- Join Date:
- Aug 2006
- Posts:
- 136
- Plugin Contributions:
- 0
How do I add the MFR IMG to tpl_index_product_list.php?
Hello, I need some help adding the manufacturer's image to the top of tpl_index_product_list.php. Maybe this is simple, maybe it isn't. I don't know. My PHP skills are lacking. I've looked hinder and yawn, tried copy'n'pasting/transforming various code, and come up empty. Here is what I feel might be pertinent in leading to a solution involves the following...
Right now, I see the manufacturer's name is displayed via some breadcrumb function in tpl_index_product_list.php:
<h1 id="productListHeading"><?php echo $breadcrumb->last(); ?></h1>
...which becomes the following HTML:
<h1 id="productListHeading">Acme</h1>.
...once the web page is rendered listing the manufacturer's products. I'd like the above HTML source code to look like:
<h1 id="productListHeading">Acme</h1>
<img src="images/manufacturers/acme.gif" />.
If the manufacturer's image is not easily added, is it possible -- because the breadcrumb value will uniquely exist somewhere in zen_manufacturers . manufacturers_name -- to use PHP/SQL/HTML code that will:
- Compare the value of $breadcrumb->last(); to all the values in zen_manufacturers . manufacturers_name.
- Then grab the corresponding value from zen_manufacturers . manufacturers_image.
- And then output that value in tpl_index_product_list.php, e.g. <?php echo '<img src="' . $manufacturers->fields['manufacturers_image'] . '" />'; ?>.
What bit of code will accomplish these three tasks or is this much more complicated than I think it ought to be?