| Line 25... |
Line 25... |
| 25 |
|
25 |
|
| 26 |
}
|
26 |
}
|
| 27 |
public function index()
|
27 |
public function index()
|
| 28 |
{
|
28 |
{
|
| 29 |
$authorized = $this->session->userdata('authorized');
|
29 |
$authorized = $this->session->userdata('authorized');
|
| 30 |
error_log("[cart] authorized ".print_r($authorized,1));
|
- |
|
| 31 |
//standard array
|
30 |
//standard array
|
| 32 |
$configdata = $this->config->item('cart');
|
31 |
$configdata = $this->config->item('cart');
|
| 33 |
//$checkConfig = $this->config->item('home');
|
- |
|
| 34 |
$cachemodule = array('header','footer');
|
32 |
$cachemodule = array('header','footer');
|
| 35 |
$configdata = getCache($configdata,$cachemodule);
|
33 |
$configdata = getCache($configdata,$cachemodule);
|
| 36 |
error_log("[cart] configdata ".print_r($authorized,1));
|
- |
|
| 37 |
$data = array();
|
34 |
$data = array();
|
| 38 |
if(isset($authorized) && !empty($authorized)){
|
35 |
if(isset($authorized) && !empty($authorized)){
|
| 39 |
$_GET['userId'] = $authorized['Id'];
|
36 |
$_GET['userId'] = $authorized['Id'];
|
| 40 |
$_GET['Id'] = $authorized['cartId'];
|
37 |
$_GET['Id'] = $authorized['cartId'];
|
| 41 |
if($authorized['isLoggedIn'] == 1){
|
38 |
if($authorized['isLoggedIn'] == 1){
|
| Line 44... |
Line 41... |
| 44 |
elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
|
41 |
elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
|
| 45 |
$_GET['isLoggedIn'] = 'false';
|
42 |
$_GET['isLoggedIn'] = 'false';
|
| 46 |
}
|
43 |
}
|
| 47 |
unset($configdata['module']['response'][0]);
|
44 |
unset($configdata['module']['response'][0]);
|
| 48 |
$data['response']=$this->cart_model->getCart($this->input->get(),$this->input->post(),$configdata['module']);
|
45 |
$data['response']=$this->cart_model->getCart($this->input->get(),$this->input->post(),$configdata['module']);
|
| 49 |
error_log("[cart] authorized response ".print_r($data['response'],1));
|
- |
|
| 50 |
//print_r($data['response']['response']['carts']);
|
- |
|
| 51 |
if(isset($data['response']['response']['carts'][0]->lines))
|
46 |
if(isset($data['response']['response']['carts'][0]->lines))
|
| 52 |
$cartCount = sizeof($data['response']['response']['carts'][0]->lines);
|
47 |
$cartCount = sizeof($data['response']['response']['carts'][0]->lines);
|
| 53 |
$authorized = $this->session->userdata('authorized');
|
48 |
$authorized = $this->session->userdata('authorized');
|
| 54 |
if(isset($authorized) && !empty($authorized)){
|
49 |
if(isset($authorized) && !empty($authorized)){
|
| 55 |
$newValues = $authorized;
|
50 |
$newValues = $authorized;
|