Subversion Repositories SmartDukaan

Rev

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

Rev 14150 Rev 14163
Line 71... Line 71...
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'];
75
			$tag = $prefix.time();
75
			$tag = $prefix.time();
76
			if($storeProduct['source_id'] == 2){
76
			if($storeProduct['source_id'] == 2){				
77
				// $url_parts = parse_url($storeProduct['marketPlaceUrl']);
-
 
78
/*
-
 
79
				if(isset($url_parts['query'])) {
-
 
80
					$url = "http://m.flipkart.com".$url_parts['path'].'?'.$url_parts['query'];
-
 
81
				}else{
-
 
82
					$url = "http://m.flipkart.com".$url_parts['path'];
-
 
83
				}
-
 
84
*/
-
 
85
				$url = str_replace('www','m',$storeProduct['marketPlaceUrl']);
77
				$url = str_replace('www','m',$storeProduct['marketPlaceUrl']);
86
			} elseif($storeProduct['source_id'] == 3) {
78
			} elseif($storeProduct['source_id'] == 3) {
87
				$url_parts = parse_url($storeProduct['marketPlaceUrl']);
79
				$url_parts = parse_url($storeProduct['marketPlaceUrl']);
88
				$url_parts['path'] = str_replace('viewAllSellers/','',$url_parts['path']);//quickfix for snapdeal
80
				$url_parts['path'] = str_replace('viewAllSellers/','',$url_parts['path']);//quickfix for snapdeal
89
				if(isset($url_parts['query'])) {
81
				if(isset($url_parts['query'])) {
90
					$url = "http://m.snapdeal.com".$url_parts['path'].'?'.$url_parts['query']."&utm_source=aff_prog&utm_campaign=afts&offer_id=17";
82
					$url = "http://m.snapdeal.com".$url_parts['path'].'?'.$url_parts['query']."&utm_source=aff_prog&utm_campaign=afts&offer_id=17";
91
				}else{
83
				}else{
92
					$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';
93
				}
85
				}
94
			} elseif($storeProduct['source_id'] == 4){
86
			} elseif($storeProduct['source_id'] == 4){
95
				$next = "&next=".$storeProduct['marketPlaceUrl'];					
87
				$next = "&next=".str_replace('www','m',$storeProduct['marketPlaceUrl']);	
96
				$url = $this->getAutoLoginUrl($userId,$next);
88
				$url = $this->getAutoLoginUrl($userId,$next);
97
			}else{
89
			}else{
98
				$url = $storeProduct['marketPlaceUrl'];
90
				$url = $storeProduct['marketPlaceUrl'];
99
			}
91
			}
100
			if( strpos($url, '?') === false ) {
92
			if( strpos($url, '?') === false ) {