Prices varies by Quantity
I have a list of products where the price per item varies depending on how many are being purchased. Its quite straightforward really - the more you buy the cheaper the product gets.
1 - 99 - €32 each
100 - 199 - €30 each
200+ - €28 each
I setup a separate table in my database to store these details and each one is tied to a product using the product ID.
I have managed to write some code into my products page to check what price to use according to the quantity selected, which works well, but the problem I have is if the person changes the quantity, either by adding more products through the products page or by changing the quantity in the shopping cart. If they change the quantity it continues to use the initial price regardless.
So basically I'm wondering how I can ensure it runs the same check again. Perhaps I need to clear out the price for the item in the session but I don't know how to do that. Alternatively I'm thinking maybe my code to check the quantity should be in the ecart1_PHP.php file but I have no idea where I would need to put it in there.
I hope this all makes sense. Please let me know if you need more details.