BarneyJoe Posted October 29, 2007 Share Posted October 29, 2007 Hopefully this is an easy syntax one I just can't quite get. Basically have a shopping cart, and need to change it from free postage to free postage if the customer spends £25 or more. At the moment I have a TotalPrice line of : <?php echo WA_eCart_DisplayMoney($WA_eCart1, $WA_eCart1->TotalColumn("TotalPrice")); ?> And a GrandTotal line of : <?php echo WA_eCart_DisplayMoney($WA_eCart1, $WA_eCart1->GrandTotal()); ?> So I think I need to change the GrandTotal line to an if.. else.. statement along the lines of : <?php if (WA_eCart_DisplayMoney($WA_eCart1, $WA_eCart1->TotalColumn("TotalPrice"))< 25.00) echo WA_eCart_DisplayMoney($WA_eCart1, $WA_eCart1->GrandTotal()+2.50); else echo WA_eCart_DisplayMoney($WA_eCart1, $WA_eCart1->GrandTotal()); ?> ie if the TotalPrice is less than £25 add £2.50 onto the GrandTotal, otherwise don't. But it's not quite right - any help much appreciated. Cheers. Link to comment https://forums.phpfreaks.com/topic/75247-setting-the-postage-dependent-on-total-spent-if-else/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.