shopping options with different price based on options
I have a cart for a coffee roaster that I'm modifying to give the shopper a couple of different options. The options are:
Ground or Whole Bean
I created a table called Grind with ID 1 = Ground and ID 2 = Whole Bean
Size - Two sizes of bags -- 4oz and 12oz
I created a table called Size with ID 1= .75 (3/4 of a lb) and ID 2= .25 (1/4 of a lb)
So for each product the customer would choose:
a) ground or whole bean
b) 4oz or 12oz bag
Right now I have a separate record for each size so when the customer comes to the site they see the same product listed twice -- the only difference being the size and price. My customer wants there to be just one product listed and have the ability to select the size with a select list. If I create the record set for size, how would I handle the different price for the 4oz and 12oz bag?
I'm using the Recipe 6 "Database-driven Shopping Options" which uses the shoe store with Men's and Women's sizes and different colors. I think it's more complex than what I'm trying to do but I'm getting hung up when it says to copy and paste the snippet. It doesn't seem like I need to do that -- but I'm not sure and so I don't want to go further with that.
So I guess my fundamental questions are:
Don't I just need the two record sets and thus two select lists (one for "size" and one for "grind")?
And how do I get the correct price associated with the appropriate size?