codeigniter - insert method is overwriting what is in the cart and not adding to it -


if($this->input->post('tambah')){    $kode = $this->input->post('kode');    $jumlah = $this->input->post('jumlah');    $hjual = $this->input->post('hjual');    $nama = $this->input->post('nama');    $exp = $this->input->post('tglexp');    $hpp = $this->input->post('hpp');    $temp_stok = $this->input->post('temp_stok');    $diskon = $this->input->post('diskon');   $cart = array(        'id'      => $kode,        'qty'     => $jumlah,        'price'   => $hjual,        'name'    => $nama,        'options' => array('exp' => $exp, 'hpp' => $hpp,                    'temp_stok' => $temp_stok , 'diskon'=>$diskon ));     $this->cart->insert($cart);     header('location:'.base_url().'penjualan/load_input_barang_eceran');    } 

i cant seem add more items , latest 1 add replaces existing one. had in controller strangely can insert , not overwriting

i've had this.

it non alphanumerics in product code caused whole cart behave strangely.

try having aaa123 etc codes test this


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -