aaronjpitts Posted September 9, 2013 Share Posted September 9, 2013 Hi guys, On my product page I just want it to display the product name in the header breadcrumb and not the category names before. In the header .tpl file I can only see a value of {$path}, how can I edit that to only show the product name on the product pages? Many thanks Link to comment Share on other sites More sharing options...
mfedorets Posted September 9, 2013 Share Posted September 9, 2013 Hi, The path is formed in classes/tools.php, getPath method. Link to comment Share on other sites More sharing options...
aaronjpitts Posted September 10, 2013 Author Share Posted September 10, 2013 Ok thanks for that, I've taken a look at the getPath function and I'm not sure how I can remove the category name from the products page whilst keeping the category name in the category pages, as they seem to be under one function. For example of I change the line return $full_path.$path; to return $path; if makes it how I want on the product page, but then on the category pages it doesn't show the name. Any help? Many thanks Link to comment Share on other sites More sharing options...
mfedorets Posted September 10, 2013 Share Posted September 10, 2013 Hi, try if ($context->controller instanceof ProductController) return $path; else return $full_path.$path; Link to comment Share on other sites More sharing options...
stottycabanas Posted September 10, 2013 Share Posted September 10, 2013 how can I edit that to only show the product name on the product pages? Why would you want to have a breadcrumb on the product page that just shows the product name? The product name will be clearly visible on the page anyway. Why not just remove the breadcrumb? Link to comment Share on other sites More sharing options...
mfedorets Posted September 10, 2013 Share Posted September 10, 2013 I think it could be related with situation when product is assigned to several categories at the same time, Prestashop in this case composes user jorney using category marked as default in backend. 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