khanjee75 Posted October 10, 2016 Share Posted October 10, 2016 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 More sharing options...
rocky Posted October 11, 2016 Share Posted October 11, 2016 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 More sharing options...
khanjee75 Posted October 12, 2016 Author Share Posted October 12, 2016 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 More sharing options...
rocky Posted October 13, 2016 Share Posted October 13, 2016 Sorry, I'm not sure how to help with that. I think my solution above it better, since it doesn't require overrides. Link to comment Share on other sites More sharing options...
khanjee75 Posted October 13, 2016 Author Share Posted October 13, 2016 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 More sharing options...
rocky Posted October 13, 2016 Share Posted October 13, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now