cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the value of a quantity input box in product page in the cart page in magento?

How to get the value of a quantity input box in product page in the cart page in magento?

I have a input box in product page in which the user has to enter the quantity.

 

 

 

 

<form action="htttest/index.php/checkout/cart/add/uenc/aHR0cDovL215YmFrZS5pbi90ZXN0L2luZGV4LnBocC9jYWtlcy0xNDMuaHRtbD9fX19TSUQ9VQ,,/product/18/form_key/mycClurMqxg4udgJ/?___SID=U" method="post" id="product_addtocart_form" enctype="multipart/form-data">
<input name="form_key" type="hidden" value="mycClurMqxg4udgJ">

<p class="availability in-stock">Availability: <span> In stock</span></p>

<div class="add-to-cart">
<label for="qty">Qty:</label>
<input type="text" name="qty" id="qty" maxlength="12" value="1" title="Qty" class=" bd-bootstrapinput form-control input-text qty">
</div>

</form>

 

 

 

I want the value entered in this form in the cart page to display it in another input box. like the below :

 

 

 

 

<td class="a-center">
<input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $_item->getQtyOrdered() ?>" size="4" title="<?php echo $this->__('Qty') ?>" type="text" class=" bd-bootstrapinput form-control" maxlength="12" />
</td>