free shiping

master
Amir Hossein Khademi 2025-02-11 14:22:42 +03:30
parent 559ab04d9b
commit a87bfee340
1 changed files with 3 additions and 2 deletions

View File

@ -34,10 +34,11 @@ public class CalculateOrderCommandHandler(IRepositoryWrapper repositoryWrapper,
{ {
order.RemoveDiscount(); order.RemoveDiscount();
} }
if (totalProductPrice > 5000000)
deliveryPrice = 0;
var taxesPrice = (((totalProductPrice - (discountCodePrice + productDiscountPrice)) + totalPackingPrice + servicePrice) / 100) * taxesFee; var taxesPrice = (((totalProductPrice - (discountCodePrice + productDiscountPrice)) + totalPackingPrice + servicePrice) / 100) * taxesFee;
order.SetTotalPrice(totalProductPrice, totalPackingPrice, servicePrice, deliveryPrice, productDiscountPrice, discountCodePrice, taxesPrice); order.SetTotalPrice(totalProductPrice, totalPackingPrice, servicePrice, deliveryPrice, productDiscountPrice, discountCodePrice, taxesPrice);
order.OrderProducts.Clear(); order.OrderProducts.Clear();
order.OrderDelivery = null; order.OrderDelivery = null;