Igor Silvito 0 Posted January 23 Posted January 23 Hi there, The product has different categories. And it is displayed on each category page. For example, product-1 has category-1, category-2, category-3. But the default category is "category-1". So the link to this product will be https://site.com/category-1/product-1. But I need to set a link to the product depends on the category page from where this product is opened. So if I open category-2 page the link to this product needs to be https://site.com/category-2/product-1. If I open category-3 page the link to this product needs to be https://site.com/category-3/product-1. And I need to have all these links to be working. How can I do it? Because when I open a link https://site.com/category-2/product-1 it redirects me to the default link - https://site.com/category-1/product-1. Thanks. Share this post Link to post Share on other sites
Daresh 508 Posted January 23 Posted January 23 A basic assumption from a SEO point of view is that there should not be duplicate content, that's why it should be hard to achieve something like this, only by some custom module overriding default code. By default prestashop uses product's default category to build a link. Share this post Link to post Share on other sites
Igor Silvito 0 Posted January 23 Posted January 23 Yes, I tried to set another default category for building a link - it works. But when I use this new link it redirects me to the default product link (using default product category). Where do I need to update this functionality? Regarding duplicate content - I use category name in the product title, description and breadcrumbs - that's why they will be different. Share this post Link to post Share on other sites
Daresh 508 Posted January 23 Posted January 23 Traffic & SEO -> Redirect to the canonical URL Share this post Link to post Share on other sites
Igor Silvito 0 Posted January 23 Posted January 23 Here my settings on Traffic & SEO page for product link - {category:/}{rewrite}.html And here the category is used as default. And the link to the product will be like this - https://site.com/category-1/product-1. When I open this link https://site.com/category-2/product-1 the site redirects me to https://site.com/category-1/product-1. But I need to have this link https://site.com/category-2/product-1 also working. I understand that I need to do some changes to the source code. But I can't find where exactly. Share this post Link to post Share on other sites
Daresh 508 Posted January 23 Posted January 23 Traffic & SEO -> Redirect to the canonical URL (setting) Share this post Link to post Share on other sites
Igor Silvito 0 Posted January 23 Posted January 23 And what do I need to set there? Share this post Link to post Share on other sites
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