| Line 16... |
Line 16... |
| 16 |
$sourceMap[1] = array('name'=>'amazon');
|
16 |
$sourceMap[1] = array('name'=>'amazon');
|
| 17 |
$sourceMap[2] = array('name'=>'flipkart');
|
17 |
$sourceMap[2] = array('name'=>'flipkart');
|
| 18 |
$sourceMap[3] = array('name'=>'snapdeal');
|
18 |
$sourceMap[3] = array('name'=>'snapdeal');
|
| 19 |
$sourceMap[5] = array('name'=>'shopclues');
|
19 |
$sourceMap[5] = array('name'=>'shopclues');
|
| 20 |
$sourceMap[6] = array('name'=>'paytm');
|
20 |
$sourceMap[6] = array('name'=>'paytm');
|
| - |
|
21 |
$sourceImg = base_url()."assets/images/sources/";
|
| 21 |
|
22 |
|
| 22 |
|
23 |
|
| 23 |
if(isset($product_details_d->entity) && !empty($product_details_d->entity)){
|
24 |
if(isset($product_details_d->entity) && !empty($product_details_d->entity)){
|
| 24 |
$product_detail = $product_details_d->entity;
|
25 |
$product_detail = $product_details_d->entity;
|
| 25 |
if(isset($product_detail->items) && !empty($product_detail->items)) {
|
26 |
if(isset($product_detail->items) && !empty($product_detail->items)) {
|
| 26 |
$i=0;
|
27 |
$i=0;
|
| - |
|
28 |
$instock = false;
|
| 27 |
foreach ($product_detail->items as $item){
|
29 |
foreach ($product_detail->items as $item){
|
| - |
|
30 |
if($item->buttonText=='BUY NOW'){
|
| - |
|
31 |
$instock = true;
|
| - |
|
32 |
}
|
| 28 |
if(isset($item->color) && !empty($item->color) && $item->buttonText=='BUY NOW'){
|
33 |
if(isset($item->color) && !empty($item->color) && $item->buttonText=='BUY NOW'){
|
| 29 |
$color[$i]['color'] = $item->color;
|
34 |
$color[$i]['color'] = $item->color;
|
| 30 |
$color[$i]['id'] = $item->id;
|
35 |
$color[$i]['id'] = $item->id;
|
| 31 |
$i++;
|
36 |
$i++;
|
| 32 |
}
|
37 |
}
|
| Line 90... |
Line 95... |
| 90 |
return $a->map->available_price >=$b->map->available_price;
|
95 |
return $a->map->available_price >=$b->map->available_price;
|
| 91 |
}
|
96 |
}
|
| 92 |
$storeObj = $product_detail->dtrAffiliateJSON->map->products->myArrayList;
|
97 |
$storeObj = $product_detail->dtrAffiliateJSON->map->products->myArrayList;
|
| 93 |
usort( $storeObj , callback );
|
98 |
usort( $storeObj , callback );
|
| 94 |
?>
|
99 |
?>
|
| 95 |
<?php if(isset($color) && !empty($color) && count($color)>0){?>
|
100 |
<?php if($instock){?>
|
| 96 |
<div class="price-hldr" itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
|
101 |
<div class="price-hldr" itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
|
| 97 |
<meta itemprop="priceCurrency" content="INR" />
|
102 |
<meta itemprop="priceCurrency" content="INR" />
|
| 98 |
<meta itemprop="condition" content="new"/>
|
103 |
<meta itemprop="condition" content="new"/>
|
| 99 |
<?php if(!isset($product_detail->items[0]->dealPrice) || empty($authorized['isPrivateDealUser'])):?>
|
104 |
<?php if(!isset($product_detail->items[0]->dealPrice) || empty($authorized['isPrivateDealUser'])):?>
|
| 100 |
<?php if(isset($product_detail->items[0]->mrp) || isset($product_detail->items[0]->sellingPrice)){?>
|
105 |
<?php if(isset($product_detail->items[0]->mrp) || isset($product_detail->items[0]->sellingPrice)){?>
|
| Line 136... |
Line 141... |
| 136 |
<div id='comingSoon' style="display:<?php if(isset($product_detail->items[0]->comingSoon) && $product_detail->items[0]->comingSoon == 1){echo 'block';} else {echo 'none';};?>;color:red;">Coming Soon</div>
|
141 |
<div id='comingSoon' style="display:<?php if(isset($product_detail->items[0]->comingSoon) && $product_detail->items[0]->comingSoon == 1){echo 'block';} else {echo 'none';};?>;color:red;">Coming Soon</div>
|
| 137 |
<?php endif;?>
|
142 |
<?php endif;?>
|
| 138 |
</div><!--price-hldr-->
|
143 |
</div><!--price-hldr-->
|
| 139 |
</div><!--pd-price-cont-->
|
144 |
</div><!--pd-price-cont-->
|
| 140 |
<input type="text" id="email" onFocus="clearError()" value="<?php if(isset($email) && !empty($email)) {echo $email;}?>" style="display:<?php if(strcasecmp($product_detail->items[0]->buttonText, 'notify me') == 0){ echo 'block';} else{ echo 'none';}?>" placeholder="Enter email address to recieve notification">
|
145 |
<input type="text" id="email" onFocus="clearError()" value="<?php if(isset($email) && !empty($email)) {echo $email;}?>" style="display:<?php if(strcasecmp($product_detail->items[0]->buttonText, 'notify me') == 0){ echo 'block';} else{ echo 'none';}?>" placeholder="Enter email address to recieve notification">
|
| 141 |
<div id="buy" onclick="goToStore('<?=$boxItem->store_id?>','<?=$boxItem->marketPlaceUrl?>')"class="buy-now btn">
|
146 |
<div id="buy" onclick="addToCart()" class="buy-now btn">
|
| 142 |
<?php echo $product_detail->items[0]->buttonText; ?>
|
147 |
<?php echo $product_detail->items[0]->buttonText; ?>
|
| 143 |
</div>
|
148 |
</div>
|
| 144 |
<div class="pincode-container">
|
149 |
<div class="pincode-container">
|
| 145 |
<div class="check-aval">
|
150 |
<div class="check-aval">
|
| 146 |
<!-- <div>Check delivery time for Area PIN Code</div> -->
|
151 |
<!-- <div>Check delivery time for Area PIN Code</div> -->
|
| Line 163... |
Line 168... |
| 163 |
</div>
|
168 |
</div>
|
| 164 |
|
169 |
|
| 165 |
<?php } else{
|
170 |
<?php } else{
|
| 166 |
$boxItem = array_shift($storeObj);
|
171 |
$boxItem = array_shift($storeObj);
|
| 167 |
$boxItem = $boxItem->map;
|
172 |
$boxItem = $boxItem->map;
|
| 168 |
$sourceImg = base_url()."assets/images/sources/";
|
- |
|
| 169 |
?>
|
173 |
?>
|
| 170 |
<div class="price-hldr" itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
|
174 |
<div class="price-hldr" itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
|
| 171 |
<meta itemprop="priceCurrency" content="INR" />
|
175 |
<meta itemprop="priceCurrency" content="INR" />
|
| 172 |
<meta itemprop="condition" content="new"/>
|
176 |
<meta itemprop="condition" content="new"/>
|
| 173 |
<img style="vertical-align:middle" src="<?=$sourceImg.$sourceMap[$boxItem->source_id]['name']?>.png"/>
|
177 |
<img style="vertical-align:middle" src="<?=$sourceImg.$sourceMap[$boxItem->source_id]['name']?>.png"/>
|
| Line 177... |
Line 181... |
| 177 |
|
181 |
|
| 178 |
|
182 |
|
| 179 |
</div><!--price-hldr-->
|
183 |
</div><!--price-hldr-->
|
| 180 |
</div><!--pd-price-cont-->
|
184 |
</div><!--pd-price-cont-->
|
| 181 |
<div id="buy" onclick="goToStore('<?=$boxItem->store_id?>','<?=$boxItem->marketPlaceUrl?>')"class="buy-now btn">BUY NOW</div>
|
185 |
<div id="buy" onclick="goToStore('<?=$boxItem->store_id?>','<?=$boxItem->marketPlaceUrl?>')"class="buy-now btn">BUY NOW</div>
|
| - |
|
186 |
|
| - |
|
187 |
<?php } if(count($storeObj)>0) {?>
|
| - |
|
188 |
|
| 182 |
<div class="pd-tab clearfix" style="text-align: center">Prices On Other Stores</div>
|
189 |
<div class="pd-tab clearfix" style="text-align: center">Prices On Other Stores</div>
|
| 183 |
<div class="clearfix"></div>
|
190 |
<div class="clearfix"></div>
|
| 184 |
<?php
|
191 |
<?php
|
| 185 |
$storeItemMap = array();
|
192 |
$storeItemMap = array();
|
| 186 |
foreach ($storeObj as $storeItem){
|
193 |
foreach ($storeObj as $storeItem){
|
| Line 189... |
Line 196... |
| 189 |
if (!isset($storeItemMap[$storeItem->map->source_id])){
|
196 |
if (!isset($storeItemMap[$storeItem->map->source_id])){
|
| 190 |
$storeItemMap[$storeItem->map->source_id] = array();
|
197 |
$storeItemMap[$storeItem->map->source_id] = array();
|
| 191 |
}
|
198 |
}
|
| 192 |
array_push($storeItemMap[$storeItem->map->source_id],$storeItem->map);
|
199 |
array_push($storeItemMap[$storeItem->map->source_id],$storeItem->map);
|
| 193 |
}
|
200 |
}
|
| 194 |
?>
|
- |
|
| 195 |
<?php foreach ($storeItemMap as $sourceId=>$sourceItems){
|
201 |
foreach ($storeItemMap as $sourceId=>$sourceItems){
|
| 196 |
$storeItemCount = count($sourceItems);
|
202 |
$storeItemCount = count($sourceItems);
|
| 197 |
$oneLess = $storeItemCount - 1;?>
|
203 |
$oneLess = $storeItemCount - 1;?>
|
| 198 |
<div id="source_<?=$sourceId ?>" class="div-detail clearfix";text-align:center">
|
204 |
<div id="source_<?=$sourceId ?>" class="div-detail clearfix";text-align:center">
|
| 199 |
<span><img style="vertical-align:middle;margin:2px 1% 2px 1%" src="<?=$sourceImg.$sourceMap[$sourceId]['name']?>.png"/></span>
|
205 |
<span><img style="vertical-align:middle;margin:2px 1% 2px 1%" src="<?=$sourceImg.$sourceMap[$sourceId]['name']?>.png"/></span>
|
| - |
|
206 |
<?php if ($oneLess>0){?>
|
| 200 |
<span onclick="toggleoffers('source_<?=$sourceId?>')" style="color:blue;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;"><?=$oneLess?> More Options(<span class="mk_sign">+</span>)</span>
|
207 |
<span onclick="toggleoffers('source_<?=$sourceId?>')" style="color:blue;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;"><?=$oneLess?> More Options(<span class="mk_sign">+</span>)</span>
|
| - |
|
208 |
<?php }
|
| - |
|
209 |
$a=0;
|
| 201 |
<?php $a=0; foreach ($sourceItems as $sourceItem){
|
210 |
foreach ($sourceItems as $sourceItem){
|
| 202 |
if($a==0){$a=1;?>
|
211 |
if($a==0){$a=1;
|
| - |
|
212 |
?>
|
| 203 |
<div class="div-detail clearfix" style="height:25px;padding:0px 0 5px 3px;text-align:center">
|
213 |
<div class="div-detail clearfix" style="height:25px;padding:0px 0 5px 3px;text-align:center">
|
| 204 |
<span style='color:#555555;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;margin:0px 1% 5px 1%;width:40%;display:inline-block'><?php echo $sourceItem->source_product_name?></span>
|
214 |
<span style='color:#555555;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;margin:0px 1% 5px 1%;width:40%;display:inline-block'><?php echo $sourceItem->source_product_name?></span>
|
| 205 |
<span style='color:orange;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;margin:0px 1% 0px 1%;display:inline-block;width:13%'>₹ <?php echo $sourceItem->available_price?></span>
|
215 |
<span style='color:orange;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;margin:0px 1% 0px 1%;display:inline-block;width:13%'>₹ <?php echo $sourceItem->available_price?></span>
|
| 206 |
<span onClick="goToStore(<?=$sourceItem->source_id?>, <?=$sourceItem->available_price?>,'<?=$sourceItem->marketPlaceUrl?>')" class="buy-now btn" style="font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;padding:4px;display:inline-block;width:24%;margin:0px 1% 0px 1%;">Go To Store</span>
|
216 |
<span onClick="goToStore(<?=$sourceItem->source_id?>, <?=$sourceItem->available_price?>,'<?=$sourceItem->marketPlaceUrl?>')" class="buy-now btn" style="font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;padding:4px;display:inline-block;width:24%;margin:0px 1% 0px 1%;">Go To Store</span>
|
| 207 |
<?php } else {?>
|
217 |
<?php } else {?>
|
| 208 |
<div class="div-detail clearfix mk_canhide" style="height:40px;padding:5px 0 0 3px;text-align:center;display:none">
|
218 |
<div class="div-detail clearfix mk_canhide" style="height:40px;padding:5px 0 0 3px;text-align:center;display:none">
|
| 209 |
<span style='color:#555555;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;margin:5px 1% 5px 1%;width:40%;display:inline-block'><?php echo $sourceItem->source_product_name?></span>
|
219 |
<span style='color:#555555;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;margin:5px 1% 5px 1%;width:40%;display:inline-block'><?php echo $sourceItem->source_product_name?></span>
|
| 210 |
<span style='color:orange;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;margin:5px 1% 5px 1%;display:inline-block;width:13%'>₹ <?php echo $sourceItem->available_price?></span>
|
220 |
<span style='color:orange;font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;margin:5px 1% 5px 1%;display:inline-block;width:13%'>₹ <?php echo $sourceItem->available_price?></span>
|
| 211 |
<span onClick="goToStore(<?=$sourceItem->source_id?>, <?=$sourceItem->available_price?>,'<?=$sourceItem->marketPlaceUrl?>')" class="buy-now btn" style="font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;padding:4px;display:inline-block;width:24%;margin:8px 1% 8px 1%;">Go To Store</span>
|
221 |
<span onClick="goToStore(<?=$sourceItem->source_id?>, <?=$sourceItem->available_price?>,'<?=$sourceItem->marketPlaceUrl?>')" class="buy-now btn" style="font:normal 1.2em/1.1em Helvetica, Arial, sans-serif;padding:4px;display:inline-block;width:24%;margin:8px 1% 8px 1%;">Go To Store</span>
|
| 212 |
<?php }?>
|
222 |
<?php }?>
|
| 213 |
</div>
|
223 |
</div>
|
| 214 |
<?php }?>
|
224 |
<?php }?>
|
| 215 |
</div>
|
225 |
</div>
|
| 216 |
<hr class="style-two"/>
|
226 |
<hr class="style-two"/>
|
| 217 |
<?php }?>
|
227 |
<?php }}?>
|
| 218 |
<?php }?>
|
- |
|
| 219 |
|
228 |
|
| 220 |
|
229 |
|
| 221 |
<div class="pd-tab clearfix" >
|
230 |
<div class="pd-tab clearfix" >
|
| 222 |
<span>Highlights</span>
|
231 |
<span>Highlights</span>
|
| 223 |
<!-- <span>+</span> -->
|
232 |
<!-- <span>+</span> -->
|