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.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Grand.Web.Common
@using System.Globalization
@using Microsoft.AspNetCore.Http.Extensions
@using Microsoft.AspNetCore.Mvc.ViewFeatures
@using System.Text
@using Grand.SharedKernel.Extensions
@using Grand.Infrastructure
@using Grand.Domain.Common
@using Grand.Domain.Catalog
@using Grand.Domain.Directory
@using Grand.Web.Common
@using Grand.Web.Common.Extensions
@using Grand.Web.Common.Localization
@using Grand.Web.AdminShared.Models.Blogs
@using Grand.Web.AdminShared.Models.Catalog
@using Grand.Web.AdminShared.Models.Orders
@using Grand.Web.AdminShared.Models.Customers
@using Grand.Web.AdminShared.Models.Discounts
@using Grand.Web.AdminShared.Models.Messages
@using Grand.Web.AdminShared.Interfaces
@inject LocService Loc
@inject IEnumTranslationService EnumTranslationService
@inject IAdminDataScope<Product> Scope
@* Two host-detection idioms in these shared views; do not invent a third.
Scope.ResourceKeyPrefix — "Admin" or "Vendor". Use for anything the same in Admin and Store but
different in Vendor: resource keys, and capability differences Vendor doesn't have.
ViewContext.RouteData.Values["area"] — "Admin", "Store" or "Vendor". Use ONLY when Admin must be
told apart from Store; both report ResourceKeyPrefix == "Admin", so it cannot distinguish them.
The same "area" route value drives RoutedProductDataScope, so the two cannot drift apart. *@