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 - Widget slider is showing other stores images #193

KrzysztofPajak20eb42085993
diff --git a/src/Plugins/Widgets.Slider/Infrastructure/Mapper/SliderMapperConfiguration.cs b/src/Plugins/Widgets.Slider/Infrastructure/Mapper/SliderMapperConfiguration.cs
index 6377d8036..2ea73a6f1 100644
--- a/src/Plugins/Widgets.Slider/Infrastructure/Mapper/SliderMapperConfiguration.cs
+++ b/src/Plugins/Widgets.Slider/Infrastructure/Mapper/SliderMapperConfiguration.cs
@@ -1,5 +1,6 @@
using AutoMapper;
using Grand.Infrastructure.Mapper;
+using System.Linq;
using Widgets.Slider.Domain;
using Widgets.Slider.Models;
@@ -50,6 +51,7 @@ namespace Widgets.Slider.Infrastructure.Mapper
{
CreateMap<SlideModel, PictureSlider>()
.ForMember(dest => dest.ObjectEntry, mo => mo.MapFrom(x => SetObjectEntry(x)))
+ .ForMember(dest => dest.LimitedToStores, mo => mo.MapFrom(x => x.Stores != null && x.Stores.Any()))
.ForMember(dest => dest.Locales, mo => mo.Ignore());
CreateMap<PictureSlider, SlideModel>()
diff --git a/src/Plugins/Widgets.Slider/Manifest.cs b/src/Plugins/Widgets.Slider/Manifest.cs
index 76d7b3656..3bc4f79b2 100644
--- a/src/Plugins/Widgets.Slider/Manifest.cs
+++ b/src/Plugins/Widgets.Slider/Manifest.cs
@@ -8,5 +8,5 @@ using Widgets.Slider;
SystemName = SliderWidgetDefaults.ProviderSystemName,
SupportedVersion = GrandVersion.SupportedPluginVersion,
Author = "grandnode team",
- Version = "1.00"
+ Version = "1.01"
)]
\ No newline at end of file