Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Fix multi language URL for single store with multi lang configuration #141

KrzysztofPajak581df26a6036
diff --git a/src/Business/Grand.Business.System/Services/BackgroundServices/ScheduleTasks/GenerateSitemapXmlTask.cs b/src/Business/Grand.Business.System/Services/BackgroundServices/ScheduleTasks/GenerateSitemapXmlTask.cs
index 294806334..f34c89349 100644
--- a/src/Business/Grand.Business.System/Services/BackgroundServices/ScheduleTasks/GenerateSitemapXmlTask.cs
+++ b/src/Business/Grand.Business.System/Services/BackgroundServices/ScheduleTasks/GenerateSitemapXmlTask.cs
@@ -53,6 +53,9 @@ namespace Grand.Business.System.Services.BackgroundServices.ScheduleTasks
if (!(stores.Count == 1 && languages.Count == 1))
file = $"sitemap-{store.Shortcut}-{lang.UniqueSeoCode}.xml";
+ if (stores.Count == 1 && languages.Count > 1)
+ file = $"sitemap-{lang.UniqueSeoCode}.xml";
+
await _mediaFileStore.WriteAllText(file, siteMap);
}
}