Subversion Repositories SmartDukaan

Rev

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

Rev 13633 Rev 13683
Line 87... Line 87...
87
		$this->layout = 'ajax';
87
		$this->layout = 'ajax';
88
		$limit = 20;
88
		$limit = 20;
89
		$this->StoreProduct->recursive = -1;
89
		$this->StoreProduct->recursive = -1;
90
		$count = $this->StoreProduct->find('count');
90
		$count = $this->StoreProduct->find('count');
91
		$this->StoreProduct->Behaviors->attach('Containable');
91
		$this->StoreProduct->Behaviors->attach('Containable');
92
		$this->Paginator->settings = array('conditions'=>array('source'=>'Snapdeal','stock' => 'In Stock'),'order'=>array('mrp'=>'asc'),'contain'=>array('Product'),'limit'=>$limit,'fields'=>array('Product.category_id','StoreProduct.id','StoreProduct.title','StoreProduct.thumbnail','StoreProduct.price','StoreProduct.cashback','StoreProduct.available_price','Product.name'));
92
		$this->Paginator->settings = array('conditions'=>array('source'=>'Flipkart','stock' => 'In Stock'),'order'=>array('mrp'=>'asc'),'contain'=>array('Product'),'limit'=>$limit,'fields'=>array('Product.category_id','StoreProduct.id','StoreProduct.title','StoreProduct.thumbnail','StoreProduct.price','StoreProduct.cashback','StoreProduct.available_price','Product.name'));
93
		$result = array('products' => $this->Paginator->paginate(),'maxresults'=>ceil($count/$limit));
93
		$result = array('products' => $this->Paginator->paginate(),'maxresults'=>ceil($count/$limit));
94
		$callback = $this->request->query('callback');
94
		$callback = $this->request->query('callback');
95
		$this->set(array(
95
		$this->set(array(
96
		    'result' => $result,
96
		    'result' => $result,
97
		    'callback' => $callback,
97
		    'callback' => $callback,