| Line 54... |
Line 54... |
| 54 |
//Get StoreProduct Info
|
54 |
//Get StoreProduct Info
|
| 55 |
$this->loadModel('StoreProduct');
|
55 |
$this->loadModel('StoreProduct');
|
| 56 |
$options = array('conditions'=>array('id'=>$storeProductId),'fields'=>array('store_id','available_price','url'),'recursive'=>-1);
|
56 |
$options = array('conditions'=>array('id'=>$storeProductId),'fields'=>array('store_id','available_price','url'),'recursive'=>-1);
|
| 57 |
$storeProduct = $this->StoreProduct->find('first',$options);
|
57 |
$storeProduct = $this->StoreProduct->find('first',$options);
|
| 58 |
$store = $this->StoreProduct->Store->find('first',array('recursive'=>-1,'conditions'=>array('id'=>$storeProduct['StoreProduct']['store_id'])));
|
58 |
$store = $this->StoreProduct->Store->find('first',array('recursive'=>-1,'conditions'=>array('id'=>$storeProduct['StoreProduct']['store_id'])));
|
| 59 |
$prefix = "DTR".$storeProduct['StoreProduct']['store_id'];
|
59 |
$prefix = "SHA".$storeProduct['StoreProduct']['store_id'];
|
| 60 |
$tag = uniqid($prefix);
|
60 |
$tag = $prefix.time();
|
| 61 |
if($storeProduct['StoreProduct']['store_id'] == 2){
|
61 |
if($storeProduct['StoreProduct']['store_id'] == 2){
|
| 62 |
$url = str_replace('http://www', 'http://dl', $storeProduct['StoreProduct']['url']);
|
62 |
$url = str_replace('http://www', 'http://dl', $storeProduct['StoreProduct']['url']);
|
| 63 |
}else{
|
63 |
}else{
|
| 64 |
$url = $storeProduct['StoreProduct']['url'];
|
64 |
$url = $storeProduct['StoreProduct']['url'];
|
| 65 |
}
|
65 |
}
|