JacoboPS Posted March 30, 2017 Share Posted March 30, 2017 (edited) I would like the product page (that shows the default-product image under breadcrumbs) to display the same image as its category (category_default image). I think I need to make some code changes (on the product pages?) in order to do that. Can you give me a hand? Which files do I need to modify? [Prestashop 1.7.0.6] Edited March 30, 2017 by JacoboPS (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted March 30, 2017 Share Posted March 30, 2017 I would like the product page (that shows the default-product image under breadcrumbs) to display the same image as its category (category_default image). I think I need to make some code changes (on the product pages?) in order to do that. Can you give me a hand? Which files do I need to modify? In Prestashop 1.6 File template Product is: /themes/your-template/product.tpl Do you want to display the image of the default category associated with that product or do you want to display all images of the categories associated with that product? Sorry for my English Link to comment Share on other sites More sharing options...
JacoboPS Posted March 30, 2017 Author Share Posted March 30, 2017 Sorry that I forgot to say that I use the PS 1.7.0.6 And, as you say, "I want to display the image of the default category associated with that product". Thank you very much! Link to comment Share on other sites More sharing options...
nadie Posted March 30, 2017 Share Posted March 30, 2017 Sorry that I forgot to say that I use the PS 1.7.0.6Check File: /themes/classic/templates/catalog/product.tpl This use variable: $category This check "options" With var_dump {$category|var_dump} Sorry for my English, Link to comment Share on other sites More sharing options...
JacoboPS Posted March 30, 2017 Author Share Posted March 30, 2017 Te perdono tu english (tu crees que me echarán del foro si cambio de idioma?) si me lo explicas un poco mejor: entiendo que debo meter este código "{$category|var_dump}" pero no tengo ninguna mención a "$category en el fichero "product.tpl" (sí, estoy un poco pez) . Link to comment Share on other sites More sharing options...
Aumanz Posted July 21, 2018 Share Posted July 21, 2018 I see the post have a few time, but i will reply anyway.. i've tryed this and it works.. <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}"/> hope this work for anybody also.. 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