Skip to content

Commit

Permalink
feat: read CreateAnonymousOrderEnabled store settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ksavosteev committed Oct 5, 2023
1 parent 3bec060 commit a0dd841
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions VirtoCommerce.Storefront.Model/Stores/Store.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ public string Host

public bool EmailVerificationEnabled { get; set; }

public bool CreateAnonymousOrderEnabled { get; set; }

public decimal FixedTaxRate { get; set; }

public string CartValidationRuleSet { get; set; }
Expand Down
1 change: 1 addition & 0 deletions VirtoCommerce.Storefront/Domain/Stores/StoreConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public static Store ToStore(this storeDto.Store storeDto)
result.AnonymousUsersAllowed = result.Settings.GetSettingValue("Stores.AllowAnonymousUsers", true);
result.IsSpa = result.Settings.GetSettingValue("Stores.IsSpa", false);
result.EmailVerificationEnabled = result.Settings.GetSettingValue("Stores.EmailVerificationEnabled", false);
result.CreateAnonymousOrderEnabled = result.Settings.GetSettingValue("XOrder.CreateAnonymousOrderEnabled", true);

result.CartValidationRuleSet = result.Settings.GetSettingValue<string>("Stores.CartValidationRuleSet", null);
if (string.IsNullOrEmpty(result.CartValidationRuleSet))
Expand Down

0 comments on commit a0dd841

Please sign in to comment.