Skip to content

Commit

Permalink
feat: add CreateAnonymousOrder store setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ksavosteev committed Oct 3, 2023
1 parent d0dfb7d commit cd12fff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/VirtoCommerce.OrdersModule.Core/ModuleConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ public static class General
DefaultValue = false,
};

public static SettingDescriptor CreateAnonymousOrder { get; } = new SettingDescriptor
{
Name = "Order.CreateAnonymousOrder.Enable",
ValueType = SettingValueType.Boolean,
GroupName = "Orders|General",
DefaultValue = true
};

public static IEnumerable<SettingDescriptor> AllSettings
{
get
Expand All @@ -264,6 +272,7 @@ public static IEnumerable<SettingDescriptor> AllSettings
yield return CustomerOrderValidation;
yield return OrderPaidAndOrderSentNotifications;
yield return PaymentShipmentStatusChangedNotifications;
yield return CreateAnonymousOrder;
}
}
}
Expand All @@ -276,6 +285,7 @@ public static IEnumerable<SettingDescriptor> StoreLevelSettings
yield return General.OrderPaymentInNewNumberTemplate;
yield return General.OrderShipmentNewNumberTemplate;
yield return General.RefundNewNumberTemplate;
yield return General.CreateAnonymousOrder;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@
"description": "Incoming payment statuses",
"title": "Payment statuses"
},
"Refund.Status": {
"title": "Refund statuses",
"description": "Refund statuses"
},
"Order.CustomerOrderNewNumberTemplate": {
"description": "This template will be used to generate the ID for a new Customer Order. Parameters: 0: Date and time (UTC) the ID was generated at, 1: Order ID",
"title": "Order ID template"
Expand All @@ -448,6 +452,10 @@
"description": "This template will be used to generate the ID for a new incoming Payment. Parameters: 0: Date and time (UTC) the ID was generated at, 1: Order ID",
"title": "Order payment ID template"
},
"Order.RefundNewNumberTemplate": {
"description": "This template will be used to generate the ID for a new order Refund. Parameters: 0: Date and time (UTC) the ID was generated at, 1: Order ID",
"title": "Order refund ID template"
},
"Order.SendOrderNotifications": {
"description": "Sends a notification when the order status changes",
"title": "Enable notifications for orders"
Expand Down Expand Up @@ -479,6 +487,10 @@
"Order.PaymentShipmentStatusChangedNotifications.Enable": {
"title": "Use payments/shipments status changed notifications",
"description": "Use for payments/shipments status change notifications"
},
"Order.CreateAnonymousOrder.Enable": {
"title": "Allow anonymous users to create orders",
"description": "This setting is store level."
}
},
"module": {
Expand Down

0 comments on commit cd12fff

Please sign in to comment.