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
Added vendor data edit capability to the vendor portal
support730b2d8edcb6
diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/EditorTemplates/Address.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/EditorTemplates/Address.cshtmlnew file mode 100644index 000000000..7677b4459--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/EditorTemplates/Address.cshtml@@ -0,0 +1,222 @@+@model AddressModel+@if (Model.CountryEnabled && Model.StateProvinceEnabled)+{+ <script>+ $(document).ready(function() {+ $("#@Html.IdFor(model => model.CountryId)").change(function() {+ var selectedItem = $(this).val();+ var ddlStates = $("#@Html.IdFor(model => model.StateProvinceId)");+ $.ajax({+ cache: false,+ type: "GET",+ url: "@(Url.Action("GetStatesByCountryId", "Home"))",+ data: { "countryId": selectedItem, "addSelectStateItem": "false" },+ success: function(data) {+ ddlStates.html('');+ $.each(data, function(id, option) {+ ddlStates.append($('<option></option>').val(option.id).html(option.name));+ });+ },+ error: function(xhr, ajaxOptions, thrownError) {+ alert('Failed to retrieve states.');+ }+ });+ });+ });+ </script>+}+<input asp-for="Id" type="hidden" />+<input asp-for="FirstNameEnabled" type="hidden" />+<input asp-for="FirstNameRequired" type="hidden" />+<input asp-for="LastNameEnabled" type="hidden" />+<input asp-for="LastNameRequired" type="hidden" />+<input asp-for="EmailEnabled" type="hidden" />+<input asp-for="EmailRequired" type="hidden" />+<input asp-for="CompanyEnabled" type="hidden" />+<input asp-for="CompanyRequired" type="hidden" />+<input asp-for="VatNumberEnabled" type="hidden" />+<input asp-for="VatNumberRequired" type="hidden" />+<input asp-for="CountryEnabled" type="hidden" />+<input asp-for="StateProvinceEnabled" type="hidden" />+<input asp-for="CityEnabled" type="hidden" />+<input asp-for="CityRequired" type="hidden" />+<input asp-for="StreetAddressEnabled" type="hidden" />+<input asp-for="StreetAddressRequired" type="hidden" />+<input asp-for="StreetAddress2Enabled" type="hidden" />+<input asp-for="StreetAddress2Required" type="hidden" />+<input asp-for="ZipPostalCodeEnabled" type="hidden" />+<input asp-for="ZipPostalCodeRequired" type="hidden" />+<input asp-for="PhoneEnabled" type="hidden" />+<input asp-for="PhoneRequired" type="hidden" />+<input asp-for="FaxEnabled" type="hidden" />+<input asp-for="FaxRequired" type="hidden" />+<input asp-for="NoteEnabled" type="hidden" />++<div class="form-horizontal">+ <div class="form-body">+ @if (Model.NameEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="Name" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="Name" />+ <span asp-validation-for="Name"></span>+ </div>+ </div>+ }+ @if (Model.FirstNameEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="FirstName" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="FirstName" />+ <span asp-validation-for="FirstName"></span>+ </div>+ </div>+ }+ @if (Model.LastNameEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="LastName" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="LastName" />+ <span asp-validation-for="LastName"></span>+ </div>+ </div>+ }+ @if (Model.EmailEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="Email" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="Email" />+ <span asp-validation-for="Email"></span>+ </div>+ </div>+ }+ @if (Model.CompanyEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="Company" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="Company" />+ <span asp-validation-for="Company"></span>+ </div>+ </div>+ }+ @if (Model.VatNumberEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="VatNumber" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="VatNumber" />+ <span asp-validation-for="VatNumber"></span>+ </div>+ </div>+ }+ @if (Model.CountryEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="CountryId" />+ <div class="col-md-9 col-sm-9">+ <admin-select asp-for="CountryId" asp-items="Model.AvailableCountries" />+ <span asp-validation-for="CountryId"></span>+ </div>+ </div>+ }+ @if (Model.CountryEnabled && Model.StateProvinceEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="StateProvinceId" />+ <div class="col-md-9 col-sm-9">+ <admin-select asp-for="StateProvinceId" asp-items="Model.AvailableStates" />+ <span asp-validation-for="StateProvinceId"></span>+ </div>+ </div>+ }+ @if (Model.CityEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="City" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="City" />+ <span asp-validation-for="City"></span>+ </div>+ </div>+ }+ @if (Model.StreetAddressEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="Address1" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="Address1" />+ <span asp-validation-for="Address1"></span>+ </div>+ </div>+ }+ @if (Model.StreetAddress2Enabled)+ {+ <div class="form-group">+ <admin-label asp-for="Address2" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="Address2" />+ <span asp-validation-for="Address2"></span>+ </div>+ </div>+ }+ @if (Model.ZipPostalCodeEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="ZipPostalCode" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="ZipPostalCode" />+ <span asp-validation-for="ZipPostalCode"></span>+ </div>+ </div>+ }+ @if (Model.PhoneEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="PhoneNumber" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="PhoneNumber" />+ <span asp-validation-for="PhoneNumber"></span>+ </div>+ </div>+ }+ @if (Model.FaxEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="FaxNumber" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="FaxNumber" />+ <span asp-validation-for="FaxNumber"></span>+ </div>+ </div>+ }+ @if (Model.NoteEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="Note" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="Note" />+ <span asp-validation-for="Note"></span>+ </div>+ </div>+ }+ @if (Model.AddressTypeEnabled)+ {+ <div class="form-group">+ <admin-label asp-for="AddressType" />+ <div class="col-md-9 col-sm-9">+ <select asp-for="AddressType" asp-items="@AddressType.Any.ToSelectList(Context, false).ToList()" class="form-control custom-select"></select>+ <span asp-validation-for="AddressType"></span>+ </div>+ </div>+ }+ @if (Model.CustomAddressAttributes.Count > 0)+ {+ <partial name="Partials/AddressAttributes" model="Model.CustomAddressAttributes" />+ }+ </div>+</div>\ No newline at end of filediff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/Partials/AddressAttributes.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/Partials/AddressAttributes.cshtmlnew file mode 100644index 000000000..d709f37b7--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/Partials/AddressAttributes.cshtml@@ -0,0 +1,74 @@+@model IList<AddressModel.AddressAttributeModel>+@foreach (var attribute in Model)+{+ var controlId = $"attributes[{attribute.Id}]";+ var textPrompt = attribute.Name;++ <div class="form-group">+ <label class="control-label col-md-3">@textPrompt</label>+ <div class="col-md-9 col-sm-9">+ @switch (attribute.AttributeControlType)+ {+ case AttributeControlType.DropdownList:+ {+ <select class="form-control" name="@(controlId)" id="@(controlId)">+ @if (!attribute.IsRequired)+ {+ <option value="">---</option>+ }+ @foreach (var attributeValue in attribute.Values)+ {+ <option selected="@attributeValue.IsPreSelected" value="@attributeValue.Id">@attributeValue.Name</option>+ }+ </select>+ }+ break;+ case AttributeControlType.RadioList:+ {+ <div class="radio-list">+ @foreach (var attributeValue in attribute.Values)+ {+ <div>+ <input id="@(controlId)_@(attributeValue.Id)" type="radio" name="@(controlId)" value="@attributeValue.Id" checked="@attributeValue.IsPreSelected" />+ <label for="@(controlId)_@(attributeValue.Id)">@attributeValue.Name</label>+ </div>+ }+ </div>+ }+ break;+ case AttributeControlType.Checkboxes:+ case AttributeControlType.ReadonlyCheckboxes:+ {+ <div class="checkbox-list">+ @foreach (var attributeValue in attribute.Values)+ {+ <div>+ <input id="@(controlId)_@(attributeValue.Id)" type="checkbox" name="@(controlId)" value="@(attributeValue.Id)" checked="@(attributeValue.IsPreSelected)" @(attribute.AttributeControlType == AttributeControlType.ReadonlyCheckboxes ? Html.Raw(" disabled=\"disabled\"") : null) />+ <label for="@(controlId)_@(attributeValue.Id)">@attributeValue.Name</label>+ </div>+ }+ </div>+ }+ break;+ case AttributeControlType.TextBox:+ {+ <input name="@(controlId)" type="text" class="form-control text-box single-line" id="@(controlId)" value="@(attribute.DefaultValue)" />+ }+ break;+ case AttributeControlType.MultilineTextbox:+ {+ <textarea id="@(controlId)" style="Width: 250px; Height: 150px;" name="@(controlId)">@(attribute.DefaultValue)</textarea>+ }+ break;+ case AttributeControlType.Datepicker:+ case AttributeControlType.FileUpload:+ case AttributeControlType.ColorSquares:+ case AttributeControlType.ImageSquares:+ {+ //not support attribute type+ }+ break;+ }+ </div>+ </div>+}diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/_VendorLayout.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/_VendorLayout.cshtmlindex 58d52abba..ebdedd96a 100644--- a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/_VendorLayout.cshtml+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shared/_VendorLayout.cshtml@@ -1,6 +1,11 @@@inject IWorkContext workContext@inject LanguageSettings languageSettings+@inject VendorSettings vendorSettings@using Grand.Domain.Localization+@using Grand.Domain.Vendors+@using Grand.Web.Common.TagHelpers+@using Grand.Web.Vendor.Components+@using Microsoft.AspNetCore.Mvc.TagHelpers@{var currentCustomer = workContext.CurrentCustomer;var currentVersion = GrandVersion.FullVersion;@@ -110,6 +115,14 @@</a><ul class="dropdown-menu dropdown-menu-right dropdown-menu-default">+ @if (vendorSettings.AllowVendorsToEditInfo)+ {+ <li>+ <a href="@Url.Action("Edit", "VendorInfo", new { area = Constants.AreaVendor })">+ <i class="icon-user"></i> @Loc["Vendor.Header.Profile"]+ </a>+ </li>+ }<li><a href="@Url.Action("Logout", "Home", new { area = Constants.AreaVendor }, null)"><i class="icon-logout"></i> @Loc["Vendor.Header.Logout"]diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Edit.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Edit.cshtmlnew file mode 100644index 000000000..43295ef63--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Edit.cshtml@@ -0,0 +1,29 @@+@model VendorModel+@{+ //page title+ ViewBag.Title = Loc["Vendor.EditVendorDetails"];+}+<form asp-area="@Constants.AreaVendor" asp-controller="VendorInfo" asp-action="Edit" method="post">++ <div class="row">+ <div class="col-md-12">+ <div class="x_panel light form-fit">+ <div class="x_title">+ <div class="caption">+ <i class="fa fa-cube"></i>+ @Loc["Vendor.EditVendorDetails"] - @Model.Name+ </div>+ <div class="actions">+ <div class="btn-group btn-group-devided">+ <button class="btn btn-success" type="submit" name="save"><i class="fa fa-check"></i> @Loc["Vendor.Common.Save"] </button>+ <vc:vendor-widget widget-zone="vendor_vendor_details_buttons" additional-data="Model" />+ </div>+ </div>+ </div>+ <div class="x_content form">+ <partial name="Partials/CreateOrUpdate" model="Model" />+ </div>+ </div>+ </div>+ </div>+</form>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.TabInfo.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.TabInfo.cshtmlnew file mode 100644index 000000000..9f1ca168a--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.TabInfo.cshtml@@ -0,0 +1,105 @@+@model VendorModel+@using Microsoft.AspNetCore.Mvc.Razor;+<script>+ $(document).ready(function () {+ $("@Model.AllowCustomersToSelectPageSize").click(togglePageSize);+ togglePageSize();+ });++ function togglePageSize() {+ if ($('@Model.AllowCustomersToSelectPageSize').is(':checked')) {+ $('#pnlPageSize').hide();+ $('#pnlPageSizeOptions').show();+ } else {+ $('#pnlPageSize').show();+ $('#pnlPageSizeOptions').hide();+ }+ }+</script>+<vc:vendor-widget widget-zone="vendor_vendor_details_info_top" additional-data="Model" />++@{ Func<int, HelperResult>+ template = @<div class="form-body">+ <div class="form-group">+ <admin-label asp-for="@Model.Locales[item].Name" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="@Model.Locales[item].Name" />+ <span asp-validation-for="@Model.Locales[item].Name"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="@Model.Locales[item].Description" />+ <div class="col-md-9 col-sm-9">+ <admin-textarea asp-for="@Model.Locales[item].Description"></admin-textarea>+ <span asp-validation-for="@Model.Locales[item].Description"></span>+ </div>+ </div>+ <input asp-for="@Model.Locales[item].LanguageId" type="hidden" />+</div>;+}+<div class="form-horizontal">+ <localized-editor localized-template=@template name="vendor-info-localized" [email protected](c=>c.LanguageId).ToList()>+ <div class="form-body">+ <div class="form-group">+ <admin-label asp-for="Name" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="Name" />+ <span asp-validation-for="Name"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="Description" />+ <div class="col-md-9 col-sm-9">+ <admin-textarea asp-for="Description"></admin-textarea>+ <span asp-validation-for="Description"></span>+ </div>+ </div>+ </div>+ </localized-editor>+ <div class="form-body">+ <div class="form-group">+ <admin-label asp-for="Email" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="Email" />+ <span asp-validation-for="Email"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="AllowCustomersToSelectPageSize" />+ <div class="col-md-9 col-sm-9">+ <label class="mt-checkbox mt-checkbox-outline control control-checkbox">+ <admin-input asp-for="AllowCustomersToSelectPageSize" />+ <div class="control__indicator"></div>+ </label>+ <span asp-validation-for="AllowCustomersToSelectPageSize"></span>+ </div>+ </div>+ <div class="form-group" id="pnlPageSize">+ <admin-label asp-for="PageSize" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="PageSize" />+ <span asp-validation-for="PageSize"></span>+ </div>+ </div>+ <div class="form-group" id="pnlPageSizeOptions">+ <admin-label asp-for="PageSizeOptions" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="PageSizeOptions" />+ <span asp-validation-for="PageSizeOptions"></span>+ </div>+ </div>+ </div>+</div>+@if (Model.Address.FaxEnabled || Model.Address.PhoneEnabled || Model.Address.StateProvinceEnabled || Model.Address.StreetAddressEnabled || Model.Address.ZipPostalCodeEnabled ||+Model.Address.CityEnabled || Model.Address.CompanyEnabled || Model.Address.CountryEnabled || Model.Address.StreetAddress2Enabled)+{+ <div class="panel panel-default">+ <div class="panel-heading">+ @Loc["Admin.Vendors.Fields.Address"]+ </div>+ <div class="panel-body">+ <admin-input asp-for="Address" asp-template="Address" />+ </div>+ </div>+}+<vc:admin-widget widget-zone="vendor_details_info_bottom" additional-data="Model" />\ No newline at end of filediff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.TabSeo.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.TabSeo.cshtmlnew file mode 100644index 000000000..f204a2859--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.TabSeo.cshtml@@ -0,0 +1,73 @@+@model VendorModel+@using Microsoft.AspNetCore.Mvc.Razor;++<vc:admin-widget widget-zone="vendor_details_seo_top" additional-data="Model" />++@{ Func<int, HelperResult>+ template = @<div class="form-body">+ <div class="form-group">+ <admin-label asp-for="@Model.Locales[item].MetaKeywords" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="@Model.Locales[item].MetaKeywords" />+ <span asp-validation-for="@Model.Locales[item].MetaKeywords"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="@Model.Locales[item].MetaDescription" />+ <div class="col-md-9 col-sm-9">+ <admin-textarea asp-for="@Model.Locales[item].MetaDescription"></admin-textarea>+ <span asp-validation-for="@Model.Locales[item].MetaDescription"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="@Model.Locales[item].MetaTitle" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="@Model.Locales[item].MetaTitle" />+ <span asp-validation-for="@Model.Locales[item].MetaTitle"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="@Model.Locales[item].SeName" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="@Model.Locales[item].SeName" />+ <span asp-validation-for="@Model.Locales[item].SeName"></span>+ </div>+ </div>+ <input asp-for="@Model.Locales[item].LanguageId" type="hidden" />+</div>;+}+<div class="form-horizontal">+ <localized-editor localized-template=@template name="vendor-seo-localized" [email protected](c=>c.LanguageId).ToList()>+ <div class="form-body">+ <div class="form-group">+ <admin-label asp-for="MetaKeywords" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="MetaKeywords" />+ <span asp-validation-for="MetaKeywords"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="MetaDescription" />+ <div class="col-md-9 col-sm-9">+ <admin-textarea asp-for="MetaDescription"></admin-textarea>+ <span asp-validation-for="MetaDescription"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="MetaTitle" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="MetaTitle" />+ <span asp-validation-for="MetaTitle"></span>+ </div>+ </div>+ <div class="form-group">+ <admin-label asp-for="SeName" />+ <div class="col-md-9 col-sm-9">+ <admin-input asp-for="SeName" />+ <span asp-validation-for="SeName"></span>+ </div>+ </div>+ </div>+ </localized-editor>+</div>+<vc:admin-widget widget-zone="vendor_details_seo_bottom" additional-data="Model" />\ No newline at end of filediff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.cshtmlnew file mode 100644index 000000000..ac3a88f73--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/VendorInfo/Partials/CreateOrUpdate.cshtml@@ -0,0 +1,23 @@+@model VendorModel++<div asp-validation-summary="All"></div>+<input asp-for="Id" type="hidden" />+<admin-tabstrip name="vendor-edit" BindGrid="true">+ <items>+ <tabstrip-item text="@Loc["Vendor.Info"]" tab-index="0">+ <content>+ <div>+ <partial name="Partials/CreateOrUpdate.TabInfo" model="Model" />+ </div>+ </content>+ </tabstrip-item>+ <tabstrip-item text="@Loc["Vendor.Common.SEO"]" tab-index="1">+ <content>+ <div>+ <partial name="Partials/CreateOrUpdate.TabSeo" model="Model" />+ </div>+ </content>+ </tabstrip-item>+ <vc:vendor-widget widget-zone="vendor_vendor_details_tabs" additional-data="Model" />+ </items>+</admin-tabstrip>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/_ViewImports.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/_ViewImports.cshtmlindex c151346c8..8fcb07419 100644--- a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/_ViewImports.cshtml+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/_ViewImports.cshtml@@ -24,10 +24,12 @@@using Grand.Web.Common.Page@using Grand.Web.Common.Link;@using Grand.Web.Vendor.Extensions;+@using Grand.Web.Vendor.Models.Common;@using Grand.Web.Vendor.Models.Catalog;@using Grand.Web.Vendor.Models.Orders;@using Grand.Web.Vendor.Models.Shipment;@using Grand.Web.Vendor.Models.MerchandiseReturn;+@using Grand.Web.Vendor.Models.Vendor;@using Grand.Web.Vendor.Models.VendorReview;@using Grand.Web.Vendor.Models.Report;@inject Grand.Web.Common.Localization.LocService Locdiff --git a/src/Web/Grand.Web.Vendor/Controllers/HomeController.cs b/src/Web/Grand.Web.Vendor/Controllers/HomeController.csindex c5bd69aaa..7f0c09749 100644--- a/src/Web/Grand.Web.Vendor/Controllers/HomeController.cs+++ b/src/Web/Grand.Web.Vendor/Controllers/HomeController.cs@@ -1,6 +1,9 @@using Grand.Business.Core.Interfaces.Authentication;using Grand.Business.Core.Extensions;+using Grand.Business.Core.Interfaces.Common.Directory;+using Grand.Business.Core.Interfaces.Common.Localization;using Grand.Business.Core.Interfaces.Common.Logging;+using Grand.Domain.Directory;using Grand.Infrastructure;using Microsoft.AspNetCore.Mvc;@@ -54,7 +57,50 @@ namespace Grand.Web.Vendor.Controllersawait _authenticationService.SignOut();return RedirectToRoute("VendorLogin");}+ [AcceptVerbs("Get")]+ public async Task<IActionResult> GetStatesByCountryId(+ [FromServices] ICountryService countryService,+ [FromServices] ITranslationService translationService,+ string countryId, bool? addSelectStateItem, bool? addAsterisk)+ {+ // This action method gets called via an ajax request+ if (string.IsNullOrEmpty(countryId))+ return Json(new List<dynamic> { new { id = "", name = translationService.GetResource("Address.SelectState") } });+ var country = await countryService.GetCountryById(countryId);+ var states = country != null ? country.StateProvinces.ToList() : new List<StateProvince>();+ var result = (from s in states+ select new { id = s.Id, name = s.Name }).ToList();+ if (addAsterisk.HasValue && addAsterisk.Value)+ {+ //asterisk+ result.Insert(0, new { id = "", name = "*" });+ }+ else+ {+ if (country == null)+ {+ //country is not selected ("choose country" item)+ if (addSelectStateItem.HasValue && addSelectStateItem.Value)+ {+ result.Insert(0, new { id = "", name = translationService.GetResource("Vendor.Address.SelectState") });+ }+ }+ else+ {+ //some country is selected+ if (result.Any())+ {+ //country has some states+ if (addSelectStateItem.HasValue && addSelectStateItem.Value)+ {+ result.Insert(0, new { id = "", name = translationService.GetResource("Vendor.Address.SelectState") });+ }+ }+ }+ }+ return Json(result);+ }#endregion}}diff --git a/src/Web/Grand.Web.Vendor/Controllers/VendorInfoController.cs b/src/Web/Grand.Web.Vendor/Controllers/VendorInfoController.csnew file mode 100644index 000000000..02cd5d0e4--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Controllers/VendorInfoController.cs@@ -0,0 +1,173 @@+using Grand.Business.Core.Extensions;+using Grand.Business.Core.Interfaces.Common.Localization;+using Grand.Business.Core.Interfaces.Common.Directory;+using Grand.Business.Core.Interfaces.Common.Seo;+using Grand.Business.Core.Interfaces.Customers;+using Grand.Domain.Directory;+using Grand.Domain.Seo;+using Grand.Domain.Vendors;+using Grand.Infrastructure;+using Grand.Web.Common.Extensions;+using Grand.Web.Vendor.Extensions;+using Grand.Web.Vendor.Models.Vendor;+using Microsoft.AspNetCore.Mvc;+using Microsoft.AspNetCore.Mvc.Rendering;++namespace Grand.Web.Vendor.Controllers+{+ public class VendorInfoController : BaseVendorController+ {+ #region Fields++ private readonly IWorkContext _workContext;+ private readonly ITranslationService _translationService;+ private readonly IVendorService _vendorService;+ private readonly ILanguageService _languageService;+ private readonly ICountryService _countryService;+ private readonly ISlugService _slugService;++ private readonly SeoSettings _seoSettings;+ private readonly VendorSettings _vendorSettings;+ #endregion++ #region Constructors++ public VendorInfoController(+ ITranslationService translationService,+ IVendorService vendorService,+ ILanguageService languageService,+ IWorkContext workContext,+ ICountryService countryService,+ ISlugService slugService,+ SeoSettings seoSettings,+ VendorSettings vendorSettings)+ {++ _translationService = translationService;+ _vendorService = vendorService;+ _languageService = languageService;+ _workContext = workContext;+ _countryService = countryService;+ _slugService = slugService;+ _seoSettings = seoSettings;+ _vendorSettings = vendorSettings;+ }++ #endregion++ #region Private methods++ private async Task PrepareVendorAddressModel(VendorModel model, Domain.Vendors.Vendor vendor)+ {+ model.Address ??= new Models.Common.AddressModel();++ model.Address.FirstNameEnabled = false;+ model.Address.FirstNameRequired = false;+ model.Address.LastNameEnabled = false;+ model.Address.LastNameRequired = false;+ model.Address.EmailEnabled = false;+ model.Address.EmailRequired = false;+ model.Address.CompanyEnabled = _vendorSettings.AddressSettings.CompanyEnabled;+ model.Address.CountryEnabled = _vendorSettings.AddressSettings.CountryEnabled;+ model.Address.StateProvinceEnabled = _vendorSettings.AddressSettings.StateProvinceEnabled;+ model.Address.CityEnabled = _vendorSettings.AddressSettings.CityEnabled;+ model.Address.CityRequired = _vendorSettings.AddressSettings.CityRequired;+ model.Address.StreetAddressEnabled = _vendorSettings.AddressSettings.StreetAddressEnabled;+ model.Address.StreetAddressRequired = _vendorSettings.AddressSettings.StreetAddressRequired;+ model.Address.StreetAddress2Enabled = _vendorSettings.AddressSettings.StreetAddress2Enabled;+ model.Address.ZipPostalCodeEnabled = _vendorSettings.AddressSettings.ZipPostalCodeEnabled;+ model.Address.ZipPostalCodeRequired = _vendorSettings.AddressSettings.ZipPostalCodeRequired;+ model.Address.PhoneEnabled = _vendorSettings.AddressSettings.PhoneEnabled;+ model.Address.PhoneRequired = _vendorSettings.AddressSettings.PhoneRequired;+ model.Address.FaxEnabled = _vendorSettings.AddressSettings.FaxEnabled;+ model.Address.FaxRequired = _vendorSettings.AddressSettings.FaxRequired;+ model.Address.NoteEnabled = _vendorSettings.AddressSettings.NoteEnabled;+ model.Address.AddressTypeEnabled = false;++ //address+ model.Address.AvailableCountries.Add(new SelectListItem { Text = _translationService.GetResource("Admin.Address.SelectCountry"), Value = "" });+ foreach (var c in await _countryService.GetAllCountries(showHidden: true))+ model.Address.AvailableCountries.Add(new SelectListItem { Text = c.Name, Value = c.Id, Selected = vendor != null && c.Id == vendor.Address.CountryId });++ var states = !string.IsNullOrEmpty(model.Address.CountryId) ? (await _countryService.GetCountryById(model.Address.CountryId))?.StateProvinces : new List<StateProvince>();+ if (states?.Count > 0)+ {+ foreach (var s in states)+ model.Address.AvailableStates.Add(new SelectListItem { Text = s.Name, Value = s.Id, Selected = vendor != null && s.Id == vendor.Address.StateProvinceId });+ }+ }++ private async Task UpdateVendorModel(Domain.Vendors.Vendor vendor, VendorModel model)+ {+ vendor = model.ToEntity(vendor);+ vendor.Locales = await model.Locales.ToTranslationProperty(vendor, x => x.Name, _seoSettings, _slugService, _languageService);+ model.SeName = await vendor.ValidateSeName(model.SeName, vendor.Name, true, _seoSettings, _slugService, _languageService);+ vendor.Address = model.Address.ToEntity();+ vendor.SeName = model.SeName;++ await _vendorService.UpdateVendor(vendor);++ //search engine name+ await _slugService.SaveSlug(vendor, model.SeName, "");+ }++ #endregion++ #region Methods++ //edit+ public async Task<IActionResult> Edit()+ {+ if(!_vendorSettings.AllowVendorsToEditInfo)+ throw new Exception("Vendor can't edit info");++ var vendor = await _vendorService.GetVendorById(_workContext.CurrentVendor.Id);+ if (vendor == null || vendor.Deleted)+ throw new ArgumentNullException(nameof(vendor));++ var model = vendor.ToModel();++ //locales+ await AddLocales(_languageService, model.Locales, (locale, languageId) =>+ {+ locale.Name = vendor.GetTranslation(x => x.Name, languageId, false);+ locale.Description = vendor.GetTranslation(x => x.Description, languageId, false);+ locale.MetaKeywords = vendor.GetTranslation(x => x.MetaKeywords, languageId, false);+ locale.MetaDescription = vendor.GetTranslation(x => x.MetaDescription, languageId, false);+ locale.MetaTitle = vendor.GetTranslation(x => x.MetaTitle, languageId, false);+ locale.SeName = vendor.GetSeName(languageId, false);+ });++ //prepare address model+ await PrepareVendorAddressModel(model, vendor);++ return View(model);+ }++ [HttpPost]+ public async Task<IActionResult> Edit(VendorModel model)+ {+ if(!_vendorSettings.AllowVendorsToEditInfo)+ throw new Exception("Vendor can't edit info");++ var vendor = await _vendorService.GetVendorById(model.Id);+ if (vendor == null || vendor.Deleted || vendor.Id != _workContext.CurrentVendor.Id)+ throw new ArgumentNullException(nameof(vendor));++ if (ModelState.IsValid)+ {+ await UpdateVendorModel(vendor, model);++ Success(_translationService.GetResource("Vendor.Updated"));+ return RedirectToAction("Edit");+ }+ //If we got this far, something failed, redisplay form+ //prepare address model+ await PrepareVendorAddressModel(model, vendor);+ return View(model);+ }++ #endregion++ }+}diff --git a/src/Web/Grand.Web.Vendor/Extensions/VendorMappingExtensions.cs b/src/Web/Grand.Web.Vendor/Extensions/VendorMappingExtensions.csnew file mode 100644index 000000000..a78953e05--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Extensions/VendorMappingExtensions.cs@@ -0,0 +1,21 @@+using Grand.Infrastructure.Mapper;+using Grand.Web.Vendor.Models.Vendor;++namespace Grand.Web.Vendor.Extensions+{+ public static class VendorMappingExtensions+ {+ public static VendorModel ToModel(this Domain.Vendors.Vendor entity)+ {+ var vendor = entity.MapTo<Domain.Vendors.Vendor, VendorModel>();+ return vendor;++ }++ public static Domain.Vendors.Vendor ToEntity(this VendorModel model, Domain.Vendors.Vendor destination)+ {+ var product = model.MapTo(destination);+ return product;+ }+ }+}\ No newline at end of filediff --git a/src/Web/Grand.Web.Vendor/Mapper/VendorProfile.cs b/src/Web/Grand.Web.Vendor/Mapper/VendorProfile.csnew file mode 100644index 000000000..c8e4458be--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Mapper/VendorProfile.cs@@ -0,0 +1,37 @@+using AutoMapper;+using Grand.Business.Core.Extensions;+using Grand.Infrastructure.Mapper;+using Grand.Web.Vendor.Models.Vendor;++namespace Grand.Web.Vendor.Mapper+{+ public class VendorProfile : Profile, IAutoMapperProfile+ {+ public VendorProfile()+ {+ CreateMap<Domain.Vendors.Vendor, VendorModel>()+ .ForMember(dest => dest.Locales, mo => mo.Ignore())+ .ForMember(dest => dest.UserFields, mo => mo.Ignore())+ .ForMember(dest => dest.SeName, mo => mo.MapFrom(src => src.GetSeName("", true)));++ CreateMap<VendorModel, Domain.Vendors.Vendor>()+ .ForMember(dest => dest.Id, mo => mo.Ignore())+ .ForMember(dest => dest.Locales, mo => mo.Ignore())+ .ForMember(dest => dest.Coordinates, mo => mo.Ignore())+ .ForMember(dest => dest.Active, mo => mo.Ignore())+ .ForMember(dest => dest.Commission, mo => mo.Ignore())+ .ForMember(dest => dest.DisplayOrder, mo => mo.Ignore())+ .ForMember(dest => dest.AdminComment, mo => mo.Ignore())+ .ForMember(dest => dest.AppliedDiscounts, mo => mo.Ignore())+ .ForMember(dest => dest.PictureId, mo => mo.Ignore())+ .ForMember(dest => dest.VendorNotes, mo => mo.Ignore())+ .ForMember(dest => dest.NotApprovedRatingSum, mo => mo.Ignore())+ .ForMember(dest => dest.ApprovedRatingSum, mo => mo.Ignore())+ .ForMember(dest => dest.ApprovedTotalReviews, mo => mo.Ignore())+ .ForMember(dest => dest.NotApprovedTotalReviews, mo => mo.Ignore())+ .ForMember(dest => dest.AllowCustomerReviews, mo => mo.Ignore())+ .ForMember(dest => dest.Deleted, mo => mo.Ignore());+ }+ public int Order => 0;+ }+}\ No newline at end of filediff --git a/src/Web/Grand.Web.Vendor/Models/Vendor/VendorModel.cs b/src/Web/Grand.Web.Vendor/Models/Vendor/VendorModel.csnew file mode 100644index 000000000..e66c31735--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Models/Vendor/VendorModel.cs@@ -0,0 +1,87 @@+using Grand.Web.Common.Models;+using Grand.Infrastructure.ModelBinding;+using Grand.Infrastructure.Models;+using Grand.Web.Vendor.Models.Common;++namespace Grand.Web.Vendor.Models.Vendor+{+ public class VendorModel : BaseEntityModel, ILocalizedModel<VendorLocalizedModel>+ {+ public VendorModel()+ {+ Locales = new List<VendorLocalizedModel>();+ Address = new AddressModel();+ }++ [GrandResourceDisplayName("Vendor.Fields.Name")]++ public string Name { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.Email")]++ public string Email { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.Description")]++ public string Description { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.MetaKeywords")]++ public string MetaKeywords { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.MetaDescription")]++ public string MetaDescription { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.MetaTitle")]++ public string MetaTitle { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.SeName")]++ public string SeName { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.PageSize")]+ public int PageSize { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.AllowCustomersToSelectPageSize")]+ public bool AllowCustomersToSelectPageSize { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.PageSizeOptions")]+ public string PageSizeOptions { get; set; }++ public IList<VendorLocalizedModel> Locales { get; set; }++ public AddressModel Address { get; set; }++ }++ public class VendorLocalizedModel : ILocalizedModelLocal, ISlugModelLocal+ {+ public string LanguageId { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.Name")]++ public string Name { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.Description")]++ public string Description { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.MetaKeywords")]++ public string MetaKeywords { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.MetaDescription")]++ public string MetaDescription { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.MetaTitle")]++ public string MetaTitle { get; set; }++ [GrandResourceDisplayName("Vendor.Fields.SeName")]++ public string SeName { get; set; }+ }+}\ No newline at end of filediff --git a/src/Web/Grand.Web.Vendor/Validators/Common/AddressValidator.cs b/src/Web/Grand.Web.Vendor/Validators/Common/AddressValidator.csnew file mode 100644index 000000000..53f728d6d--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Validators/Common/AddressValidator.cs@@ -0,0 +1,73 @@+using FluentValidation;+using Grand.Infrastructure.Validators;+using Grand.Business.Core.Interfaces.Common.Localization;+using Grand.Web.Vendor.Models.Common;++namespace Grand.Web.Vendor.Validators.Common+{+ public class AddressValidator : BaseGrandValidator<AddressModel>+ {+ public AddressValidator(+ IEnumerable<IValidatorConsumer<AddressModel>> validators,+ ITranslationService translationService)+ : base(validators)+ {+ RuleFor(x => x.FirstName)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.FirstName.Required"))+ .When(x => x.FirstNameEnabled && x.FirstNameRequired);+ RuleFor(x => x.LastName)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.LastName.Required"))+ .When(x => x.LastNameEnabled && x.LastNameRequired);+ RuleFor(x => x.Email)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.Email.Required"))+ .When(x => x.EmailEnabled && x.EmailRequired);+ RuleFor(x => x.Email)+ .EmailAddress()+ .WithMessage(translationService.GetResource("Vendor.Common.WrongEmail"))+ .When(x => x.EmailEnabled && x.EmailRequired);+ RuleFor(x => x.Company)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.Company.Required"))+ .When(x => x.CompanyEnabled && x.CompanyRequired);+ RuleFor(x => x.VatNumber)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.VatNumber.Required"))+ .When(x => x.VatNumberEnabled && x.VatNumberRequired);+ RuleFor(x => x.CountryId)+ .NotNull()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.Country.Required"))+ .When(x => x.CountryEnabled);+ RuleFor(x => x.CountryId)+ .NotEqual("")+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.Country.Required"))+ .When(x => x.CountryEnabled);+ RuleFor(x => x.City)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.City.Required"))+ .When(x => x.CityEnabled && x.CityRequired);+ RuleFor(x => x.Address1)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.Address1.Required"))+ .When(x => x.StreetAddressEnabled && x.StreetAddressRequired);+ RuleFor(x => x.Address2)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.Address2.Required"))+ .When(x => x.StreetAddress2Enabled && x.StreetAddress2Required);+ RuleFor(x => x.ZipPostalCode)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.ZipPostalCode.Required"))+ .When(x => x.ZipPostalCodeEnabled && x.ZipPostalCodeRequired);+ RuleFor(x => x.PhoneNumber)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.PhoneNumber.Required"))+ .When(x => x.PhoneEnabled && x.PhoneRequired);+ RuleFor(x => x.FaxNumber)+ .NotEmpty()+ .WithMessage(translationService.GetResource("Vendor.Address.Fields.FaxNumber.Required"))+ .When(x => x.FaxEnabled && x.FaxRequired);+ }+ }+}\ No newline at end of filediff --git a/src/Web/Grand.Web.Vendor/Validators/Vendor/VendorValidator.cs b/src/Web/Grand.Web.Vendor/Validators/Vendor/VendorValidator.csnew file mode 100644index 000000000..127fcd302--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Validators/Vendor/VendorValidator.cs@@ -0,0 +1,24 @@+using FluentValidation;+using Grand.Infrastructure.Validators;+using Grand.Business.Core.Interfaces.Common.Localization;+using Grand.Web.Vendor.Models.Vendor;+using Grand.Web.Vendor.Validators.Common;++namespace Grand.Web.Vendor.Validators.Vendor+{+ public class VendorValidator : BaseGrandValidator<VendorModel>+ {+ public VendorValidator(+ IEnumerable<IValidatorConsumer<VendorModel>> validators,+ IEnumerable<IValidatorConsumer<Models.Common.AddressModel>> addressValidators,+ ITranslationService translationService)+ : base(validators)+ {+ RuleFor(x => x.Name).NotEmpty().WithMessage(translationService.GetResource("Vendor.Fields.Name.Required"));+ RuleFor(x => x.Email).NotEmpty().WithMessage(translationService.GetResource("Vendor.Fields.Email.Required"));+ RuleFor(x => x.Email).EmailAddress().WithMessage(translationService.GetResource("Vendor.Common.WrongEmail"));+ RuleFor(x => x.Address).SetValidator(new AddressValidator(addressValidators, translationService));++ }+ }+}\ No newline at end of filediff --git a/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml b/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xmlindex 860723ef0..f6c6b25d3 100644--- a/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml+++ b/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml@@ -15996,6 +15996,9 @@<Resource Name="Vendor.Address" Area="Front"><Value>Address</Value></Resource>+ <Resource Name="Vendor.Address.SelectState" Area="Vendor">+ <Value>Select state</Value>+ </Resource><Resource Name="Vendor.AccessDenied.Description" Area="Vendor"><Value>You do not have permission to perform the selected operation.</Value></Resource>@@ -17022,19 +17025,19 @@<Resource Name="Vendor.Catalog.Products.Reviews" Area="Vendor"><Value>Product Reviews</Value></Resource>- <Resource Name="admin.catalog.products.similarproducts" Area="Vendor">+ <Resource Name="Vendor.catalog.products.similarproducts" Area="Vendor"><Value>Similar products</Value></Resource>- <Resource Name="admin.catalog.products.similarproducts.addnew" Area="Vendor">+ <Resource Name="Vendor.catalog.products.similarproducts.addnew" Area="Vendor"><Value>Add new product</Value></Resource>- <Resource Name="admin.catalog.products.similarproducts.fields.displayorder" Area="Vendor">+ <Resource Name="Vendor.catalog.products.similarproducts.fields.displayorder" Area="Vendor"><Value>Display order</Value></Resource>- <Resource Name="admin.catalog.products.similarproducts.fields.product" Area="Vendor">+ <Resource Name="Vendor.catalog.products.similarproducts.fields.product" Area="Vendor"><Value>Products</Value></Resource>- <Resource Name="admin.catalog.products.similarproducts.savebeforeedit" Area="Vendor">+ <Resource Name="Vendor.catalog.products.similarproducts.savebeforeedit" Area="Vendor"><Value>You need to save the product before you can add similar products for this product page.</Value></Resource><Resource Name="vendor.catalog.products.similarproducts" Area="Admin">@@ -17202,9 +17205,15 @@<Resource Name="Vendor.Common.Update" Area="Vendor"><Value>Update</Value></Resource>+ <Resource Name="Vendor.Updated" Area="Vendor">+ <Value>The vendor data has been updated successfully</Value>+ </Resource><Resource Name="Vendor.Common.View" Area="Vendor"><Value>View</Value></Resource>+ <Resource Name="Vendor.Common.WrongEmail" Area="Vendor">+ <Value>Wrong email</Value>+ </Resource><Resource Name="Vendor.Configuration.Tax.Settings.TaxCategories.None" Area="Vendor"><Value>[None]</Value></Resource>@@ -17223,7 +17232,45 @@<Resource Name="Vendor.Dashboard.Summary" Area="Vendor"><Value>Summary</Value></Resource>-+ <Resource Name="Vendor.EditVendorDetails" Area="Vendor">+ <Value>Edit vendor data</Value>+ </Resource>+ <Resource Name="Vendor.Fields.AllowCustomersToSelectPageSize" Area="Vendor">+ <Value>Allow customers to select page size</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Description" Area="Vendor">+ <Value>Description</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Email" Area="Vendor">+ <Value>Vendor email</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Email.Required" Area="Vendor">+ <Value>Email is required</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Name" Area="Vendor">+ <Value>Vendor name</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Name.Required" Area="Vendor">+ <Value>Name is required</Value>+ </Resource>+ <Resource Name="Vendor.Fields.MetaDescription" Area="Vendor">+ <Value>Meta description</Value>+ </Resource>+ <Resource Name="Vendor.Fields.MetaKeywords" Area="Vendor">+ <Value>Meta keywords</Value>+ </Resource>+ <Resource Name="Vendor.Fields.MetaTitle" Area="Vendor">+ <Value>Meta title</Value>+ </Resource>+ <Resource Name="Vendor.Fields.PageSize" Area="Vendor">+ <Value>Page size</Value>+ </Resource>+ <Resource Name="Vendor.Fields.PageSizeOptions" Area="Vendor">+ <Value>Page size options</Value>+ </Resource>+ <Resource Name="Vendor.Fields.SeName" Area="Vendor">+ <Value>SeName</Value>+ </Resource><Resource Name="Vendor.Header.Community" Area="Vendor"><Value>Community</Value></Resource>diff --git a/src/Web/Grand.Web/App_Data/Resources/Upgrade/en_220.xml b/src/Web/Grand.Web/App_Data/Resources/Upgrade/en_220.xmlindex 79e6084d9..0c36a586a 100644--- a/src/Web/Grand.Web/App_Data/Resources/Upgrade/en_220.xml+++ b/src/Web/Grand.Web/App_Data/Resources/Upgrade/en_220.xml@@ -2029,4 +2029,54 @@<Resource Name="Vendor.Reports.NeverSold.StartDate" Area="Vendor"><Value>Start date</Value></Resource>++ <Resource Name="Vendor.Common.WrongEmail" Area="Vendor">+ <Value>Wrong email</Value>+ </Resource>+ <Resource Name="vendor.editvendordetails" Area="Vendor">+ <Value>Edit vendor data</Value>+ </Resource>+ <Resource Name="Vendor.Updated" Area="Vendor">+ <Value>The vendor data has been updated successfully</Value>+ </Resource>+ <Resource Name="Vendor.Fields.AllowCustomersToSelectPageSize" Area="Vendor">+ <Value>Allow customers to select page size</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Description" Area="Vendor">+ <Value>Description</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Email" Area="Vendor">+ <Value>Vendor email</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Email.Required" Area="Vendor">+ <Value>Email is required</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Name" Area="Vendor">+ <Value>Vendor name</Value>+ </Resource>+ <Resource Name="Vendor.Fields.Name.Required" Area="Vendor">+ <Value>Name is required</Value>+ </Resource>+ <Resource Name="Vendor.Fields.MetaDescription" Area="Vendor">+ <Value>Meta description</Value>+ </Resource>+ <Resource Name="Vendor.Fields.MetaKeywords" Area="Vendor">+ <Value>Meta keywords</Value>+ </Resource>+ <Resource Name="Vendor.Fields.MetaTitle" Area="Vendor">+ <Value>Meta title</Value>+ </Resource>+ <Resource Name="Vendor.Fields.PageSize" Area="Vendor">+ <Value>Page size</Value>+ </Resource>+ <Resource Name="Vendor.Fields.PageSizeOptions" Area="Vendor">+ <Value>Page size options</Value>+ </Resource>+ <Resource Name="Vendor.Address.SelectState" Area="Vendor">+ <Value>Select state</Value>+ </Resource>+ <Resource Name="Vendor.Fields.SeName" Area="Vendor">+ <Value>SeName</Value>+ </Resource>+</Language>\ No newline at end of file