0) {
ListOfContents+= "| "
+ quant + " × " + names[i] + ""
+ " | £" + num2cash(quant*prices[i]) +" | [X] |
";
}
if (quant != sessQt[i]) {
//Add item to belt
ajax("additemtobelt&id=" + id + "&quantity=" + quant);
sessQt[i] = quant;
}
//Product boxes
if (document.getElementById("currentBox_" + items[i])) document.getElementById("currentBox_" + items[i]).innerHTML=(quant>0)?quant:"0";
}
//Postage and packing
var PnP = "" + ((orderValue<15)?" + £2.99 P&P
Free postage for orders over £15":"Free P&P") + "
";
if (discounts > 0 && false) {// discounts are disabled.
PnP += "
Including £" + num2cash(discounts * discountAmount) + " discount";
setSaving(discounts * discountAmount);
} else discounts = 0;
//Display contents to user
if (orderValue == 0) {
document.getElementById("BasketContents").innerHTML = emptyMessage;
if (document.getElementById("payExpl")) document.getElementById("payExpl").style.display = 'none';
} else {
if (document.getElementById("payExpl")) document.getElementById("payExpl").style.display = 'block';
document.getElementById("BasketContents").innerHTML = ListOfContents
+ "Total: £"
+ num2cash(orderValue - (discounts * discountAmount))
+ " "
+ PnP
+ " |
"
+ "
";
}
}
function setSaving(saving) {
ajax("setsaving&saving="+saving);
}