Beginner on rails! customize store. "Agile web development"

[F---ing AJAX!!!]

Richard wrote:

Uhm, dumb topic perhaps, my bad. Anyway, ive read the "How to create a shop" in the book "agile web development". But no i'd like to add some options to the product in the store, so the future customers can choose ie. a bike, and then select color and size of that bike. Iv'e given this function ALOT of taught but haven't been able to figure it out by myself, can anyone around here please help me?

How would you do it in raw HTML? Get a book on that; you can probably augment it with a Bookmark on your favorite online HTML tutorial.

I always Google for HTML like this:

   site:microsoft.com html select option

When I wonder about select boxes. MS's HTML documentation is all in one site (or three), with no popup adds or other nonsense.

It would be nice if the user could select it from a dropdown-list, but I have no clue about how to do that. Then i figured "I'll just let the useres type in their options in a textfield", but then yet again. I don't know how to store that kind of data in a session.

Once you get the raw HTML down, you can move up to a FormHelper called select().

Would it not be part of the model?

Dave

Richard wrote:

Iv'e managed to create the dropdownlist, but the problem is; How do I get the selected value to be stored in the session and then later viewed in the 'cart'?

select("product", "product.sizes_colors", product.sizes_colors.split('.'))

is what i used to create the form. It would return a string of text (ie large blue) but where and how can I temporarily store this data?

It comes into your action in your params, right? Add this:

  p params

if it's there, you can copy it to the session or model. (Prefer the model, because statelessness is good for transactions...)