# Cart problem

**URL:** <https://www.ruby-forum.com/t/cart-problem/104708>\
**Category:** Rails\
**Created:** [May 21, 2007, 8:00pm UTC](https://www.ruby-forum.com/t/cart-problem/104708 "2007-05-21T20:00:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pabloz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c37758/32.png) [@pabloz](https://www.ruby-forum.com/u/pabloz)\
**Post date:** [May 21, 2007, 8:00pm UTC](https://www.ruby-forum.com/t/cart-problem/104708/1 "2007-05-21T20:00:36Z")

</div>

Hi

I have a simple shopping cart. The whole cart is in a form so i can  
update the quantity, this works fine. How should i make the  
“delete\_item” to work? I know i shouldn’t use normal links, and i cant  
have nested forms so i cant use button\_to.  
The only solution is multiple submit buttons. How can they tell which  
item to delete?(how to pass the id of the product). I am guessing by  
hidden fields or smth but still cant figure this out.

---

<div class="post-metadata">

**Author:** ![pabloz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c37758/32.png) [@pabloz](https://www.ruby-forum.com/u/pabloz)\
**Post date:** [December 14, 2007, 8:09am UTC](https://www.ruby-forum.com/t/cart-problem/104708/2 "2007-12-14T08:09:19Z")

</div>

Hi pablo… can you tell me how you did to update the quantity  
please!!  
I can’t do it  
Thanks !!!

---

<div class="post-metadata">

**Author:** ![pabloz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c37758/32.png) [@pabloz](https://www.ruby-forum.com/u/pabloz)\
**Post date:** [December 14, 2007, 8:33am UTC](https://www.ruby-forum.com/t/cart-problem/104708/3 "2007-12-14T08:33:41Z")

</div>

pabloz wrote:

> Hi
> 
> I have a simple shopping cart. The whole cart is in a form so i can  
> update the quantity, this works fine. How should i make the  
> “delete\_item” to work? I know i shouldn’t use normal links, and i cant  
> have nested forms so i cant use button\_to.  
> The only solution is multiple submit buttons. How can they tell which  
> item to delete?(how to pass the id of the product). I am guessing by  
> hidden fields or smth but still cant figure this out.

Hi,  
for delete\_item,  
do u want link to click or button .

if u provide the code,  
i will definitely help u…

Regards,  
Srinivas Avasarala…
