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;
}

#2
[eluser]Fero[/eluser]
Of course, I do not try to add the same item twice. It's different item with different id.

database is setup - ci_sessions is running in DB, also the config is setup on TRUE for database for session.. I am not sure where the mistake is Sad

#3
[eluser]Fero[/eluser]
solved, I am also using diacritics, had to comment line in cart.php ^ ^ I wonder why this isn't in documentation, ...


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.