| Line 42... |
Line 42... |
| 42 |
//print_r($itemcode);
|
42 |
//print_r($itemcode);
|
| 43 |
if(!is_numeric($itemcode)){
|
43 |
if(!is_numeric($itemcode)){
|
| 44 |
redirect(base_url());
|
44 |
redirect(base_url());
|
| 45 |
}
|
45 |
}
|
| 46 |
$productinfo = 'productinfo'.$itemcode;
|
46 |
$productinfo = 'productinfo'.$itemcode;
|
| - |
|
47 |
log_message('debug', "File cache called");
|
| 47 |
$cache = getFIleCache($productinfo);
|
48 |
$cache = getFileCache($productinfo);
|
| 48 |
if(isset($cache) && !empty($cache)){
|
49 |
if(isset($cache) && !empty($cache)){
|
| 49 |
$data['response'] = $cache;
|
50 |
$data['response'] = $cache;
|
| 50 |
}else{
|
51 |
}else{
|
| 51 |
$data['response']=$this->productinfo_model->getProducts($this->input->get(),$this->input->post(),$configdata['module'],$itemcode);
|
52 |
$data['response']=$this->productinfo_model->getProducts($this->input->get(),$this->input->post(),$configdata['module'],$itemcode);
|
| 52 |
if(isset($data['response']['response']['product_details']) && !empty($data['response']['response']['product_details']))
|
53 |
if(isset($data['response']['response']['product_details']) && !empty($data['response']['response']['product_details']))
|
| Line 108... |
Line 109... |
| 108 |
}
|
109 |
}
|
| 109 |
$metaDescription = $data['response']['response']['product_details'][0]->entity->metaDescription;
|
110 |
$metaDescription = $data['response']['response']['product_details'][0]->entity->metaDescription;
|
| 110 |
if(isset($metaDescription) && !empty($metaDescription)){
|
111 |
if(isset($metaDescription) && !empty($metaDescription)){
|
| 111 |
$data['metaDescription'] = $metaDescription;
|
112 |
$data['metaDescription'] = $metaDescription;
|
| 112 |
}
|
113 |
}
|
| 113 |
/*$subView = $this->session->userdata('subView');
|
- |
|
| 114 |
if(isset($subView) && !empty($subView))
|
- |
|
| 115 |
{
|
- |
|
| 116 |
$data['subView'] = $subView;
|
- |
|
| 117 |
}
|
- |
|
| 118 |
elseif(mt_rand(1,2) % 2)
|
- |
|
| 119 |
{
|
- |
|
| 120 |
$data['subView'] = 'a';
|
- |
|
| 121 |
$this->session->set_userdata('subView','a');
|
- |
|
| 122 |
}
|
- |
|
| 123 |
else
|
- |
|
| 124 |
{
|
- |
|
| 125 |
$data['subView'] = 'b';
|
- |
|
| 126 |
$this->session->set_userdata('subView','b');
|
- |
|
| 127 |
}*/
|
- |
|
| 128 |
//echo print_r($entity->dtrAffiliateJSON);
|
- |
|
| 129 |
$data['subView'] = 'b';
|
114 |
$data['subView'] = 'b';
|
| 130 |
if(!empty($entity->exclusiveAffiliateInfo[0])) {
|
115 |
if(!empty($entity->exclusiveAffiliateInfo[0])) {
|
| 131 |
$data['subView'] = 'c';
|
116 |
$data['subView'] = 'c';
|
| 132 |
}elseif(!empty($entity->dtrAffiliateJSON) && !empty($entity->dtrAffiliateJSON->map->products) && !empty($entity->dtrAffiliateJSON->map->products->myArrayList)){
|
117 |
}elseif(!empty($entity->dtrAffiliateJSON) && !empty($entity->dtrAffiliateJSON->map->products) && !empty($entity->dtrAffiliateJSON->map->products->myArrayList)){
|
| 133 |
//print_r($entity->dtrAffiliateJSON->map->products);
|
- |
|
| 134 |
$data['subView'] = 'd';
|
118 |
$data['subView'] = 'd';
|
| 135 |
}
|
119 |
}
|
| 136 |
$this->layout->view('productinfo/productinfo_view',$data);
|
120 |
$this->layout->view('productinfo/productinfo_view',$data);
|
| 137 |
}
|
121 |
}
|
| 138 |
else{
|
122 |
else{
|