| Line 53... |
Line 53... |
| 53 |
$data['stylesheet'] = 'cart.css';
|
53 |
$data['stylesheet'] = 'cart.css';
|
| 54 |
$this->layout->view('cart/cart_view',$data);
|
54 |
$this->layout->view('cart/cart_view',$data);
|
| 55 |
}
|
55 |
}
|
| 56 |
|
56 |
|
| 57 |
|
57 |
|
| 58 |
public function add($id=null,$email=null)
|
58 |
public function add($id=null,$email=null,$itemname)
|
| 59 |
{
|
59 |
{
|
| 60 |
$response=array();
|
60 |
$response=array();
|
| 61 |
|
61 |
|
| 62 |
$authorized = $this->session->userdata('authorized');
|
62 |
$authorized = $this->session->userdata('authorized');
|
| 63 |
if(isset($id) and !empty($id) and is_numeric($id))
|
63 |
if(isset($id) and !empty($id) and is_numeric($id))
|
| Line 92... |
Line 92... |
| 92 |
if(isset($email) && $email != 'null'){
|
92 |
if(isset($email) && $email != 'null'){
|
| 93 |
$_POST['email'] = $email;
|
93 |
$_POST['email'] = $email;
|
| 94 |
}
|
94 |
}
|
| 95 |
$response=$this->cart_model->getCart($this->input->get(),$this->input->post(),$this->config->item('cart_add'));
|
95 |
$response=$this->cart_model->getCart($this->input->get(),$this->input->post(),$this->config->item('cart_add'));
|
| 96 |
if(isset($response['response']['addcart'][0]->message) && !empty($response['response']['addcart'][0]->message)){
|
96 |
if(isset($response['response']['addcart'][0]->message) && !empty($response['response']['addcart'][0]->message)){
|
| - |
|
97 |
if(isset($itemname) && $itemname != 'null'){
|
| - |
|
98 |
if(!isset($email) || $email == 'null'){
|
| - |
|
99 |
$productinfo = 'productinfo'.$itemname;
|
| - |
|
100 |
deleteFileCache($productinfo);
|
| - |
|
101 |
}
|
| - |
|
102 |
}
|
| 97 |
echo json_encode($response['response']);
|
103 |
echo json_encode($response['response']);
|
| 98 |
}
|
104 |
}
|
| 99 |
elseif(isset($response['response']['addcart'][0]->redirectUrl) && $response['response']['addcart'][0]->redirectUrl == 'cart'){
|
105 |
elseif(isset($response['response']['addcart'][0]->redirectUrl) && $response['response']['addcart'][0]->redirectUrl == 'cart'){
|
| 100 |
$authorized = $this->session->userdata('authorized');
|
106 |
$authorized = $this->session->userdata('authorized');
|
| 101 |
if(isset($authorized) && !empty($authorized)){
|
107 |
if(isset($authorized) && !empty($authorized)){
|