Subversion Repositories SmartDukaan

Rev

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

Rev 11845 Rev 11852
Line 56... Line 56...
56
		$this->layout->view('privatedeals/products_view',$data);
56
		$this->layout->view('privatedeals/products_view',$data);
57
	}
57
	}
58
 
58
 
59
	public function getProductList($page=null)
59
	public function getProductList($page=null)
60
	{
60
	{
61
		$page = 1;
-
 
62
		$userId = $this->session->userdata['authorized']['Id'];
61
		$userId = $this->session->userdata['authorized']['Id'];
63
	 	$value = intval($category);
62
	 	$value = intval($category);
64
     	$url = $this->config->item('private_deals');
63
		$url = $this->config->item('private_deals');
65
	  	$url = $url['url'];
64
	  	$url = $url['url'];
66
        $url = $this->config->item('curl_base_url').$url.'/'.$page;	         	
65
		$url = $this->config->item('curl_base_url').$url.'/'.$page;	         	
67
        $configdata =array();
66
		$configdata =array();
68
        $configdata = $this->config->item('privatedeals');
67
		$configdata = $this->config->item('privatedeals');
69
        $response = $this->privatedeal_model->getProducts('',$this->input->post(),$configdata, $userId,$page);
68
		$response = $this->privatedeal_model->getProducts('',$this->input->post(),$configdata, $userId,$page);
70
		$response = $response['response']['private_deals'];	
69
		$response = $response['response']['private_deals'];	
71
		$count = $response[0]->response->count;
70
		$count = $response[0]->response->count;
72
		$productListResponse ='';
71
		$productListResponse ='';
73
		$TotalPage = ceil($count/10);
72
		$TotalPage = ceil($count/10);
74
		if($TotalPage < $page) {$product_list='';}
73
		if($TotalPage < $page) {$product_list='';}
Line 82... Line 81...
82
				{
81
				{
83
						$productListResponse .= '<a class="pd-list" href="'. base_url().$pl->url.'">
82
						$productListResponse .= '<a class="pd-list" href="'. base_url().$pl->url.'">
84
          				<div class="pd-image" style="background:url(\''.$pl->image_url.'\')no-repeat center center;background-size:contain;"></div>
83
          				<div class="pd-image" style="background:url(\''.$pl->image_url.'\')no-repeat center center;background-size:contain;"></div>
85
          					<div class="pd-info">
84
          					<div class="pd-info">
86
            				<div class="pdt-name">'.$pl->title.'</div>
85
            				<div class="pdt-name">'.$pl->title.'</div>
87
           			 		<div class="pdt-price">';
86
           			 		<div class="pdt-price"><span class="pricetype">Site Price</span>';
88
           			 		if(isset($pl->price) || isset($pl->mrp)){
87
           			 		if(isset($pl->price) || isset($pl->mrp)){
89
           			 			$productListResponse .='<span class="pr">Rs</span>';
88
           			 			$productListResponse .='<span class="pr">Rs</span>';
90
           			 			if(isset($pl->mrp) && $pl->mrp != 0){
89
           			 			if(isset($pl->mrp) && $pl->mrp != 0){
91
           			 				$productListResponse .='<span class="pr-linethrough">'.$pl->mrp.'</span>';
90
           			 				$productListResponse .='<span class="pr-linethrough">'.$pl->mrp.'</span>';
92
           			 			}
91
           			 			}
93
           			 			if(isset($pl->price) && $pl->price != 0){
92
           			 			if(isset($pl->price) && $pl->price != 0){
94
           			 				$productListResponse .='<span class="pr-linethrough">'.$pl->price.'</span>';
93
           			 				$productListResponse .='<span class="pr-linethrough">'.$pl->price.'</span>';
95
           			 			}	
94
           			 			}	
96
           			 			if(isset($pl->dealprice) && $pl->dealprice != 0){
-
 
97
           			 				$productListResponse .='<span class="pr-original">'.$pl->dealprice.'</span>';
-
 
98
           			 			}			
-
 
99
           			 		}
95
           			 		}
-
 
96
						if(isset($pl->dealprice) && $pl->dealprice != 0){
-
 
97
							$productListResponse .='</div><div class="pdt-price"><span class="pricetype">Your Price</span><span class="pr">Rs</span> <span class="pr-original">'.$pl->dealprice.'</span>';
-
 
98
						}			
100
           			 		$productListResponse .='</div><div class="pdt-spec">'. $pl->description.' </div>';
99
					$productListResponse .='</div><div class="pdt-spec">'. $pl->description.' </div>';
101
 
100
			
-
 
101
						if(isset($pl->dealcolors) && !empty($pl->dealcolors) && trim($pl->dealcolors[0])!='') {
102
           			 		$productListResponse .= '<div class="pdt-offercolors">Offer available for : '.implode(',',$pl->dealcolors).'</div>';
102
							$productListResponse .= '<div class="pdt-offercolors">Offer available for : '.implode(',',$pl->dealcolors).'</div>';
-
 
103
						}
103
           			 		if(isset($pl->offer_text) && !empty($pl->offer_text)) {
104
           			 		if(isset($pl->offer_text) && !empty($pl->offer_text)) {
104
	           			 		$productListResponse .= '<div class="pdt-offertext">Offer includes : '.$pl->offer_text.'</div>';	
105
	           			 		$productListResponse .= '<div class="pdt-offertext">Offer includes : '.$pl->offer_text.'</div>';	
105
	           			 	}
106
	           			 	}
106
 
107
 
107
           			 		$productListResponse .= '</div></a>';
108
           			 		$productListResponse .= '</div></a>';
Line 111... Line 112...
111
			}
112
			}
112
		}
113
		}
113
		echo $productListResponse;
114
		echo $productListResponse;
114
 
115
 
115
	}
116
	}
116
}
-
 
117
117
}
-
 
118