Developer forum

Forum » Ecommerce - Standard features » Product group attached to two parent groups

Product group attached to two parent groups

Tomas Gomez
Reply

Hi,

In the Ecommerce module, we have a product group attached to two different parent groups. It works nice and the group is displayed in both parent hierarchies.

The URL are generated with only the product name. This way, two pages are created for every product:

  • Page 1
    • URL:  myweb/product-name
    • Canonical: myweb/product-name-1
  • Page 2
    • URL:  myweb/product-name-1
    • Canonical: myweb/product-name-1

Is it possible to generate only one page per product? that is to remove Page 2

And more important, how can we avoid the -1 in the canonical of Page 1?

Regards,
Tomas


Replies

 
Nicolai Pedersen
Reply

You cannot.

When you place the products in the root, there is no group to help find the right path. So that is why it will generate 2 urls - one for group1/product and one for group2/product - otherwise the group context would not work. 

On the product you have 2 relations to the groups - mark one as primary - then that is the one that will be used for the canonical. And then you should be able to avoid the -1 in the canonical.

But really the -1 one is not a problem.

BR Nicolai

 
Tomas Gomez
Reply

Hi Nicolai,

Ok, I understand that two URLs are needed in order to point the product at both paths.

But it is not possible to choose the primary group of the product because it appears included in only one group (despite the group has two parent-groups)

I tried editing the properties of the group to select its primary parent-group. All options result in the canonical with the "-1" suffix.

It looks like the "canonical generator" ignores the primary group of a group with multiple parents. Could you confirm this or know any workaround?

Thanks,
Tomas

 

 

You must be logged in to post in the forum