[eluser]teddy[/eluser]
how to update the cart price ?
Example if I have order great than 10 items (the same SKU) the price is 100 else is 150
I try add some code with the price is set 1 but not this working for me?
help me,pls !!! below is my code
Code:
$item = $this->input->post('rowid');
$qty = $this->input->post('qty');
$total = count($this->cart->contents());
if ($total>0)
{
for ($i=0; $i <$total ; $i++)
{
$data = array('rowid' => $item[$i], 'qty' => $qty[$i],'price'=>1);
$this->cart->update($data);
}
}