Forum: Rails deployment Calculate rebate in a web shop

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3275da7fdbd73cb4e7956fd0d29164de?d=identicon&s=25 Paul Bergstrom (palb)
on 2009-11-13 11:14
My 2 brain cells have difficulties with this problem.

I'm creating a web shop where each item has a price. If you buy 3 you
get a lower price for each item and then even lower when you buy 6.

Each item in the product table has a unique product id and three columns
for prices; price, price3 and price6.

How should I do this? I guess one way would just to count each and see
if it's dividable by 3 or 6 and then the magic comes ... but not sure
this is the right way. Any ideas? I'm I on the right path?
This topic is locked and can not be replied to.