Skip to content

Commit 2240bab

Browse files
committed
GMC feed configuration validator was inactive
1 parent 1eb6dd9 commit 2240bab

5 files changed

Lines changed: 9 additions & 11 deletions

File tree

src/Plugins/SmartStore.GoogleMerchantCenter/Localization/resources.de-de.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
<Value>Nur online zu kaufen</Value>
231231
</LocaleResource>
232232
<LocaleResource Name="OnlineOnly.Hint">
233-
<Value>Aktivieren Sie diese Option, wenn Produkte nur online erworben werden können. Aktivieren Sie diese Option nihct, falls Produkte auch in Ihrem Ladengeschäft erhältlich sind.</Value>
233+
<Value>Aktivieren Sie diese Option, wenn Produkte nur online erworben werden können. Aktivieren Sie diese Option nicht, falls Produkte auch in Ihrem Ladengeschäft erhältlich sind.</Value>
234234
</LocaleResource>
235235
<LocaleResource Name="DescriptionToPlainText">
236236
<Value>HTML entfernen</Value>
@@ -272,7 +272,7 @@
272272
<Value>Anzahl der Tage, nach dem die Artikel verfallen bzw. nicht mehr angezeigt werden sollen. Der Wert 0 bewirkt, dass kein Verfallsdatum exportiert wird.</Value>
273273
</LocaleResource>
274274
<LocaleResource Name="ExpirationDays.Validate">
275-
<Value>Der Wert muss zwischen 1 und 29 Tagen liegen.</Value>
275+
<Value>Der Wert muss zwischen 0 und 29 Tagen liegen.</Value>
276276
</LocaleResource>
277277
<LocaleResource Name="ExportShipping">
278278
<Value>Versanddaten exportieren</Value>

src/Plugins/SmartStore.GoogleMerchantCenter/Localization/resources.en-us.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
<Value>Number of days after products should expire or no longer appear. A value of 0 causes that no expiry date will be exported.</Value>
273273
</LocaleResource>
274274
<LocaleResource Name="ExpirationDays.Validate">
275-
<Value>The value must be between 1 and 29 days.</Value>
275+
<Value>The value must be between 0 and 29 days.</Value>
276276
</LocaleResource>
277277
<LocaleResource Name="ExportShipping">
278278
<Value>Export shipping data</Value>

src/Plugins/SmartStore.GoogleMerchantCenter/Models/FeedFroogleModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
using Newtonsoft.Json;
88
using SmartStore.Web.Framework.Plugins;
99
using SmartStore.Core.Domain.Catalog;
10+
using FluentValidation.Attributes;
11+
using SmartStore.GoogleMerchantCenter.Validators;
1012

1113
namespace SmartStore.GoogleMerchantCenter.Models
1214
{
15+
[Validator(typeof(ConfigurationValidator))]
1316
public class FeedFroogleModel : PromotionFeedConfigModel
1417
{
1518
public string GridEditUrl { get; set; }

src/Plugins/SmartStore.GoogleMerchantCenter/Validators/ConfigurationValidator.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
using FluentValidation;
1+
using FluentValidation;
72
using SmartStore.GoogleMerchantCenter.Models;
83
using SmartStore.Services.Localization;
94

@@ -13,7 +8,7 @@ public class ConfigurationValidator : AbstractValidator<FeedFroogleModel>
138
{
149
public ConfigurationValidator(ILocalizationService localize)
1510
{
16-
RuleFor(x => x.ExpirationDays).InclusiveBetween(1, 29)
11+
RuleFor(x => x.ExpirationDays).InclusiveBetween(0, 29)
1712
.WithMessage(localize.GetResource("Plugins.Feed.Froogle.ExpirationDays.Validate"));
1813
}
1914
}

src/Plugins/SmartStore.GoogleMerchantCenter/Views/FeedFroogle/Configure.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
$('#pnlGenerateStaticFileEachMinutes').toggle($('#@Html.FieldIdFor(m => m.TaskEnabled)').is(':checked'));
3838
}
3939
</script>
40-
40+
4141
<form method="POST" action="@Url.Action("ConfigurePlugin", "Plugin", new { area = "Admin", systemName = Model.Helper.SystemName })" novalidate="novalidate">
4242
<table class="adminContent">
4343
<tr>

0 commit comments

Comments
 (0)