From 3c66b7a2a10520b4395f515ceef56119f2043ccb Mon Sep 17 00:00:00 2001 From: Balachandra Date: Fri, 10 Dec 2021 09:07:57 +0530 Subject: [PATCH 1/5] Widget slider is showing other stores images #193 --- .../Grand.Business.Common/Services/Security/AclService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Business/Grand.Business.Common/Services/Security/AclService.cs b/src/Business/Grand.Business.Common/Services/Security/AclService.cs index 35fcf110f..c2942f676 100644 --- a/src/Business/Grand.Business.Common/Services/Security/AclService.cs +++ b/src/Business/Grand.Business.Common/Services/Security/AclService.cs @@ -77,7 +77,9 @@ public virtual bool Authorize(T entity, string storeId) where T : BaseEntity, if (CommonHelper.IgnoreStoreLimitations) return true; - if (!entity.LimitedToStores) + //LimitedToStores flag will be false by default even after setting Limited To store value, so validate if entity consists of stores value for safer side + + if (!entity.LimitedToStores & entity.Stores.Count <= 0) return true; foreach (var storeIdWithAccess in entity.Stores) From ab6d31e906b584483cbf9c3876ab32674060a558 Mon Sep 17 00:00:00 2001 From: Sneha Mathew Date: Sat, 11 Dec 2021 08:36:02 -0500 Subject: [PATCH 2/5] Revert "Widget slider is showing other stores images #193" This reverts commit 3c66b7a2a10520b4395f515ceef56119f2043ccb. --- .../Grand.Business.Common/Services/Security/AclService.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Business/Grand.Business.Common/Services/Security/AclService.cs b/src/Business/Grand.Business.Common/Services/Security/AclService.cs index c2942f676..35fcf110f 100644 --- a/src/Business/Grand.Business.Common/Services/Security/AclService.cs +++ b/src/Business/Grand.Business.Common/Services/Security/AclService.cs @@ -77,9 +77,7 @@ public virtual bool Authorize(T entity, string storeId) where T : BaseEntity, if (CommonHelper.IgnoreStoreLimitations) return true; - //LimitedToStores flag will be false by default even after setting Limited To store value, so validate if entity consists of stores value for safer side - - if (!entity.LimitedToStores & entity.Stores.Count <= 0) + if (!entity.LimitedToStores) return true; foreach (var storeIdWithAccess in entity.Stores) From 75f1f9d31450bfb9643415003646b667b016a5db Mon Sep 17 00:00:00 2001 From: Sneha Mathew Date: Sat, 11 Dec 2021 08:37:26 -0500 Subject: [PATCH 3/5] Corrected null check --- .../Grand.Business.Common/Extensions/TranslateExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Business/Grand.Business.Common/Extensions/TranslateExtensions.cs b/src/Business/Grand.Business.Common/Extensions/TranslateExtensions.cs index 343dd9890..f69194b66 100644 --- a/src/Business/Grand.Business.Common/Extensions/TranslateExtensions.cs +++ b/src/Business/Grand.Business.Common/Extensions/TranslateExtensions.cs @@ -273,7 +273,7 @@ public static async Task AddOrUpdatePluginTranslateResource(this BasePlugin plug throw new ArgumentNullException(nameof(translationService)); if (languageService == null) throw new ArgumentNullException(nameof(languageService)); - if (string.IsNullOrEmpty(name)) + if (!string.IsNullOrEmpty(name)) name = name.ToLowerInvariant(); foreach (var lang in await languageService.GetAllLanguages(true)) { From 902badc45e2c487a960fb2cc54ce98b8201d524e Mon Sep 17 00:00:00 2001 From: eliyas Date: Wed, 31 Aug 2022 16:39:20 +0530 Subject: [PATCH 4/5] state name added to pickup point address --- .../Checkout/_ShippingAddressPickupInStore.cshtml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Web/Grand.Web/Views/Checkout/_ShippingAddressPickupInStore.cshtml b/src/Web/Grand.Web/Views/Checkout/_ShippingAddressPickupInStore.cshtml index 7d76e17c2..cbf72cd49 100644 --- a/src/Web/Grand.Web/Views/Checkout/_ShippingAddressPickupInStore.cshtml +++ b/src/Web/Grand.Web/Views/Checkout/_ShippingAddressPickupInStore.cshtml @@ -1,5 +1,7 @@ @model CheckoutShippingAddressModel @using System.Text +@using Grand.Business.Core.Interfaces.Common.Directory +@inject ICountryService _countryService @if (Model.AllowPickUpInStore && !Model.PickUpInStoreOnly && Model.PickupPoints.Any()) { @@ -32,11 +34,13 @@ @if (Model.PickupPoints.Count == 1) { var point = Model.PickupPoints.First(); + var pickupPointStateProvince = (await _countryService.GetStateProvincesByCountryId(point.Address.CountryId))?.Where(x => x.Id == point.Address.StateProvinceId).FirstOrDefault().Name; + @Html.Hidden("pickup-point-id", point.Id)
  • @point.Name
  • -
  • @(string.Format("{0} {1} {2}", point.Address.City, point.Address.ZipPostalCode, point.Address.Address1))
  • +
  • @(string.Format("{0} {1} {2} {3}",pickupPointStateProvince, point.Address.City, point.Address.ZipPostalCode, point.Address.Address1))
  • @if (!string.IsNullOrEmpty(point.PickupFee)) {
  • @point.PickupFee
  • @@ -52,6 +56,11 @@ { var addressLine = new StringBuilder(); addressLine.Append(point.Name); + if(!string.IsNullOrEmpty(point.Address.StateProvinceId)) + { + var pickupPointStateProvince = (await _countryService.GetStateProvincesByCountryId(point.Address.CountryId))?.Where(x => x.Id == point.Address.StateProvinceId).FirstOrDefault().Name; + addressLine.AppendFormat(", {0}", pickupPointStateProvince); + } if (!string.IsNullOrEmpty(point.Address.City)) { addressLine.AppendFormat(", {0}", point.Address.City); From 04faf0d847e4d02b62de92b95490674bf93a2374 Mon Sep 17 00:00:00 2001 From: eliyas Date: Wed, 31 Aug 2022 17:18:00 +0530 Subject: [PATCH 5/5] widget zone added --- src/Web/Grand.Web/Views/Checkout/_ReviewData.cshtml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Web/Grand.Web/Views/Checkout/_ReviewData.cshtml b/src/Web/Grand.Web/Views/Checkout/_ReviewData.cshtml index 48702a6f8..118a66f92 100644 --- a/src/Web/Grand.Web/Views/Checkout/_ReviewData.cshtml +++ b/src/Web/Grand.Web/Views/Checkout/_ReviewData.cshtml @@ -62,6 +62,7 @@ + @await Component.InvokeAsync("Widget", new { widgetZone = "confirm_payment_bottom" })
@@ -136,6 +137,7 @@ {{vmorder.OrderReviewData.PickupAddress.CountryName}} + @await Component.InvokeAsync("Widget", new { widgetZone = "confirm_pickupaddress_bottom" })
  • @Loc["Order.Shipping"]