GaGz0r Posted November 19, 2013 Share Posted November 19, 2013 Hi everyone, I am googling about two days and I can´t find solution for my trouble. I am configuring a new Prestashop webpage and I want to implement one special thing. So my question is if there is some feature, how to copy category or subcategory name into H1 (name of product)? For example: I have one product named Screwdriver, and I have two categories, Funny and Happy. And I want, that Product in category Funny has name Funny Screwdriver and in Happy category Happy Screwdriver, so I need to copy names of categories (Happy and Funny) into H1 tags of product, But is is still the only one product with same parameters, photos, description etc, only another H1 Tag. Is there some solution? This solution here: http://www.prestashop.com/forums/topic/244073-solved-name-of-the-category-to-meta-title/ is exactly what I want, but it copies category name to title meta tag, not to H1. Thank you for you answers. Have a nice day. Link to comment Share on other sites More sharing options...
Ciseur Posted November 20, 2013 Share Posted November 20, 2013 Hello Gagzor, To display catgory name in the <h1> of the product : You have to modify your theme to add the category name in the <h1> tag of your product page (product.tpl file). For example: I have one product named Screwdriver, and I have two categories, Funny and Happy. And I want, that Product in category Funny has name Funny Screwdriver and in Happy category Happy Screwdriver, so I need to copy names of categories (Happy and Funny) into H1 tags of product, But is is still the only one product with same parameters, photos, description etc, only another H1 Tag. I am not sure to understand what you mean here ? If your product is in 2 categories, it does not have 2 different product page. You only have one product page, you would not be able to have one product page for each category.. Hope it helps, Best regards, Ciseur 1 Link to comment Share on other sites More sharing options...
GaGz0r Posted November 20, 2013 Author Share Posted November 20, 2013 Yes, that´s it. I added {$category->name|escape:'htmlall':'UTF-8'} string into H1 tags of product.tpl and it is working! Thank you. But this displays only subcategory name in product name, not the main category also. Is there some way how to show both? About the example: I am sorry, I forgot, that it is only one product. Thank you. GaGz0r 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