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

hey all!
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?

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.

Regards / Richard.

On 11/25/06, Richard [email protected] wrote:

hey all!
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

I always Google for HTML

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.


Phlip
http://c2.com/cgi/wiki?ZeekLand ← NOT a blog!!

[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().


Phlip
http://c2.com/cgi/wiki?ZeekLand ← NOT a blog!!

On Nov 25, 2006, at 5:14 PM, Richard wrote:

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?

Would it not be part of the model?

Dave

Phlip wrote:

[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().


Phlip
http://c2.com/cgi/wiki?ZeekLand ← NOT a blog!!

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?

I’m really grateful for the link above, it did sort out a few things!

You might find my book useful. See my sig. :slight_smile:


Building an e-commerce site with Rails?
http://www.agilewebdevelopment.com/rails-ecommerce

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…)


Phlip
Redirecting... ← NOT a blog!!!