Displaying 20 results from an estimated 3000 matches similar to: "Railscast 75, Observe_field and Shopping Cart"
2005 Dec 14
9
Passing quantity in a shopping cart
I am using this line on my index.rhtml page to capture the quantity
required of a particular item for a basic shopping cart app:
<%= text_field ''line_item'', ''quantity'', {:size=>3} %> </td>
but my next screen (a cart screen) doesn''t reflect what was entered in
that text field when the item is added to the cart. That is,
2007 Oct 17
9
@session['user'] vs session[:user]
This might seem really simple to some but just wanted to ask: what is
the difference between @session[''user''] and session[:user] ? and how
would you use each?
And another question, I have the following code:
def get_customer
if @session[''customer'']
@c = Customer.find(@session[''customer''])
end
end
private
def
2007 Aug 17
1
Need volunteers for new Rails based shopping cart
We''re currently looking for volunteers on the new RailsCart[1]
project. The idea is to build something relatively simple with all of
the features that most open source shopping carts seem to be missing.
We''ll be using ActiveMerchant for all of our payment gateway needs.
We''re not trying to build the ultimate shopping cart. This is
designed for Rails developers who need
2005 Oct 05
3
Shopping Cart: SKU and Product Confusion
Hi there,
I''m at a loss...
I was on the #ROR channel last night and spoke to a really helpful person
(Defiler) who gave me some direction on building a shopping cart.
Unfortunately, I wasn''t able to successfully get to where I need to go. This
is the predicament I am currently finding myself in:
I''m building a shopping cart for a client''s new website. They
2008 Sep 07
1
remote_form_for, paths, and partials
hi,
i''m having a little trouble rendering a partial that uses a
remote_form_for and is in another controller.
<%= render :partial => "reviews/new"-%>
and in the partial i have only this, inside another controller
<% remote_form_for @review do |rv|-%>
<%= rv.hidden_field :value, :value => 1 -%>
<%= rv.image_submit_tag "thumbsupnc.png" %>
2006 Apr 10
4
Many To Many''s Join table attributes + migrations
Hi all,
just joined and have only just kicked off with Rails (coming, but not
departing, from WebObjects development). And so far there seems to be
a lot of promise except for one thing I can''t figure out as yet --
the above problem.
Say I have the following conceptual relationships:
ITEMS <<--->> CARTS
i.e., each item can belong to one or more categories. So really
2008 Oct 11
8
Observing few fields in a form - Best Practise?
Hi,
im looking to build a page similar to a shopping cart page. When you
change the ''price'' or ''quantity'' fields, the total is calculated and
displayed.
There are other fields in the form which have no relation to this
action. So i guess observe_form is not required. Can someone tell me
what the best practise is for this?
2006 May 30
4
Help with Shopping Cart example from Agile Web Development 2nd Edition
Hi
I get to about page 103 of the book and get an application error. Further
investigation reveals the following error in the dev log:
Mysql::Error: #42S22Unknown column ''id'' in ''where clause'': UPDATE sessions
SET `data` =
2006 Jul 24
1
Newbie error: undefined local variable or method
When I add an item to the shopping cart, I get an error:
undefined local variable or method `cart_item'' for
#<#<Class:0x3715a78>:0x3715a48>
Session info says the cart being updated properly. I''m just not able
to output two variables:
<%= cart_item.quantity %> × <%= h(cart_item.title) %>
I did some research, and I can grasp that local
2006 Aug 15
3
update or alter cart
I want to modify and update the items in the Depot - "display_cart".
Since the cart is in a session, its a little hard to get at the data.
I just want to create a way to change quantities, prices and
recalculate.
Has someone done this, and could you point me to the right direction.
Thanks
Chas
--
Posted via http://www.ruby-forum.com/.
2006 Jul 18
15
Agile Web Developement with Rails
I recently got a copy of the second addition in PDF
and got stuck on the Ajax portion using highlighting
page 128. While trying to make my cart flash I got an
RJS error when I click add to cart. I have gone back
and made sure my code matched what was in the book but
no help. I sent Dave an email and he rec''d this list.
Anybody got any good links for troubleshooting Ajax or
maybe have see
2006 Jun 26
5
Newbie question about Agile Rails book - Delete from cart
I have been working through the Agile Web Development with Rails book
doing the Depot tutorial. I have completed it and it works but I cant
say I understand how and why.
My question is this "After adding products to the Cart, how do I then
give users the option to delete just one item and not empty the whole
cart?"
I''ve been playing around with all sorts of code, just making
2005 Oct 12
0
question about scriptaculous drag and drop shopping cart
I got the dragging to work, and the adding the to cart , but i''m having
a problem drag from with the cart div it doesn''t drag. But the
dragging works on the cart (url)
here is a quick example of the cart
http://64.90.176.114/ajax/drag.php
- try dragging into the the solid line div (it will add an item to the
db). but then try and drag from within the solid line div (gray
2007 May 30
2
Depot - empty_cart with ajax
First of all id like to say hi to everyone from Argentina, im yet
another Depot first-timer.
Going through the example, i got to the point where my cart finally
runs Ajax-based. And there is a line where Dave says, after all the
job is done "You should see the cart in the sidebar update. And you
shouldn''t see your browser show any indication of reloading the page.
You''ve
2006 May 18
1
Drag and drop purchased items into a shopping cart
All,
does any one has a drag and drop sample code using rails and ajax that
I can use as a starting point for mine? I ''ll for customers to drag and
drop item being purchase into their shopping cart.
Thanks
Patrick
2012 Jun 17
0
The rails way to develop a multi product type shopping cart
Hi,
I''m developing an application which has to manage many types of products.
But I can''t think what the best approach in rails is on how to implement
them. Here is a selection of some of the products (with some data types)
that the software will have to manage:
Speaker
Make - String
Model - String
Wattage - Integer
Price - Decimal
2008 Jan 23
1
Weird shopping cart behaviour!
Dear all,
I have a general form (which I generate via form_tag) for a
''subscription''.
Inside this form the user can add ''elements'' to his subscription. I do
this with an an additional Ajax form:
<% form_remote_tag :url => { :action => :add_to_cart, :id => element }
do%>
<%= submit_tag "Add" %>
<% end %>
Every time the
2008 Mar 29
1
drag and drop or shopping cart
I would like to know whether there are plugins for the above. If not,
could anyone direct me to the resouces to develop a drag and drop module
for muy ror project.
--
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,
2006 Aug 04
6
Errors ... errors and errors.
I bought the second edition of the ruby on rails, it seems to work fine
now, did some adjustments to the code. But now I get a second error and
I want to learn to understand to fix them myself. So here is the error.
ArgumentError in StoreController#add_to_cart
wrong number of arguments (1 for 0)
#{RAILS_ROOT}/app/models/cart.rb:15:in `initialize''
#{RAILS_ROOT}/app/models/cart.rb:15:in
2007 Oct 15
4
ArgumentError in StoreController#add_to_cart: wrong number of arguments (1 for 0)
I am really new to Ruby and Rails but as you probably see I am trying
to get the shopping card working from the book. I am getting this
error but I really don''t know what to do. I have looked up several of
topics that stated the same problem but as far as I am, nothing has
helped me out yet. Is there something wrong with the Product model?
This is in the StoreController and I believe it