Help with coding

  User-59759458-FF65-46CA-83A5F579241102C4 22:06 31 May 2006
Locked

Hi I need some php coding for a shop I am constructing and I need some help. Below is what I need code for to calculate a final price. Can anyone help? Cheers

Orders of £60 and over £3.50

  silverous 22:44 31 May 2006

not sure what you want - this isn't clear to me... is this the complete request?

What happens to orders of £60 and over?

  beynac 10:09 01 Jun 2006

If my assumptions are correct, this should work. You would, of course, have to format the result but I have omitted that for clarity.

Code (within the php tags):
// Assume orders over £60 charged £3.50 ($ChargeOver) and under £60 charged zero ($ChargeUnder)
$ChargeOver = 3.5;
$ChargeUnder = 0;
if ($Order <= 60) {
$FinalPrice = ($Order + $ChargeUnder);
} else {
$FinalPrice = ($Order + $ChargeOver);
}

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Converse's new logo: the trainer brand looks to its heritage for a fresh identity

Mac power user tips and hidden tricks

Comment lancer Windows 10 en mode sans échec ?