Subversion Repositories SmartDukaan

Rev

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

Rev 14302 Rev 14316
Line 64... Line 64...
64
				$product = $this->make_request($url,null);
64
				$product = $this->make_request($url,null);
65
				Cache::write($cachekey,$product,'five');			
65
				Cache::write($cachekey,$product,'five');			
66
			}
66
			}
67
			$storeProduct = json_decode($product[0],1);
67
			$storeProduct = json_decode($product[0],1);
68
			$cachekey = 'store-'.$storeProduct['source_id'];
68
			$cachekey = 'store-'.$storeProduct['source_id'];
69
			$store = Cache::read($cachekey,'month');
69
//			$store = Cache::read($cachekey,'month');
70
			if(empty($store)) {
70
			if(empty($store)) {
71
				$store = $this->Store->find('first',array('recursive'=>-1,'conditions'=>array('id'=>$storeProduct['source_id'])));
71
				$store = $this->Store->find('first',array('recursive'=>-1,'conditions'=>array('id'=>$storeProduct['source_id'])));
72
				Cache::write($cachekey,$store,'month');			
72
				Cache::write($cachekey,$store,'month');			
73
			}
73
			}
74
			$prefix = "SHA".$storeProduct['source_id'];
74
			$prefix = "SHA".$storeProduct['source_id'];
Line 84... Line 84...
84
					$url = "http://m.snapdeal.com".$url_parts['path'].'?utm_source=aff_prog&utm_campaign=afts&offer_id=17';
84
					$url = "http://m.snapdeal.com".$url_parts['path'].'?utm_source=aff_prog&utm_campaign=afts&offer_id=17';
85
				}
85
				}
86
			} elseif($storeProduct['source_id'] == 4){
86
			} elseif($storeProduct['source_id'] == 4){
87
				$next = "&next=".str_replace('www','m',$storeProduct['marketPlaceUrl']);	
87
				$next = "&next=".str_replace('www','m',$storeProduct['marketPlaceUrl']);	
88
				$url = $this->getAutoLoginUrl($userId,$next);
88
				$url = $this->getAutoLoginUrl($userId,$next);
-
 
89
				$url .= '?utm_source=profitmandi';
89
			}else{
90
			}else{
90
				$url = $storeProduct['marketPlaceUrl'];
91
				$url = $storeProduct['marketPlaceUrl'];
91
			}
92
			}
92
			if( strpos($url, '?') === false ) {
93
			if( strpos($url, '?') === false ) {
93
				$firstChar = '?';
94
				$firstChar = '?';