[eluser]KazooSoft[/eluser]
If anyone has a better solution i had to do this.. Its a big bodjey:
Code:
for($i=0;$i < $total;$i++)
{
//echo $total;
if($name[$i] = 'LeXii') // If it is LeXii do our super magic
{
$cost = $this->lexii_calc($qty[$i]);
$data = array(
'rowid' => $item[$i],
'qty' => 0,
'price' => $cost,
'name' => $name
);
$this->cart->update($data);
$data2 = array(
'id' => $id[$i],
'qty' => $qty[$i],
'price' => $cost,
'name' => $name[$i]
);
$this->cart->insert($data2);
//echo $cost;
//echo $name[$i];
//print_r($data);
} else {
// Create an array with the products rowid's and quantities.
$data = array(
'rowid' => $item[$i],
'qty' => $qty[$i]
);
$this->cart->update($data);
}
// Update the cart with the new information
}