I am trying to figure out how to apply "Shipping charges are $3.99 for the first item and $.99 for each additional item" in my Cart View.
Right now I have
@{
double itemTotal = 0;
double subTotal = 0;
int totalQty = 0;
double discount = 0.8;
double shippingBase = 3.99;
double shippingItem = 0.99;
double totalShipping = 0;
}
@foreach (var item in Model)
{
double price = (double)item.price / 100 * discount;
itemTotal = @item.qty * price;
subTotal += itemTotal;
totalQty += @item.qty;
I am not sure how to approach this. Would I use a foreach loop to count the total quantitys and if the quantity is greater that one it would add 3.99+99???