Re: 2D array by POST
[email protected] (Liz Tuddenham) Fri, 19 May 2023 20:38:03 +0100
| Newsgroups | comp.lang.php |
|---|---|
| Organization | Poppy Records |
| Message-ID | <1qazulp.cmhlm71x8dryN%[email protected]> |
J.O. Aho <[email protected]> wrote: [...] > Yeah, I tend to favor to take prices from the database each time, this > more to keep the prices up to date, as then if someone changes a price > on a product that price change will get trough at once on all orders > that are not finalized. Unfortunately that could lead to an illegal situation in the UK. The price has to be the one the user agreed to at the instant of clicking the button. If the database has been updated between there and the checkout, the original price must still be charged. (An unlikely scenario, but one with potentially very damaging consequences.) The agreed-to price is carried through the transaction by a cookie, the small risk of tampering (and the low value of the goods) make this an acceptable risk. The final account is e-mailed to the dispatcher, so any price anomalies ought to be caught at that stage. (This is a small voluntary organisation with a very limited range of stock, so errors should be easy to spot.) -- ~ Liz Tuddenham ~ (Remove the ".invalid"s and add ".co.uk" to reply) www.poppyrecords.co.uk