Subversion Repositories SmartDukaan

Rev

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

Rev 15015 Rev 15311
Line 236... Line 236...
236
 * @throws NotFoundException
236
 * @throws NotFoundException
237
 * @param string $id
237
 * @param string $id
238
 * @return void
238
 * @return void
239
 */
239
 */
240
	public function view($id = null,$bundleId=null) {
240
	public function view($id = null,$bundleId=null) {
-
 
241
		$userId = $this->request->query('user_id');
-
 
242
		if(isset($userId) && !empty($userId)){
-
 
243
			$this->loadModel('User');
-
 
244
			$dbuser = $this->User->findById($userId);
-
 
245
			$this->Auth->login($dbuser['User']);
-
 
246
		}
241
		$this->layout = "innerpages";
247
		$this->layout = "innerpages";
242
		$cachekey = 'storeproduct-'.$id;
248
		$cachekey = 'storeproduct-'.$id;
243
		$product = Cache::read($cachekey,'fivemin');
249
		$product = Cache::read($cachekey,'fivemin');
244
		if(empty($product)) {
250
		if(empty($product)) {
245
			$url = $this->apihost.'masterData/getSkuById/'.$id;
251
			$url = $this->apihost.'masterData/getSkuById/'.$id;