ThunderOver Posted August 28, 2017 Share Posted August 28, 2017 How to Show Parent Category in product page ? Link to comment Share on other sites More sharing options...
prestahero.com Posted August 28, 2017 Share Posted August 28, 2017 How to Show Parent Category in product page ? Not really clear question, can you give more details? Note: Prestashop show product's category in the breadcrumb always 1 Link to comment Share on other sites More sharing options...
ThunderOver Posted August 28, 2017 Author Share Posted August 28, 2017 Not really clear question, can you give more details? Note: Prestashop show product's category in the breadcrumb always Exactly, I would like it to go out before the product name. I was able to print the id of the parent category (18) but not the associated name Link to comment Share on other sites More sharing options...
ThunderOver Posted August 29, 2017 Author Share Posted August 29, 2017 UP! Link to comment Share on other sites More sharing options...
prestahero.com Posted August 30, 2017 Share Posted August 30, 2017 Exactly, I would like it to go out before the product name. I was able to print the id of the parent category (18) but not the associated name What is your Prestashop version? I'll make the code for you 1 Link to comment Share on other sites More sharing options...
prestahero.com Posted August 30, 2017 Share Posted August 30, 2017 if you're using Prestashop 1.6.x simply put this code beside the product name in your theme/product.tpl file like this: http://prntscr.com/geqws9 {if isset($product->category) && $product->category}<span style="color: #01AEEC">{ucfirst($product->category)}</span> - {/if} Result: http://prntscr.com/geqwjw Good luck Link to comment Share on other sites More sharing options...
ThunderOver Posted August 30, 2017 Author Share Posted August 30, 2017 if you're using Prestashop 1.6.x simply put this code beside the product name in your theme/product.tpl file like this: http://prntscr.com/geqws9 {if isset($product->category) && $product->category}<span style="color: #01AEEC">{ucfirst($product->category)}</span> - {/if} Result: http://prntscr.com/geqwjw Good luck Thank you very much for your support =) Now I try the code from you written, my version of prestashop is 1.7.1 Link to comment Share on other sites More sharing options...
ThunderOver Posted August 30, 2017 Author Share Posted August 30, 2017 Unfortunately, the code does not work for version 1.7.1 Link to comment Share on other sites More sharing options...
ThunderOver Posted August 31, 2017 Author Share Posted August 31, 2017 (edited) UP! UP! Edited September 1, 2017 by ThunderOver (see edit history) Link to comment Share on other sites More sharing options...
ThunderOver Posted September 1, 2017 Author Share Posted September 1, 2017 UP! Link to comment Share on other sites More sharing options...
Inform-All Posted November 2, 2017 Share Posted November 2, 2017 To have a really simple, yet effective solution, i would use the breadcrumb title. You can use this for any level of your category just change the number. {$breadcrumb.links[2].title} Link to comment Share on other sites More sharing options...
Naturel Deluxe Posted September 2, 2018 Share Posted September 2, 2018 Old topic, but if someone need it: Here a solution to add - manufacturer logo (if available) + link to parent category (using the breadcrumbs trick) {block name='product_reference'} {if isset($product_manufacturer->id)} <div class="product-manufacturer"> {if isset($manufacturer_image_url)} <a href="{$breadcrumb.links[2].url}"> <img src="{$manufacturer_image_url}" class="img img-thumbnail manufacturer-logo" alt="{$product_manufacturer->name}" title="Bekijk alle {$product_manufacturer->name} {$breadcrumb.links[1].title}s"> </a> {else} <label class="label">{l s='Brand' d='Shop.Theme.Catalog'}</label> <span> <a href="{$breadcrumb.links[2].url}">{$product_manufacturer->name}</a> </span> {/if} </div> {/if} {/block} Link to comment Share on other sites More sharing options...
Sasha Chirico Posted January 3, 2019 Share Posted January 3, 2019 On 11/2/2017 at 11:18 AM, Inform-All said: To have a really simple, yet effective solution, i would use the breadcrumb title. You can use this for any level of your category just change the number. {$breadcrumb.links[2].title} How can I see al this costants and variables? As {$breadcrumb.links[2].title} I just want to display the category, but I remember in 1.6 there was a {debug} function that pops up a new window with all the costants and variables displayed (or printed) in the page. How I do that in 1.7? Best regards Link to comment Share on other sites More sharing options...
PF22 Posted August 22, 2019 Share Posted August 22, 2019 (edited) Hi there. I thought I had the same question but actually mine is a bit different. Actually my products belong to several different categories and my problem is finally not to know the parent category... I need to know from which catgeory page the user clicked to reach the product page! I am using Prestashop 1.6. Any idea? thank you! Edited August 22, 2019 by Pat_07 (see edit history) 1 Link to comment Share on other sites More sharing options...
1061679_1508430704 Posted October 14, 2019 Share Posted October 14, 2019 Hi How can display a specific category product using the "id" ? Is it possible? 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