On Mon, 2010-03-22 at 17:52 +0100, Tony Tony wrote:
> Hi all,
> 
> I have a personal project I'm planning and I came to a small hurdle.
> 
> I want to have an item with a price that will be the default for all
> clients/users. However, in my business I have some clients that are
> grandfathered in to some special pricing. In the case of these
> grandfathered in cases, I'll manually plug their special price in my
> admin section. Then all they will see is their special pricing while the
> regular users/clients see the default price.
> 
> My current thoughts are to have a separate table called custom_pricing
> with fields product_id, client_id, price and then tap into that. The
> product table would have product_id and price.
> 
> What is the best and simplest way to design and implement this?
----
I would have a table called pricing and have a column that had the
customer_id and thus you might have 2 (or more) prices for an item but
only one for a specific customer or default to the one that is not tied
to a specific customer.

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to