Hi there,
I have got the following code - it is working perfectly. It either tells me "how much left to spend to get my voucher" based on whats in my cart, and the loyalty points I have already. OR it tells me I have got my voucher and tells me the great news
I need to add an additional IF statement above this that states "If" <LOYALTYSPEND> is 0, blank or not found (ie the customer is not logged in), then show me the following statement "You are only £167 away from your next £5 G-Cash Voucher." and then if none of those conditions are not true - continue onto the next IF statement which works as it shoudl already... any ideas?
&lt;script language="javascript" type="text/javascript"&gt; shiptotal= "&lt;LOYALTYSPEND&gt;";carttotal = "&lt;NLCARTGRANDTOTAL&gt;"; carttotal = carttotal.slice(1,carttotal.length); carttotal = carttotal.replace(",",""); carttotal = parseFloat(carttotal); if ( carttotal &lt;shiptotal) {difference = shiptotal - carttotal; difference = (0.01+difference).toFixed(2); shipoutput = "You are only £" + difference + " away from your next £5 G-Cash Voucher. ";}else{shipoutput = "Great News! This Order will trigger your next £5 G-Cash Voucher. ";}shipoutput=shipoutput+"";document.write(shipoutput); Any help greatly appreciated