Developer forum

Forum » Ecommerce - Standard features » Placing products in the root

Placing products in the root

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

In DW 9, using the new URL providers at the page level, can I move all products in the root of the site? So I could have groups like this:

https://domain.com/group1/subgroup1
https://domain.com/group1/subgroup2
https://domain.com/group2/subgroup1

But then want my products to end up like this:

https://domain.com/product-name-product-number

The reason for this is that the original group has meaning for the user. We're dealing with spare parts where a single part can be in multiple models (each defined by a group). If I land on the site for a specific model like group2/subgroup1, then clicking a product could take me to another group (thus model) based on the primary group for the product which confuses the user. Placing the products in the root takes away that ambiguity.

Any ideas? Happy to do anything custom if needed.

Thanks!

Imar


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You might be able to set this:

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

That does drop the group from the URL (which is good) but only uses the product number, not the name for the URL.I.e. I get:

https://domain.com/product-number

and not

https://domain.com/product-name-product-number

Can that be configured further?

Imar

 

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Bump. Anyone?

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Imar,
Since your combination seems to be unsupported, what about using the URL field on the product and populating it on the ProductSave notification?
Would that work?
I see there are a number of new options for the High-Volume URLs but I have not played with them enough.

Adrian

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

>> what about using the URL field on the product and populating it

Thanks Adrian, that put me on the right track. It turned out we already had the Meta URL field set, and only with the product number :-) That caused the URL to be off. When I cleared the URL field, it did show the name of the product. I'd like to show both the name and the number, so whoever/whatever sets the URL fields needs to be updated to show both.

For anyone else wanting this, this will lead to duplicate URLs: you get a -1, -2 etc for each additional group the product is in. I think that makes sense. And in our case, it's what we need as it maintains the proper breadcrumb with groups for each unique URL. The canonical is pointing to a single URL so that should be OK for SEO.

Imar

 

 

You must be logged in to post in the forum