From a87bfee3401f8b89e1384c4ca6d375c98b405ac4 Mon Sep 17 00:00:00 2001 From: "Amir.H Khademi" Date: Tue, 11 Feb 2025 14:22:42 +0330 Subject: [PATCH] free shiping --- .../OrderHandlers/CalculateOrderCommandHandler.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Netina.Core/EntityServices/OrderHandlers/CalculateOrderCommandHandler.cs b/Netina.Core/EntityServices/OrderHandlers/CalculateOrderCommandHandler.cs index c1a221a..247f3b6 100644 --- a/Netina.Core/EntityServices/OrderHandlers/CalculateOrderCommandHandler.cs +++ b/Netina.Core/EntityServices/OrderHandlers/CalculateOrderCommandHandler.cs @@ -34,10 +34,11 @@ public class CalculateOrderCommandHandler(IRepositoryWrapper repositoryWrapper, { order.RemoveDiscount(); } - + + if (totalProductPrice > 5000000) + deliveryPrice = 0; var taxesPrice = (((totalProductPrice - (discountCodePrice + productDiscountPrice)) + totalPackingPrice + servicePrice) / 100) * taxesFee; - order.SetTotalPrice(totalProductPrice, totalPackingPrice, servicePrice, deliveryPrice, productDiscountPrice, discountCodePrice, taxesPrice); order.OrderProducts.Clear(); order.OrderDelivery = null;