Developer forum

Forum » Ecommerce - Standard features » Incorrect translation ecom group name from raw url

Incorrect translation ecom group name from raw url

John Broers
Reply

How can we translate the ecom group name in the URL that get created from a raw URL. For example example:

If you go to '/Default.aspx?ID=1425&GroupID=GROUP8' on the dutch website it results in '/products/muizen-bestrijden' which is fine. If you go to this URL on the german website '/Default.aspx?ID=1012&GroupID=GROUP8' it results in '/produkte/muizen-bestrijden'. It looks like it's not translating the ecom group name. Even though it is translated in the backend. 

I checked the Ecommerce settings in the website settings and the right language is selected there. Is there any other place where you need to configure something? We are on DW 9.8.9


Replies

 
Viktor Letavin Dynamicweb Employee
Viktor Letavin
Reply

Hi,

I can see your problem, TFS# Bug 82879: website language hasn't affect on group name in url 

created to fix the issue.

BR, Viktor.

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi John,

I've looked into this issue and there's something I don't understand about your setup.

It seems to me that the same page is used in both examples, ID=1425, so I don't understand how that page can have two different names, products and produkte. Normally, I would expect to see two different websites - and, by extension, two different pages - when you want to switch languages like that. Is it a copy/paste mistake that the url was repeated or are you using only one website and changing the Ecommerce language with LanguageID=LANG2?

If you're using two websites with different Ecommerce Languages, it should work. At least, I have been unable to reproduce the issue with this setup. If this is indeed your setup, could you provide me with a link to the solution so I can investigate further. If you don't want to post it here on the forum, you can send it directly to me. You can find my email address by hovering the mouse over my name badge on this post.

In the case you're using only one website, you should consider using two. While changing the Ecommerce language on a website is possible, if could easily lead to issues - which is why we don't recommend doing a setup like this.

- Jeppe

 

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi John,

From your mail reply, I discovered that you're using the meta url on your group. There is a bug with the redirect from the ID-based url to the SEO url when using meta urls in Ecommerce. This has now been corrected and the fix will be released with Dynamicweb 9.9 later this month.

- Jeppe

 
Peter Leleulya
Peter Leleulya
Reply

I've been waiting for this to be fixed.

I can confirm that 9.9.1 has the urls fixed, but another issue (i thought they where related) hasn't been ...

When I get my top level groups using:

var shop = !string.IsNullOrEmpty(shopId) ? Services.Shops.GetShop(shopId) : Services.Shops.GetDefaultShop();
var topLevelGroups = shop.get_TopLevelGroups(ecomLanguage);

And my ecomLanguage value = "LANG2"

And I would like the subgroups of one of there top groups using:

var parentGroup = topLevelGroups.FirstOrDefault(tg => tg.Id.Equals(parentId));
var validGroups = parentGroup?.Subgroups?.Where(sg => validGroupIds.Contains(sg.Id));

The parentGroup.Subgroups are of "LANG1" ....

And there seems to be no way to get the LANG2 versions at this point ...

 

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Peter,

The property Group.Subgroups returns the groups in your context language as the property documentation also says, but I do agree that it doesn't necessarily make sense.

However, that is unrelated to the issue in this thread. So, can I ask you to start a new thread so we can track the issues separately?

- Jeppe

 
Peter Leleulya
Peter Leleulya
Reply

I have created the forum post as requested: https://doc.dynamicweb.com/forum?ThreadID=71190&PID=1605

Seems that in my code I can SET the context language Id to fix my issue.
But still, when I heve groups in a certain language and request its subgroups I want them to be in the same language ...

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Peter,

Thank you for creating the new thread.

I agree that it should be possible to get subgroups in the same language as the parent, and, as you found out, there are some workarounds, but let's continue the discussion in the other thread.

- Jeppe

 

You must be logged in to post in the forum