Subversion Repositories SmartDukaan

Rev

Rev 11108 | Rev 11517 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11108 Rev 11169
Line 36... Line 36...
36
			elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
36
			elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
37
				$_GET['isLoggedIn'] = 'false';
37
				$_GET['isLoggedIn'] = 'false';
38
			}
38
			}
39
		}
39
		}
40
		//standard array
40
		//standard array
-
 
41
		$configdata = $this->config->item('cart');
-
 
42
		//$checkConfig = $this->config->item('home');
-
 
43
		$cachemodule = array('header','footer');
-
 
44
		$configdata = getCache($configdata,$cachemodule);
41
		$data = array();
45
		$data = array();
42
		$data['response']=$this->cart_model->getCart($this->input->get(),$this->input->post(),$this->config->item('cart'));
46
		$data['response']=$this->cart_model->getCart($this->input->get(),$this->input->post(),$configdata['module']);
43
		//print_r($data['response']['response']['carts']);
47
		//print_r($data['response']['response']['carts']);
44
		if(isset($data['response']['response']['carts'][0]->lines))
48
		if(isset($data['response']['response']['carts'][0]->lines))
45
		$cartCount = sizeof($data['response']['response']['carts'][0]->lines);
49
		$cartCount = sizeof($data['response']['response']['carts'][0]->lines);
46
		$authorized = $this->session->userdata('authorized');
50
		$authorized = $this->session->userdata('authorized');
47
		if(isset($authorized) && !empty($authorized)){
51
		if(isset($authorized) && !empty($authorized)){
Line 49... Line 53...
49
			$newValues['totalItems'] = $cartCount;
53
			$newValues['totalItems'] = $cartCount;
50
			$this->session->set_userdata('authorized',$newValues);
54
			$this->session->set_userdata('authorized',$newValues);
51
		}
55
		}
52
		$this->lessphp->object()->ccompile('assets/css/cart.less','assets/css/cart.css');
56
		$this->lessphp->object()->ccompile('assets/css/cart.less','assets/css/cart.css');
53
		$data['stylesheet'] = 'cart.css';
57
		$data['stylesheet'] = 'cart.css';
-
 
58
		if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
-
 
59
		{
-
 
60
			foreach($cachemodule as $cm)
-
 
61
			{
-
 
62
				if(isset($configdata[$cm]) and !empty($configdata[$cm]))
-
 
63
				{
-
 
64
					$data['response'][$cm]=$configdata[$cm];
-
 
65
				}
-
 
66
			}
-
 
67
		}
-
 
68
		setCache($configdata['module'],$cachemodule,$data['response']);
54
		$this->layout->view('cart/cart_view',$data);
69
		$this->layout->view('cart/cart_view',$data);
55
	}
70
	}
56
 
71
 
57
	
72
	
58
	public function add($id=null,$email=null,$itemname)
73
	public function add($id=null,$email=null,$itemname)