controller --
public function add_to_cart($id,$quantity){
$this->load->model("getdb");
$this->load->model('shops_model');
$ins=TRUE;
$product1= $this->getdb->Product($id);
$price1 = $quantity/$product1[0]->min_quantity;
foreach ($this->cart->contents() as $items) {
if($items['id']==$id){
$ins=FALSE;
$data = array(
'rowid' => $items['rowid'],
'id' => $id,
'price' => $product1[0]->selling_price*$price1,
'name' => $product1[0]->product_name,
'options' => array('image' =>$product1[0]->image1, 'unit' => $product1[0]->unit, 'quantity' => $quantity)
);
$this->cart->update($data);
}
}if($ins){
$data = array(
'id' => $id,
'qty' => 1,enter code here
'price' => $product1[0]->selling_price*$price1,
'name' => $product1[0]->product_name,
'options' => array('image' =>$product1[0]->image1, 'unit' => $product1[0]->unit, 'quantity' => $quantity)
);
$this->cart->insert($data);
}
$data['shops_id_data']= $this->shops_model->getshopiddata($id);
$a = end(end($data['shops_id_data']));
$data['shops_data']= $this->shops_model->getshopdata($a);
redirect('Shops/shop_page');
}
here i want to redirect on shop_page method and also i want to pass $data['shop_data] array on shop_page using redirect method without using $this->>load->view('shop_page',$data) ....so how its possible..