Subversion Repositories SmartDukaan

Rev

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

Rev 10582 Rev 11052
Line 29... Line 29...
29
	
29
	
30
 
30
 
31
	function getCart($get=array(),$post=array(),$module=array(), $cartId=null)
31
	function getCart($get=array(),$post=array(),$module=array(), $cartId=null)
32
	{
32
	{
33
	
33
	
34
 
-
 
-
 
34
		print_r($module);
35
		$output =array();
35
		$output =array();
36
		if(isset($module) and !empty($module))
36
		if(isset($module) and !empty($module))
37
		{
37
		{
38
			if(isset($module['header']) and !empty($module['header']))
38
			if(isset($module['header']) and !empty($module['header']))
39
			{
39
			{
40
				foreach($module['header'] as $header)
40
				foreach($module['header'] as $header)
41
				{
41
				{
42
 
42
 
-
 
43
					$cache = getFileCache($header);
-
 
44
					if(isset($cache) && !empty($cache)){
-
 
45
						$head['header'][$header] = $cache;
-
 
46
					}else{
43
					$this->curlURL($header,'get');
47
						$this->curlURL($header,'get');	
-
 
48
					}
44
				}
49
				}
45
			}
50
			}
46
			if(isset($module['footer']) and !empty($module['footer']))
51
			if(isset($module['footer']) and !empty($module['footer']))
47
			{
52
			{
48
				foreach($module['footer'] as $footer)
53
				foreach($module['footer'] as $footer)
49
				{
54
				{
-
 
55
					$cache = getFileCache($footer);
-
 
56
					if(isset($cache) && !empty($cache)){
-
 
57
						$foot['footer'][$footer] = $cache;
-
 
58
					}else{
50
					$this->curlURL($footer,'get');
59
						$this->curlURL($footer,'get');	
-
 
60
					}
51
				}
61
				}
52
			}
62
			}
53
			if(isset($module['response']) and !empty($module['response']))
63
			if(isset($module['response']) and !empty($module['response']))
54
			{
64
			{
55
				foreach($module['response'] as $response)
65
				foreach($module['response'] as $response)
Line 77... Line 87...
77
		//add_call( KEY, METHOD, URL, array of PARAMS, array of CURL_OPTS )
87
		//add_call( KEY, METHOD, URL, array of PARAMS, array of CURL_OPTS )
78
		//$this->curlURL('products','get',$get);
88
		//$this->curlURL('products','get',$get);
79
		$responses = $this->mcurl->execute();
89
		$responses = $this->mcurl->execute();
80
		if(isset($responses) and !empty($responses))
90
		if(isset($responses) and !empty($responses))
81
		$responses = $this->parser->parse_response($responses,$module);
91
		$responses = $this->parser->parse_response($responses,$module);
-
 
92
		if(isset($head) && !empty($head)){
-
 
93
			foreach($head['header'] as $key=>$value){
-
 
94
				$responses['header'][$key] = $value;
-
 
95
			}
82
	
96
		}
-
 
97
		if(isset($foot) && !empty($foot)){
-
 
98
			foreach($foot['footer'] as $key=>$value){
-
 
99
				$responses['footer'][$key] = $value;
-
 
100
			}
83
		
101
		}
84
		return $responses;
102
		return $responses;
85
	}
103
	}
86
function curlURL($configurl=null,$methodtype='get',$parameter=array(), $cartId=null)
104
function curlURL($configurl=null,$methodtype='get',$parameter=array(), $cartId=null)
87
{
105
{
88
		$params ='';
106
		$params ='';