Subversion Repositories SmartDukaan

Rev

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

Rev 14016 Rev 14139
Line 49... Line 49...
49
		$this->log('userId '.print_r($userId,1),'order_trackers');
49
		$this->log('userId '.print_r($userId,1),'order_trackers');
50
		if ($this->request->is('post')) {
50
		if ($this->request->is('post')) {
51
			$this->log(print_r($this->request->data,1),'order_trackers');
51
			$this->log(print_r($this->request->data,1),'order_trackers');
52
			$url = $this->apihost.'track/user/'.$userId.'?storeId='.$storeId;
52
			$url = $this->apihost.'track/user/'.$userId.'?storeId='.$storeId;
53
			$this->log($url,'order_trackers');
53
			$this->log($url,'order_trackers');
54
			//$params = array('url'=>$this->request->data['url'],'html'=>$this->request->data['html']);
54
			$params = array('url'=>urlencode($this->request->data['url']),'html'=>urlencode($this->request->data['html']));
55
			//$jsonVar = json_encode($params,JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE);
55
			//$jsonVar = json_encode($params,JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE);
56
			//$this->log(print_r($jsonVar,1),'order_trackers');
56
			//$this->log(print_r($jsonVar,1),'order_trackers');
57
			$result =  $this->post_request($url,$this->request->data);
57
			$result =  $this->post_request($url,$params);
58
			//$result = array('success'=>true,'message'=>'html stored');
58
			//$result = array('success'=>true,'message'=>'html stored');
59
			$this->response->type('json');
59
			$this->response->type('json');
60
			$this->layout = 'ajax';
60
			$this->layout = 'ajax';
61
			$this->set(array(
61
			$this->set(array(
62
			    'result' => $result,
62
			    'result' => $result,