Developer forum

Forum » Feature requests » Ecommerce dynamic URL improvements

Ecommerce dynamic URL improvements

Anett Nissen
Anett Nissen
Reply

Hi there

Many integrated products from ERP has same productname for many products if they use a Single product strukturen and are not able to use variants because of data  or in cases where productname is the same across languages

The big problem in these case is that products with same name are assigned an automatic URL with Numbers appended like: product.html + product-2.html

When a third product is added it does not get url product-3.html but all URLs with the same productname seems to be cleared and reassigned

so the third product may get product-1.html as URl and earlier products change to -2 and -3

This random change or reassignment of URLs is a Big problem for any digital campaigns using direct URLs to products, QR codes with links to products, digital pdf's with links to products and SEO in general. URLs are no longer valid - a link to a red sofa links now to a blue sofa etc

Is it possible to implement that assigned URLs are not changed/reassigned and only new once are added unless URL cache is manualy cleared or the appropriate ecommerce product url field is assigned a value?

BR Anett


Replies

 
Nicolai Pedersen
Reply

Hi Anett

Yes - we know this can be tricky.

Are you using the new URLs - the ones that are attached to a page or the older version that is setup from settings?

The older version is getting the products and create the URLs based on the ProductCreated date in the DB. I can see that the new version does not - I have just changed that as that should take care of most of these problems as new products should have given that ProductCreated is filled correcly with the dates as the products are created. This will then not change all urls. But it will still change URLs if one of the products are removed.

I have no good solution to this - the products do have a URL field (ProductMetaUrl) that you can use to control what the URL should be. So in this case where you have a lot of entries with the same name, you can have the integration add the URL you want for a given product. I.e. adding the SKU to the name and us that as url: add {productname}-{sku} to the ProductMetaUrl field. Using this approach you will ensure that urls are unique, will not change and maybe even have better SEO.

BR Nicolai

 
Nicolai Pedersen
Reply

Also note that using the new URL providers, all product URLs are created in the context of the group they are in and is unique on the entire path of shop, group and language.

Whereas the old approach the product URLs are unique in the entire scope of groups, shops and languages.

This means that the chance of having products that does not have a unique name and hence gets the added -1 is way less on the new URL system. It will actually only happen if you have 2 products in the same group with the same name in the same language.

 
Anett Nissen
Anett Nissen
Reply

Hi Nicolai

We are not using Ecommerce Navigation on this solution.

What happens when products are in many different Ecommerce groups?

We have PIM on the solution and the Client is publishing from PIM to different Ecommerce groups used for different purposes (Brand, News, Product type...)

Is it the Primary Ecommerce group that trickers a new URL then? More products with the same name in the same Primary Ecommerce group.

Or is it simply any products with the same name in any Ecommerce groups across Ecommerce?

BR Anett

 
Anett Nissen
Anett Nissen
Reply

If we use the {productname}-{sku} to the ProductMetaUrl solution. Would it be enough to add the name + SKU or should we include the entire path to detailpage infront?

 
Nicolai Pedersen
Reply

In the old url providers, the group part and product part of the url is 2 different things - they are not connected.

So what happens is that ?ID=123&GroupID=G1&ProductID=P1 is translated to a friendly version 1 at the time

?ID=123 => /products
&GroupID=G1 => /group1
&ProductID=P1 => /product1
Result:  /products/group1/product1

So if you change the grouid to &GroupID=G2 the URL will become /products/group2/product1 instead. Also even if product1 does not exist in group2.

So - it does not matter what the URLs do in this case - it is how the template create the link to that product.

So it depends on the template tag you use - i.e. if you use Ecom:Product.LinkGroup.Clean you will get the primary group if that is present - no matter if the primary group is ecommerce, pim or something else.
If you use Ecom:Product.LinkGroupShopContext.Clean tag instead, you will get the primary group of the current shop if it exists - or the "first" random group belonging in that shop context.

The last option is to manually create the link to the right group directly in the template instead of using one of the build in combinations - as there can be many as you state.

BR Nicolai