Hi everyone,
I am wondering if anyone knows how to add the manufacturer's logo on top of the all product listings.
Hi everyone,
I am wondering if anyone knows how to add the manufacturer's logo on top of the all product listings.
I would also like to know the answer to this.
Here is an example of what I'm looking for:
http://www.scrapbookersplayground.co...ain_page=index
Notice the logo for the designer at the top of the product listing.
Thanks for any help you can give!
Find this file:
includes/templates/template_default/templates/tpl_index_product_list.php
You should not modify this file directly as if you upgrade, it will be overridden. Also, by using the override system, if you make a mistake and ruin everything, you can delete your file, and it all comes good again.
So what you need to do is save the file into includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_list.php
Now you can make the changes.
On line 19 you should see this:
Just before this, place a link to your image, and any text you may want. It should make it display like the example site.PHP Code:
<h1 id="productListHeading"><?php echo $breadcrumb->last(); ?></h1>
Hold on...
Redmond is suggesting you HARD CODE a core file. This won't do the job.
The example site: http://www.scrapbookersplayground.com
Is using the CATEGORY feature to display the manufacturer logo at the header. All they have done is set up "manufacturers" as "product categories", then used the inherent zencart feature to add images to the categoy descriptions.
If you want to display the product manufacturer image then you are going to have to patch in some custom PHP code, so that the reference is called from the database (or appropriate image folder) dynamically.
You won't achieve this with a static hard-coded line.
(And besides... in general it's not really good practice to hard-code a php file).
20 years a Zencart User
An alternative approach would be to use the Manufacturers Info Plus sidebox. This will show up whenever a listing is requested for a particular manufacturer.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Sorry - schoolboy is correct. I misread the post as wanting the store logo on top of all product listing...
Interesting that you say it is not good practice to hard code a PHP file. Why is this, particularly using overrides??
I've hard-coded files in the past - and still do so, but it's generally sloppy - and in some cases, can detrimentally affect performance (like hard coded external http:// references, when the system defaults to https:// - you'll get a IE warning message every time a visitor click a link in https://). Also, using multiple languages can be affected.
It's far better practice to build references to other elements, such as hyperlinks etc - either as defines in other php pages or the database.
20 years a Zencart User
Is it too late to chime in with a question?
Can you exchange the manufacturer's NAME= 'productListHeading' for an image?
I would like to do this if possible. In other words I want to exchange the font for an image of a font of my choice.
Beth-Katherine
As an answer to the question that kicked this thread off, it turns out that most of the work has already been done for you by Zen Cart. It's just not actually used in practise. Over-riding the tpl_index_product_list.php with one that adds the following immediately after the section that generates the category image should give the desired effect.
Beth-KatherinePHP Code:
<?php // manufacturers image
if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) { ?>
<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $image, $breadcrumb->last()); ?></div>
<?php
}
?>
For your specific question there are a number of possible answers depending upon where you planned to get the images from. The complexity is in recognizing the images, unless you would be happy to use the main manufacturers image for this purpose.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Bookmarks