Skip to content

Commit cce10e4

Browse files
Set catalogsettings.showsharebutton to false as its not compliant with GDPR
1 parent 15488fa commit cce10e4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Release Notes
1+
# Release Notes
22

33
## SmartStore.NET 3.1.5
44
### New Features
@@ -16,6 +16,7 @@
1616
* Moved StoreLastIpAddress & DisplayPrivacyAgreementOnContactUs from customer settings to privacy settings tab
1717
* #1450 Show the regular price only if it's higher than the final price
1818
* #1450 Do not ignore discounts with a negative amount
19+
* Set catalogsettings.showsharebutton to false as its not compliant with GDPR
1920

2021
### Bugfixes
2122
* Migration: take all same-named message templates into account

src/Libraries/SmartStore.Data/Migrations/MigrationsConfiguration.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Core.Domain.Configuration;
1111
using SmartStore.Core.Domain.Customers;
1212
using SmartStore.Core.Domain.Seo;
13+
using SmartStore.Core.Domain.Catalog;
1314

1415
public sealed class MigrationsConfiguration : DbMigrationsConfiguration<SmartObjectContext>
1516
{
@@ -47,6 +48,13 @@ public void MigrateSettings(SmartObjectContext context)
4748
var displayPrivacyAgreementOnContactUs = settings.FirstOrDefault(x => x.Name == "CustomerSettings.DisplayPrivacyAgreementOnContactUs");
4849
if (displayPrivacyAgreementOnContactUs != null) settings.Remove(displayPrivacyAgreementOnContactUs);
4950

51+
52+
var showShareButtonName = TypeHelper.NameOf<CatalogSettings>(y => y.ShowShareButton, true);
53+
var showShareButtonSetting = context.Set<Setting>().FirstOrDefault(x => x.Name == showShareButtonName);
54+
if (showShareButtonSetting != null)
55+
{
56+
showShareButtonSetting.Value = "False";
57+
}
5058
}
5159

5260
public void MigrateLocaleResources(LocaleResourcesBuilder builder)

0 commit comments

Comments
 (0)