| Line 74... |
Line 74... |
| 74 |
setCache($configdata['module'],$cachemodule,$data['response']);
|
74 |
setCache($configdata['module'],$cachemodule,$data['response']);
|
| 75 |
$this->layout->view('cart/cart_view',$data);
|
75 |
$this->layout->view('cart/cart_view',$data);
|
| 76 |
}else{
|
76 |
}else{
|
| 77 |
unset($configdata['module']['response'][1]);
|
77 |
unset($configdata['module']['response'][1]);
|
| 78 |
$data['response']=$this->cart_model->getCart($this->input->get(),$this->input->post(),$configdata['module']);
|
78 |
$data['response']=$this->cart_model->getCart($this->input->get(),$this->input->post(),$configdata['module']);
|
| 79 |
error_log("[cart] unauthorized response ".print_r($data['response'],1));
|
- |
|
| 80 |
$this->lessphp->object()->ccompile('assets/css/cart.less','assets/css/cart.css');
|
79 |
$this->lessphp->object()->ccompile('assets/css/cart.less','assets/css/cart.css');
|
| 81 |
$data['stylesheet'] = 'cart.css';
|
80 |
$data['stylesheet'] = 'cart.css';
|
| 82 |
if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
|
81 |
if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
|
| 83 |
{
|
82 |
{
|
| 84 |
foreach($cachemodule as $cm)
|
83 |
foreach($cachemodule as $cm)
|
| Line 156... |
Line 155... |
| 156 |
echo json_encode($response['response']);
|
155 |
echo json_encode($response['response']);
|
| 157 |
//redirect(base_url().strtolower(__CLASS__),'refresh');
|
156 |
//redirect(base_url().strtolower(__CLASS__),'refresh');
|
| 158 |
}elseif(isset($response['response']['addcart'][0]->redirectUrl) && $response['response']['addcart'][0]->redirectUrl != 'cart'){
|
157 |
}elseif(isset($response['response']['addcart'][0]->redirectUrl) && $response['response']['addcart'][0]->redirectUrl != 'cart'){
|
| 159 |
echo json_encode($response['response']);
|
158 |
echo json_encode($response['response']);
|
| 160 |
}
|
159 |
}
|
| 161 |
print_r($response);
|
- |
|
| 162 |
}
|
160 |
}
|
| 163 |
public function update($id=null,$qty=null)
|
161 |
public function update($id=null,$qty=null)
|
| 164 |
{
|
162 |
{
|
| 165 |
$response=array();
|
163 |
$response=array();
|
| 166 |
$authorized = $this->session->userdata('authorized');
|
164 |
$authorized = $this->session->userdata('authorized');
|