I am unable to update the data of my cart. Well, I can only change the qty of the cart but I need to change the discount and senior.
Here's the function of my model:
Code:
function update_cart(){
$rowid = $this->input->post('rowid');
$qty = $this->input->post('qty');
$disc = $this->input->post('discount');
$senior = $this->input->post('senior');
foreach ($rowid as $key => $value) {
$data = array(
'rowid' => $value,
'discount' => $disc[$key],
'senior' => $senior[$key],
'qty' => $qty[$key]
);
$this->cart->update($data);
}
redirect($_SERVER['HTTP_REFERER'], 'refresh');
}