Skip to content

Commit

Permalink
PT-13757: read CreateAnonymousOrderEnabled store settings (#656)
Browse files Browse the repository at this point in the history
feat: read CreateAnonymousOrderEnabled store settings (#656)
  • Loading branch information
ksavosteev authored Oct 12, 2023
1 parent 3bec060 commit 5f1d2fb
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 5f1d2fb

Please sign in to comment.