Subversion Repositories SmartDukaan

Rev

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

Rev 14654 Rev 14786
Line 55... Line 55...
55
		}
55
		}
56
		$storeId = $this->request->query('store_id');
56
		$storeId = $this->request->query('store_id');
57
		$cachekey = 'store-'.$storeId;
57
		$cachekey = 'store-'.$storeId;
58
		$store = Cache::read($cachekey,'month');
58
		$store = Cache::read($cachekey,'month');
59
		if(empty($store)) {
59
		if(empty($store)) {
60
			$store = $this->Store->find('first',array('recursive'=>-1,'conditions'=>array('id'=>$storeProduct['source_id'])));
60
			$store = $this->Store->find('first',array('recursive'=>-1,'conditions'=>array('id'=>$storeId)));
61
			Cache::write($cachekey,$store,'month');			
61
			Cache::write($cachekey,$store,'month');			
62
		}
62
		}
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/?utm_source=aff_prog&utm_campaign=afts&offer_id=17";			
68
			$url = "http://m.snapdeal.com/?utm_source=aff_prog&utm_campaign=afts&offer_id=17";			
69
		} elseif($storeId == 1){
69
		} elseif($storeId == 1){
70
			$url = "http://amazon.in";
70
			$url = "http://www.amazon.in/gp/goldbox";
71
		}
71
		}
72
		if( strpos($url, '?') === false ) {
72
		if( strpos($url, '?') === false ) {
73
			$firstChar = '?';
73
			$firstChar = '?';
74
		} else {
74
		} else {
75
			$firstChar = '&';
75
			$firstChar = '&';