Subversion Repositories SmartDukaan

Rev

Rev 15403 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15403 Rev 15839
Line 72... Line 72...
72
		$urlpage = $page;
72
		$urlpage = $page;
73
 
73
 
74
		if($page=='home'){
74
		if($page=='home'){
75
			$urlpage =1;
75
			$urlpage =1;
76
		}
76
		}
-
 
77
		$showCategories = True;
-
 
78
		if($urlpage ==1){
-
 
79
			$showCategories = True;
-
 
80
		}else{
-
 
81
			$showCategories = False;
77
 
82
		}
78
		$url = $this->getDealsApiUrl($urlpage,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands);
83
		$url = $this->getDealsApiUrl($urlpage,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands);
79
		// $url = $this->apihost.'deals/'.$this->Auth->User('id').'?categoryId='.$id;
84
		// $url = $this->apihost.'deals/'.$this->Auth->User('id').'?categoryId='.$id;
80
		
85
		
81
		$deals = $this->make_request($url,null);
86
		$deals = $this->make_request($url,null);
82
		$this->loadModel('Api');
87
		$this->loadModel('Api');
Line 84... Line 89...
84
		// $deals = $apideals['products'];
89
		// $deals = $apideals['products'];
85
		
90
		
86
	    	  
91
	    	  
87
	  	$storeicons = Configure::read('storeicons');
92
	  	$storeicons = Configure::read('storeicons');
88
 
93
 
89
		$this->set(compact('page', 'subpage', 'title_for_layout', 'description', 'deals','campaigns','id','sort','direction','storeicons'));
94
		$this->set(compact('page', 'subpage', 'title_for_layout', 'description', 'deals','campaigns','id','sort','direction','storeicons','showCategories'));
90
		try {
95
		try {
91
			$this->render(implode('/', $path));
96
			$this->render(implode('/', $path));
92
		} catch (MissingViewException $e) {
97
		} catch (MissingViewException $e) {
93
			if (Configure::read('debug')) {
98
			if (Configure::read('debug')) {
94
				throw $e;
99
				throw $e;
95
			}
100
			}
96
			throw new NotFoundException();
101
			throw new NotFoundException();
97
		}
102
		}
98
	}
103
	}
-
 
104
 
-
 
105
	public function about() {
-
 
106
	}
-
 
107
 
-
 
108
	public function faq() {
-
 
109
	}
99
	/*
110
	/*
100
	public function display() {
111
	public function display() {
101
		$page = $this->request->query('page');
112
		$page = $this->request->query('page');
102
		if(!isset($page)){
113
		if(!isset($page)){
103
			$page = 1;
114
			$page = 1;