Thanks for taking the time to read this. Ive used the shopping cart class from the code igniter for the base cart, but I had one small problem. After adding the item to the cart, I redirect the user to the verification page, but when I click on the browser, the item is deleted. I know this because I have <?php echo anchor('cart','<strong>'.$this->cart->total_items(). '</strong> item(s)') ?> In the title , and it decreases upon return. This is really annoying, and I would like to fix it.
it is a form processing controller
public function process () { if($this->input->post('submit')) { $product = $this->products_model->getProductRow($this->input->post('productid')); $data = array( 'id' => $product['id'], 'qty' => 1, 'price' => $this->product_helper->calcPrice($product['id']), 'name' => $product['name'] ); $this->cart->insert($data); redirect('cart');
Is there something trivial that I'm missing here, or is it something that needs to be changed in the CI bucket class?
Thank you very much
source share