Subversion Repositories SmartDukaan

Rev

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

Rev 11805 Rev 11811
Line 31... Line 31...
31
		}
31
		}
32
		$cachemodule = array('header','footer');
32
		$cachemodule = array('header','footer');
33
		$configdata = getCache($configdata,$cachemodule);
33
		$configdata = getCache($configdata,$cachemodule);
34
		
34
		
35
		$data['response']=$this->privatedeal_model->getProducts('',$this->input->post(),$configdata['module'], $userId);
35
		$data['response']=$this->privatedeal_model->getProducts('',$this->input->post(),$configdata['module'], $userId);
-
 
36
		print_r($data['response']['private_deals']);
-
 
37
		if(isset($data['response']['private_deals'][0]->response->redirectUrl)) {
-
 
38
			redirect($data['response']['private_deals'][0]->response->redirectUrl);
-
 
39
			exit();
-
 
40
		}
36
		//set cache to output or renew cache
41
		//set cache to output or renew cache
37
		if(isset($cachemodule) and !empty($cachemodule))
42
		if(isset($cachemodule) and !empty($cachemodule))
38
		{
43
		{
39
			foreach($cachemodule as $cm)
44
			foreach($cachemodule as $cm)
40
			{
45
			{
Line 45... Line 50...
45
			}
50
			}
46
		}
51
		}
47
		setCache($configdata['module'],$cachemodule,$data['response']);
52
		setCache($configdata['module'],$cachemodule,$data['response']);
48
		$this->lessphp->object()->ccompile('assets/css/pd-list.less','assets/css/pd-list.css');
53
		$this->lessphp->object()->ccompile('assets/css/pd-list.less','assets/css/pd-list.css');
49
		$data['stylesheet'] = 'pd-list.css';
54
		$data['stylesheet'] = 'pd-list.css';
50
		
-
 
-
 
55
		//TODO: Get coupon code from api
-
 
56
		$data['response']['couponcode'] = "saholicdeal";
51
		$this->layout->view('privatedeals/products_view',$data);
57
		$this->layout->view('privatedeals/products_view',$data);
52
	}
58
	}
53
}
59
}
54
60