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
Extend Store entity - Add company registration number
KrzysztofPajaka8be637930bc
diff --git a/src/API/Grand.Api/DTOs/Common/StoreDto.cs b/src/API/Grand.Api/DTOs/Common/StoreDto.csindex 57026b920..87e696c1a 100644--- a/src/API/Grand.Api/DTOs/Common/StoreDto.cs+++ b/src/API/Grand.Api/DTOs/Common/StoreDto.cs@@ -15,6 +15,7 @@ namespace Grand.Api.DTOs.Commonpublic string CompanyName { get; set; }public string CompanyAddress { get; set; }public string CompanyPhoneNumber { get; set; }+ public string CompanyRegNo { get; set; }public string CompanyVat { get; set; }}}diff --git a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidStore.cs b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidStore.csindex 0121c31b1..4a1e575df 100644--- a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidStore.cs+++ b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidStore.cs@@ -67,6 +67,10 @@ namespace Grand.Business.Messages.DotLiquidDropsget { return _store.CompanyHours; }}+ public string CompanyRegNo {+ get { return _store.CompanyRegNo; }+ }+public string CompanyVat{get { return _store.CompanyVat; }diff --git a/src/Business/Grand.Business.System/Services/Installation/InstallDataStores.cs b/src/Business/Grand.Business.System/Services/Installation/InstallDataStores.csindex a95eef5a7..b92244b64 100644--- a/src/Business/Grand.Business.System/Services/Installation/InstallDataStores.cs+++ b/src/Business/Grand.Business.System/Services/Installation/InstallDataStores.cs@@ -25,6 +25,7 @@ namespace Grand.Business.System.Services.InstallationCompanyName = companyName,CompanyAddress = companyAddress,CompanyPhoneNumber = companyPhoneNumber,+ CompanyRegNo = null,CompanyVat = null,CompanyEmail = companyEmail,CompanyHours = "Monday - Sunday / 8:00AM - 6:00PM",diff --git a/src/Core/Grand.Domain/Stores/Store.cs b/src/Core/Grand.Domain/Stores/Store.csindex 875d4745b..7c92cdf22 100644--- a/src/Core/Grand.Domain/Stores/Store.cs+++ b/src/Core/Grand.Domain/Stores/Store.cs@@ -75,6 +75,11 @@ namespace Grand.Domain.Stores/// </summary>public string CompanyName { get; set; }+ /// <summary>+ /// Gets or sets the company registration number+ /// </summary>+ public string CompanyRegNo { get; set; }+/// <summary>/// Gets or sets the company address/// </summary>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Store/_CreateOrUpdate.TabInfo.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Store/_CreateOrUpdate.TabInfo.cshtmlindex cc28f627c..b40a104b4 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Store/_CreateOrUpdate.TabInfo.cshtml+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Store/_CreateOrUpdate.TabInfo.cshtml@@ -104,6 +104,13 @@<span asp-validation-for="CompanyName"></span></div></div>+ <div class="form-group">+ <admin-label asp-for="CompanyRegNo" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="CompanyRegNo" />+ <span asp-validation-for="CompanyRegNo"></span>+ </div>+ </div><div class="form-group"><admin-label asp-for="CompanyAddress" /><div class="col-md-9 col-sm-9">diff --git a/src/Web/Grand.Web.Admin/Models/Stores/StoreModel.cs b/src/Web/Grand.Web.Admin/Models/Stores/StoreModel.csindex b2fed2f54..f749ca542 100644--- a/src/Web/Grand.Web.Admin/Models/Stores/StoreModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Stores/StoreModel.cs@@ -48,6 +48,9 @@ namespace Grand.Web.Admin.Models.Stores[GrandResourceDisplayName("Admin.Configuration.Stores.Fields.CompanyPhoneNumber")]public string CompanyPhoneNumber { get; set; }+ [GrandResourceDisplayName("Admin.Configuration.Stores.Fields.CompanyRegNo")]+ public string CompanyRegNo { get; set; }+[GrandResourceDisplayName("Admin.Configuration.Stores.Fields.CompanyVat")]public string CompanyVat { get; set; }diff --git a/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml b/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xmlindex b70269019..e10034e4c 100644--- a/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml+++ b/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml@@ -5133,6 +5133,9 @@<Resource Name="Admin.Configuration.Stores.Fields.CompanyPhoneNumber"><Value>Company phone number</Value></Resource>+ <Resource Name="Admin.Configuration.Stores.Fields.CompanyRegNo">+ <Value>Company Reg. No.</Value>+ </Resource><Resource Name="Admin.Configuration.Stores.Fields.CompanyVat"><Value>Company VAT</Value></Resource>