The site I'm working on requires that if the total amount is less than 399 then a delivery fee of 100 is to be charged. However I put:
//<![CDATA[
simpleCart({
if(total<399){shippingFlatRate: 100;}
});
//]]>
the main function has the total amount and that works and flat rate is set on, but when I use this if statement it stays on 0 and doesn't become 100.
If you are trying to set the property of an object then your syntax is wrong. Try this:
shippingFlatRate: total < 399 ? 100 : 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With