bertly_the_coder
unread,Aug 1, 2011, 11:56:07 AM8/1/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
I have an interesting problem that I'm trying to wrap my head around.
I'm creating a subscription based service that will charge extra for
premium products. What does this mean?...ok, let's say I've created a
subscription based service that allows you to get any 5 standard
magazines of your choice shipped to you per month, where a standard
magazine is any magazine that costs less than $7.99. Magazines more
expensive than that are considered premium.
Now if a subscriber selects a standard magazine, this is fine, the
order is created and the magazine is shipped, this order falls within
the terms of the subscription. However, if the subscriber selects a
premium magazIne, then I have to charge them the difference of the
magazine price from 7.99. So if they order a magazine worth 9.99, I
have to charge them 2 bucks, etc etc.
Now, I can't figure out where to put this logic check. What I've
started with was this. I created another controller method to check
the price, if it's standard, send to the create method(is that even
possible??). If the magazine price is high, I redirect to a confirm
page then back to the create method....this means that I have to store
my order in a session, right? Which just seems like over kill.
Has anyone had a problem like this before? How did you go about
solving it?
Thanks a bunch in advance,