Developer forum

Forum » Ecommerce - Standard features » -1 and -2 in variant URLs

-1 and -2 in variant URLs

Roald Haahr
Reply

Hi,

 

We are facing a situation where some variant URLs are appended with -1, -2, -3 and so on. E.g. on a size medium shirt it could look like /products/shirt/m-1. Looking into the variant options table in the database I see that the names of the problematic variant options exists multiple times across different variant groups. E.g. variant option name 'M' could be used in the two variant groups Size and Variant. I tried to switch between the old and the new URL provider, but unfortunately it seems that none of them removes the -1 from the URL.

 

I assume that one way to solve this problem is to ensure that a variant option name will only occur once across all variant groups. Unfortunately that does not work for this solution.
Is there another way to solve this problem?

 

Solution info

Amount of variant options: ~6000

Amount of variant groups: 140

Amount of products: ~17000

 

Dynamicweb version: 9.12.5

Rapido version: 3.4.3

 

Kind regards
Roald

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

If you use the "ADD-INS" section in Customized URLs under Settings, then all variant option url parts are generated in one index - so if you have 2 equal option names, you get the -1 -2 etc. That cannot be avoided.

If you use the page based URL provider that you access on the page properties, it generates full URLs for the product (page/group/product/variant) as a complete url - and only if there are duplicates there, it will add the -1. So this should be possible. Of course not if you have 2 "t-shirts" both "m" in the same group and page.

You can also fiddle with the "Ensure unique paths for each area" under settings. That setting will create a URL index for each website making duplicates less likely. Of course that requires that each website has its own domain or uses the regional options or language name as part of the URL.

No matter what, the -1 issue will not go away before the URL is unique in the URL index(es).

Votes for this answer: 1
 
Roald Haahr
Reply

Hi Nicolai

Thank you for clarifying that for me. Out of curiosity where do I find these URL indexes?

We have a problem where the URLs of variant products change when they have -1, -2 or alike in the URL. E.g. we import a product feed in Clerk and sometimes variant products in Clerk ribbons will lead to a 404 page because the URL has changed from /productpage/productA/variantA-2 to /productpage/productA/variantA-1.

Have you experience this before?

Kind regards
Roald

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

The urlindexes are in memory, so you cannot find them.

If you have debugging enabled you can add ?showurlindex=true to your querystring and see the first 10000 of the current areas url index.

 

You must be logged in to post in the forum