Jump to content

Second Image in Category


Recommended Posts

Hi,

 

I want to add second image to the category as currently Prestashop 1.5 only supports one image per category. I need the second image to be used as banner image on the products page. This will be a different image then standard category logo image as I want this in banner shape.

 

I want this to be manageabe through the BO so I could easily associate banner images to the respective categories.

 

I am using Prestashop 1.5.6.3. any help will be deeply appreciated.

 

Thanks in advance.

Link to comment
Share on other sites

I suggest that you set the image you want to display on the product page as the category image and use the Catalog > Image mapping tab to set the image you want displayed on the category pages. You can then modify product.tpl to get the category image associated with the product's default category. For example:

<img src="{$link->getCatImageLink(Category::getLinkRewrite($product->id_category_default|intval, $cookie->id_lang|intval), $product->id_category_default|intval, 'category_default')|escape:'html'}" />
Link to comment
Share on other sites

Thanks Rocky,

 

I am using the method described in this tutorial http://nemops.com/prestashop-categories-second-image/#.V_4OP_krKUk but the challange I am having is that I see category image in BO category edit page for both Category Logo Image and Category Banner Image. 

 

See the attached image for you reference.

 

 

 

any help will be deeply appreciated.

 

Regards,

Link to comment
Share on other sites

Hi Rocky,

 

Thanks for your help anyway can you please provide me with detailed instructions on how to use image mapping and specially how to map that image to a specific category? I want a user friendly mechanism so that client could add or update those images themselves? 

 

Thanks again.

Link to comment
Share on other sites

It's pretty simple. Just go to the Catalog > Image Mapping, click the "Add new image map" button, enter a name for the image map, upload an image and then click the "Save" button. You can then click the "Edit" button, choose the categories you want the image displayed and then click the "Save" button again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...