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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phlip
2006-Nov-25 21:54 UTC
Re: Beginner on rails! customize store. "Agile web development"
On 11/25/06, Richard <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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.> > 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. > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phlip
2006-Nov-25 21:56 UTC
Re: 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(). -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Richard
2006-Nov-25 23:14 UTC
Re: Beginner on rails! customize store. "Agile web developme
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! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dave Thomas
2006-Nov-25 23:32 UTC
Re: Beginner on rails! customize store. "Agile web developme
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 --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Benjamin Curtis
2006-Nov-26 03:36 UTC
Re: Beginner on rails! customize store. "Agile web development"
You might find my book useful. See my sig. :) -- Building an e-commerce site with Rails? http://www.agilewebdevelopment.com/rails-ecommerce On Nov 25, 2006, at 1:20 PM, Richard 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? > > 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. > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---