Calculating Discount - Buy Two Get Another Free
I am scratching my head on this...its not as simple as it first appears.
I can easily calculate if there are three of the same item in the cart and then discount (in cash) the amount equal to the cost of one of them.
For example: Say Item price is 30.00. The user sticks three (3 x 30.00 = 90.00) in the cart and because then the quantity threshold for this item has been met, it shows in the discounts 30.00...easy so far!
Now, my client has asked me, "what if a customer puts six in the cart", it should give a discount totalling 60.00.
What the client is saying is that "for every 3 of the same item in the cart, it should show a 30.00 discount"
So, if there was (say) 4 or five items of the same in the cart, it would only show a 30.00. Once it hits 6, then show 60.00 discount...again it remains at 60.00 if the customer adds 7 or 8 unless the customer updates the quantity to 9...and so on and so on?
There's probably an easy way to do this...anyone out there got a tip or hint?
Thanks in advance.