I have form on cart view, and after name, item cost, I have quantity text field,
<?php echo CHtml::textField('quantity', $value['quantity']); ?>
if i change quantity text field and click on submit (button named update cart), i want to change the default quantity number to new, updated number.
This is what I try, in my controller i put this,
if(isset($_POST['updateCart'])){
$quantity=$_POST['quantity'];
}else {
$quantity=1;
}
$sessionCart[] = array('product_id' => $_POST['documents'], 'document' => $productInfo->name, 'countriesIssued'=>$_POST['countriesIssued'], 'countriesIntended'=>$_POST['countriesIntended'], 'quantity'=>$quantity, 'price' => $legalisationPrice->FCO);
and after the form is submited the value is 1, not my new value that i entered.
Thanks for help.