Subversion Repositories SmartDukaan

Rev

Rev 20389 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20389 Rev 20414
Line 63... Line 63...
63
		$prefix = "SHA".$storeId;
63
		$prefix = "SHA".$storeId;
64
		$tag = $prefix.time();
64
		$tag = $prefix.time();
65
		if($storeId == 2){				
65
		if($storeId == 2){				
66
			$url = "http://dl.flipkart.com/dl/";
66
			$url = "http://dl.flipkart.com/dl/";
67
		} elseif($storeId == 3) {
67
		} elseif($storeId == 3) {
68
			//$url = "http://m.snapdeal.com/products/mobiles?utm_source=aff_prog&utm_campaign=afts&offer_id=17";			
-
 
69
			$url = "https://m.snapdeal.com/products/mobiles";			
68
			$url = "https://m.snapdeal.com/products/mobiles";			
70
		} elseif($storeId == 1){
69
		} elseif($storeId == 1){
71
			$url = "http://www.amazon.in/gp/goldbox";
70
			$url = "http://www.amazon.in/gp/goldbox";
72
		} elseif($storeId == 4) {
71
		} elseif($storeId == 4) {
73
			$url = "http://m.saholic.com";			
72
			$url = "http://m.saholic.com";			
Line 81... Line 80...
81
		if( strpos($url, '?') === false ) {
80
		if( strpos($url, '?') === false ) {
82
			$firstChar = '?';
81
			$firstChar = '?';
83
		} else {
82
		} else {
84
			$firstChar = '&';
83
			$firstChar = '&';
85
		}
84
		}
86
		if($storeId!=3){
-
 
87
			$url .= $firstChar.$store['Store']['affid_param'].'='.$store['Store']['affiliate_id'];
85
		$url .= $firstChar.$store['Store']['affid_param'].'='.$store['Store']['affiliate_id'];
88
			if(!empty($store['Store']['sub_tag_param'])){
86
		if(!empty($store['Store']['sub_tag_param'])){
89
				$url .= '&'.$store['Store']['sub_tag_param'].'='.$tag;
87
			$url .= '&'.$store['Store']['sub_tag_param'].'='.$tag;
90
			}
-
 
91
		}
88
		}
92
		$extras = array('store'=>$store['Store']['name']);
89
		$extras = array('store'=>$store['Store']['name']);
93
		$data = array('user_id'=>$userId,'store_product_id'=>0,'price'=>0,'tag'=>$tag,'url'=>$url,'extras'=>json_encode($extras));
90
		$data = array('user_id'=>$userId,'store_product_id'=>0,'price'=>0,'tag'=>$tag,'url'=>$url,'extras'=>json_encode($extras));
94
		$this->loadModel('Click');
91
		$this->loadModel('Click');
95
		$this->Click->create();
92
		$this->Click->create();