Subversion Repositories SmartDukaan

Rev

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

Rev 17656 Rev 18165
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";			
68
			//$url = "http://m.snapdeal.com/products/mobiles?utm_source=aff_prog&utm_campaign=afts&offer_id=17";			
-
 
69
			$url = "http://m.snapdeal.com/products/mobiles";			
69
		} elseif($storeId == 1){
70
		} elseif($storeId == 1){
70
			$url = "http://www.amazon.in/gp/goldbox";
71
			$url = "http://www.amazon.in/gp/goldbox";
71
		} elseif($storeId == 4) {
72
		} elseif($storeId == 4) {
72
			$url = "http://m.saholic.com";			
73
			$url = "http://m.saholic.com";			
73
		} elseif($storeId==5){
74
		} elseif($storeId==5){
Line 80... Line 81...
80
		if( strpos($url, '?') === false ) {
81
		if( strpos($url, '?') === false ) {
81
			$firstChar = '?';
82
			$firstChar = '?';
82
		} else {
83
		} else {
83
			$firstChar = '&';
84
			$firstChar = '&';
84
		}
85
		}
-
 
86
		if($storeId!=3){
85
		$url .= $firstChar.$store['Store']['affid_param'].'='.$store['Store']['affiliate_id'];
87
			$url .= $firstChar.$store['Store']['affid_param'].'='.$store['Store']['affiliate_id'];
86
		if(!empty($store['Store']['sub_tag_param'])){
88
			if(!empty($store['Store']['sub_tag_param'])){
87
			$url .= '&'.$store['Store']['sub_tag_param'].'='.$tag;
89
				$url .= '&'.$store['Store']['sub_tag_param'].'='.$tag;
-
 
90
			}
88
		}
91
		}
89
		$extras = array('store'=>$store['Store']['name']);
92
		$extras = array('store'=>$store['Store']['name']);
90
		$data = array('user_id'=>$userId,'store_product_id'=>0,'price'=>0,'tag'=>$tag,'url'=>$url,'extras'=>json_encode($extras));
93
		$data = array('user_id'=>$userId,'store_product_id'=>0,'price'=>0,'tag'=>$tag,'url'=>$url,'extras'=>json_encode($extras));
91
		$this->loadModel('Click');
94
		$this->loadModel('Click');
92
		$this->Click->create();
95
		$this->Click->create();