Custom Sitemap by looping product id:s and listing uniwue combinations – Upwork

Affiliate Dev

I'm developing an affiliate site where I'm using Wocommerce for listing products.
The site also has a comparison feature where users can compare 2 products. I site generates pages for the comparison dynamically based on which products the user selects and I need to set up a sitemap for these comparison pages.
The URLs of the comparison page looks like this /compare/?compareids=id_product1,id_product2
The problem with this solution is that the site generates separate pages for product1 vs product2 and product2 vs product1. It takes the position of the product into consideration even though to the user, it's the same products being compare.
The sitemap should list the unique combination of product id:s.
Posted On: August 23, 2021 08:23 UTC
Category: Back-End Development

Country: Sweden

click to apply

Leave a comment

Your email address will not be published. Required fields are marked *