-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I implement quantity editing? #5
Comments
Maybe you can do it manually like |
It looks like this functionality exists here:
|
Yup,, maybe the documentation page must be comprehensive |
@marcamillion - how did you solve quantity editing of shopping cart item? I know the method .update_quantity must be included in a controller action. But how did you manage to include it in your controller and views? |
I can't recall @muhammadn to be honest It's been almost 2 years...sorry :( |
Just add a 3rd parameter for the quantity in the controller create action. @shopping_cart.add(@Product, @product.price, params[:quantity].to_i) |
Using the models recommended by the guide, and even the example application, I have the following in my
shopping_cart_item.html.erb
.But I want to allow users to change the quantity - from say a drop-down menu (so a select tag from a collection).
But I am not quite sure how to approach that.
I would also like to add other attributes to my item - like a size of an item, color, etc.
I would like my store owner to be able to specify those things (i.e. size, color, etc.).
How do I do that?
Thanks.
The text was updated successfully, but these errors were encountered: