diff --git a/Directory.Build.props b/Directory.Build.props index 3fe73a98..1a72b9ab 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 3.412.0 + 3.413.0 $(VersionSuffix)-$(BuildNumber) diff --git a/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj b/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj index c39d4629..f5917ef9 100644 --- a/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj +++ b/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs index abebf3d4..cb0ecfc5 100644 --- a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs +++ b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs @@ -55,7 +55,7 @@ protected virtual CustomerOrder ConvertCartToOrder(ShoppingCart cart) // Copy LineItems if (cart.Items != null) { - order.Items = ToOrderModel(cart.Items, cartLineItemsMap); + order.Items = ToOrderModel(cart.Items.Where(x => x.SelectedForCheckout).ToList(), cartLineItemsMap); } // Copy Discounts diff --git a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderService.cs b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderService.cs index ba862e03..9dc0a9b6 100644 --- a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderService.cs +++ b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderService.cs @@ -235,7 +235,12 @@ protected virtual async Task EnsureThatAllOperationsHaveNumber(CustomerOrder ord var numberTemplate = opType + "{0:yyMMdd}-{1:D5}"; if (store != null) { - numberTemplate = store.Settings.GetSettingValue("Order." + objectTypeName + "NewNumberTemplate", numberTemplate); + var descriptor = new SettingDescriptor + { + Name = "Order." + objectTypeName + "NewNumberTemplate", + DefaultValue = numberTemplate, + }; + numberTemplate = store.Settings.GetValue(descriptor); } operation.Number = _uniqueNumberGenerator.GenerateNumber(numberTemplate); diff --git a/src/VirtoCommerce.OrdersModule.Web/Controllers/Api/OrderModuleController.cs b/src/VirtoCommerce.OrdersModule.Web/Controllers/Api/OrderModuleController.cs index cc02f643..d8e5f864 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Controllers/Api/OrderModuleController.cs +++ b/src/VirtoCommerce.OrdersModule.Web/Controllers/Api/OrderModuleController.cs @@ -414,9 +414,7 @@ public async Task> GetNewShipment(string id) retVal.Status = "New"; var store = await _storeService.GetNoCloneAsync(order.StoreId, StoreResponseGroup.StoreInfo.ToString()); - var numberTemplate = store.Settings.GetSettingValue( - ModuleConstants.Settings.General.OrderShipmentNewNumberTemplate.Name, - ModuleConstants.Settings.General.OrderShipmentNewNumberTemplate.DefaultValue); + var numberTemplate = store.Settings.GetValue(ModuleConstants.Settings.General.OrderShipmentNewNumberTemplate); retVal.Number = _uniqueNumberGenerator.GenerateNumber(numberTemplate.ToString()); return Ok(retVal); @@ -453,9 +451,7 @@ public async Task> GetNewPayment(string id) retVal.Status = retVal.PaymentStatus.ToString(); var store = await _storeService.GetNoCloneAsync(order.StoreId, StoreResponseGroup.StoreInfo.ToString()); - var numberTemplate = store.Settings.GetSettingValue( - ModuleConstants.Settings.General.OrderPaymentInNewNumberTemplate.Name, - ModuleConstants.Settings.General.OrderPaymentInNewNumberTemplate.DefaultValue); + var numberTemplate = store.Settings.GetValue(ModuleConstants.Settings.General.OrderPaymentInNewNumberTemplate); retVal.Number = _uniqueNumberGenerator.GenerateNumber(numberTemplate.ToString()); return Ok(retVal); } diff --git a/src/VirtoCommerce.OrdersModule.Web/module.manifest b/src/VirtoCommerce.OrdersModule.Web/module.manifest index a9f413b6..a1dd9984 100644 --- a/src/VirtoCommerce.OrdersModule.Web/module.manifest +++ b/src/VirtoCommerce.OrdersModule.Web/module.manifest @@ -1,11 +1,11 @@ VirtoCommerce.Orders - 3.412.0 + 3.413.0 3.413.0 - +