Welcome Guest, Not a member yet? Register   Sign In
Cart doesn't add another item
#1

[eluser]Fero[/eluser]
Hi,

I've added one item to Cart, but another one doesn't want to get added.

Function that takes ID of item in database and adds it to cart is here:
Code:
function pridat($id)
  {
  $query=$this->db->get_where('produkty',array('id_produkty'=>$id,'status'=>'1'));
  
  If ($query->num_rows==0) return false;
  
  $produkt=$query->row();
  
  $data = array(
               'id'      => $produkt->id_produkty,
               'qty'     => 1,
               'price'   => $produkt->cena_vysledna,
               'name'    => $produkt->nazov,
            );

  $this->cart->insert($data);
  return true;
}


Messages In This Thread
Cart doesn't add another item - by El Forum - 02-19-2010, 08:19 AM
Cart doesn't add another item - by El Forum - 02-19-2010, 09:02 AM
Cart doesn't add another item - by El Forum - 02-19-2010, 10:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB