Subversion Repositories SmartDukaan

Rev

Rev 19344 | Blame | Compare with Previous | Last modification | View Log | RSS feed


<div class="subcard">
        <div class="col-xs-4 productimage">
          <?php if($key == 0):?>
                  <div class="img-overlay">
                  <div class="product_actions likeit" data-id="<?php echo $deal['_id'];?>" name="likediv_<?php echo $deal['_id'];?>">
                    <span class="likedeal <?php if(isset($likedDeals[$deal['_id']])):?>active<?php endif;?>">
                    </span>
                  </div>
                  <div class="productthumb accsproduct" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">
                  <img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo urlencode($deal['thumbnail']);?>&h=100&q=95" />
                  </div>
                  <div class="product_actions dislikeit" data-id="<?php echo $deal['_id'];?>" name="dislikediv_<?php echo $deal['_id'];?>">
                    <span class="dislikedeal <?php if(isset($disLikedDeals[$deal['_id']])):?>active<?php endif;?>">
                    </span>
                  </div>
                  
                          </div>
          
                <?php else:?>
                  <span class="pull-right arrowright"></span>
                <?php endif;?>
          
        </div>

                <div class="col-xs-8 <?php if($key == 0):?>productdetails<?php else:?>productsmalldetails<?php endif;?>" data-id="<?php echo $deal['_id'];?>">
                        <?php if($key == 0):?>
                        <div class="product_title">
                        <h5 class="producttitle accsproduct" data-id="<?php echo $deal['_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">
                <?php echo $deal['source_product_name'];?>
                        </h5>
                        </div>
                        
                        <?php endif;?>
                        <div class="col-xs-6 productpricedetails" style="position:relative;min-height:70px;padding-bottom:20px;">
                                <?php if($key == 0):?>
                                <div class="accsproduct <?php if(strlen(strip_tags($deal['tagline'],'<p>')) == strlen($deal['tagline'])):?>product_short_description<?php endif;?> <?php if(!isset($deal['tagline'])):?>hidden<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>"  data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
                    <?php //echo $deal['tagline'];?>
                    <?php 
                        $str1=preg_replace('/<\/p>/i', '', $deal['tagline']);
                        if($str1 != $deal['tagline']) {
                          $str=preg_replace('/<p[^>]*>/i', '', $str1);
                          echo $str;
                        } else {
                          echo $deal['tagline'];
                        }
                    ?>
                        </div>
                        <?php endif;?>
                                <?php if((isset($deal['showMrp']) && ($deal['showMrp']==1) && isset($deal['mrp']) && ($deal['mrp']>0))) :?>
                          <div class="text-small">
                            
                            <?php if(isset($deal['showMrp']) && ($deal['showMrp']==1) && isset($deal['mrp']) && ($deal['mrp']>0)):?>
                              <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
                                MRP &#8377; <?php echo round(($deal['mrp']/$deal['quantity']), 2);?>/- per unit.
                    <!-- (Total <span class="cashbackrupee"></span> <?php //echo $deal['mrp']?>) -->
                              <?php else:?> 
                                MRP &#8377; <?php echo $deal['mrp'];?>
                              <?php endif;?>
                            <?php endif;?>
                
                          </div>
                           <?php endif;?>

                                  <?php if($key == 0 && isset($deal['showDp']) && $deal['showDp']==1 && !empty($deal['dp'])):?>
                                              <div class="dp <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-price="<?php echo intval($deal['available_price']);?>" style="margin-top:2px;">DP &#8377; <?php echo $deal['dp'];?></div>
                              <?php endif;?>

                       <!-- bulk price started-->
<?php if($deal['source_id'] == 4):?>                   
<?php foreach($deal['availabilityInfo'] as $infokey => $infoval):?>
                    <?php if (isset($infoval['bulkPricing']) && !empty($infoval['bulkPricing'])):?>              
                       <div class="accsproduct priceshow <?php echo "priceshow".$infoval['item_id']."ps".$infokey;?> <?php if($infokey > 0):?>hidden<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">
                    <?php foreach(array_reverse($infoval['bulkPricing']) AS $bulkkey => $value):?>
                        
                              <div class="<?php echo "select".$infoval['item_id']."a".$value['quantity'];?> text-small<?php if($bulkkey >1 && $bulkkey <=  intval(sizeof($infoval['bulkPricing']))-2 && intval(sizeof($infoval['bulkPricing'])) !=3):?> bulkpricingclass hidden<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>"> 
                              
                                <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
                                                                <span class="rupee" style="margin-top: 3px !important;"></span> <span style="font-size:13px; color:#ff0000"><strong><?php echo round(($value['price']/($deal['quantity'])),2);?></strong></span> per unit for 
                                  <?php
                                         echo $value['quantity']."+ Pack (".$deal['quantity']*$value['quantity'];
                                         if($value['quantity'] == 1){
                                                echo "pc)";
                                         }
                                         else{
                                                echo "pcs)";
                                         }
                                         ?>                       
                                <?php else:?>
                                  <span class="rupee" style="margin-top: 3px !important;"></span> <span style="font-size:13px; color:#ff0000"><strong><?php echo $value['price'];?></strong></span> per unit for <?php echo $value['quantity']."+";?> 
                                                          <?php 
                                                                if($value['quantity'] == 1){
                                                echo "pc";
                                         }
                                         else{
                                                echo "pcs";
                                         }
                                                          ?>
                                <?php endif;?>
                               
                                                <?php if($bulkkey ==1 &&  intval(sizeof($infoval['bulkPricing'])) >3):?>
                                         <button type="button" class="btn btn-default btn-xs morebulkprice"><span class="glyphicon glyphicon-chevron-down"></span></button>
                                <?php endif;?>
                              </div>
                              
                              
                    <?php endforeach;?>
                    <div class="bulkcashback" style="padding: 0 !important;font-size: 0.8em;color: green;">
                        <?php if(isset($deal['showNetPrice']) && $deal['showNetPrice']== 1 && isset($infoval['cash_back_type']) && !empty($infoval['cash_back_type']) && $infoval['cash_back_type']!=0 && $infoval['cash_back']>0):?>&nbsp;+
                                                <?php if($deal['cash_back_type'] == 2):?>
                                                        &#8377; <span class="cashback"><?php echo $infoval['cash_back'];?></span>   
                                                <?php else:?>
                                                        <?php echo $infoval['cash_back'];?>%
                                                <?php endif;?> 
                                                Cashback
                                      <?php endif;?>
                    </div>
                 </div> 
                 <?php else:?>
                 <?php if(isset($deal['ppq']) && !empty($deal['ppq']) &&($deal['ppq']>0)):?>
                           <div class="priceshow <?php echo "priceshow".$infoval['item_id']."ps".$infokey;?> <?php if($infokey > 0):?>hidden<?php endif;?> text-small<?php if($deal['source_id'] == 4):?> accsproduct<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">                 
                              <span class="rupee" style="margin-top: 3px !important;"></span> <span style="font-size:13px; color:#ff0000"><strong><?php echo $deal['ppq'];?></strong></span> /- per unit
                              
                            </div>
                          <?php endif;?>
                        

                                <?php if(isset($deal['quantity']) && $deal['quantity']>1 ):?>
                           <div class="priceshow <?php echo "priceshow".$infoval['item_id']."ps".$infokey;?> <?php if($infokey > 0):?>hidden<?php endif;?> text-small<?php if($deal['source_id'] == 4):?> accsproduct<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">                 
                              <span class="rupee" style="margin-top: 3px !important;"></span> <span style="font-size:13px; color:#ff0000"><strong><?php echo ($deal['ppq']*$deal['quantity']);?></strong></span> 
                              <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>

                        <font style="color:black;size:12px;"><?php echo "for ".$deal['quantity']." pcs";?></font>                      
                      <?php endif;?>
                            </div>
                          <?php endif;?>
                 
            <?php endif;?>
              
        <?php endforeach;?>
<?php endif;?>                        
              <!-- bulk price ended-->
              
                        
                        <div <?php if(!empty($deal['coupon'])):?>style="margin:0 !important"<?php endif;?> class="product_prices accsproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>" <?php if($key > 0):?>style='margin:0;'<?php endif;?>>
                            <?php if($deal['source_id'] == 4 && isset($deal['availabilityInfo']) && sizeof($deal['availabilityInfo'])>1):?>  
                                <?php foreach($deal['availabilityInfo'] as $infokeyy => $infovall):?>                                                                               
                                <div class="priceshow <?php echo "priceshow".$infovall['item_id']."ps".$infokeyy;?> <?php if($infokeyy > 0):?>hidden<?php endif;?>"style="margin-top:0px;">
                                      <?php if(!isset($infovall['bulkPricing']) || empty($infovall['bulkPricing'])):?>
                                      
                                      
                                                  <?php if(isset($deal['showNetPrice'])&& $deal['showNetPrice']==1 && $deal['source_id'] == 4 && isset($infovall['netPriceAfterCashBack']) && $infovall['netPriceAfterCashBack']>0 && isset($infovall['cash_back_type']) && $infovall['cash_back_type'] >0 && isset($infovall['cash_back'])&& $infovall['cash_back']>0 && isset($deal['quantity']) && $deal['quantity']<2):?>
                                        
                                                <?php //if(isset($deal['netPriceAfterCashBack']) && !empty($deal['netPriceAfterCashBack'])):?>
                                                                <div class = "text-small netPriceAfterCashBack <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>">                                                  
                                                                        <span class="rupee"></span> <span style ="font-size:14px; color:#ff0000"><b><?php echo intval($infovall['netPriceAfterCashBack']);?></b></span> 
                                                        </div>
                                                        <?php //endif;?>
                                                        <div style="font-size:10px;">
                                                        <?php if(isset($infovall['sellingPrice']) && $infovall['sellingPrice']>0):?>                            
                                                        <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
                                                                <span style="color:#555">(</span><span class="" style="color:red;">&#8377; <?php echo intval($infovall['sellingPrice']);?></span>
                                                        <?php endif;?>              
                                                <?php endif;?>
                                      
                                  
        
                                                <span style="color:#555;"><?php echo "less";?></span>
                                                <?php if(isset($infovall['cash_back_type']) && !empty($infovall['cash_back_type']) && $infovall['cash_back_type']!=0 && $infovall['cash_back']>0):?>
                                                        <?php if($infovall['cash_back_type'] == 2):?>
                                                                &#8377; <span class="cashback"><?php echo $infovall['cash_back'];?></span>   
                                                        <?php else:?>
                                                                <?php echo $infovall['cash_back'];?>%
                                                        <?php endif;?> 
                                                        <span>Cashback</span><span style="color:#555;"> )</span>
                                                
                                                <?php endif;?>
                                                </div>
                                        
                                      <?php else:?>            
                                      
                                      
                                              <?php if(isset($infovall['sellingPrice']) && $infovall['sellingPrice']>0):?>                              
                                                        <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
                                                                <span class="rupee" style="font-size: 12px;"></span> <span style="color:red;font-size: 14px;font-weight:bold"><?php echo intval($infovall['sellingPrice']);?></span>
                                                        <?php endif;?>              
                                              <?php endif;?>
                                              
                                              
                                                  <?php endif;?>                      
                                      <?php endif;?>
                                  
        
<!--need change start-->        
                                                <?php if($deal['source_id'] == 4 && isset($deal['quantity']) && $deal['quantity']>1 && $deal['showNetPrice']==1):?>                                                                   
                                      <?php if(isset($infovall['cash_back_type']) && !empty($infovall['cash_back_type']) && $infovall['cash_back_type']!=0 && $infovall['cash_back']>0):?>&nbsp;+
                                        <?php if($infovall['cash_back_type'] == 2):?>
                                          &#8377; <span class="cashback"><?php echo $infovall['cash_back'];?></span>   
                                        <?php else:?>
                                          <?php echo $infovall['cash_back'];?>%
                                        <?php endif;?> 
                                        Cashback
                                      <?php endif;?>
                                   <?php endif;?> 
<!--need change end-->                
                                    </div>
                            
                                <?php endforeach;?>
                            <?php else:?>
                                <?php if(!isset($deal['availabilityInfo'][0]['bulkPricing']) || empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
                                <div class="" style="margin-top:0px;">
                                      
                                             <?php if(isset($deal['showNetPrice'])&& $deal['showNetPrice']==1 && $deal['source_id'] == 4 && isset($deal['netPriceAfterCashBack']) && $deal['netPriceAfterCashBack'] > 0 && isset($deal['cash_back_type']) && $deal['cash_back_type'] >0 && isset($deal['cash_back'])&& $deal['cash_back']>0 && isset($deal['quantity']) && $deal['quantity']<2):?>
                                        
                                                
                                                                <div class = "text-small netPriceAfterCashBack <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>">                                                  
                                                                        <span class="rupee"></span> <span style ="font-size:14px; color:#ff0000"><b><?php echo intval($deal['netPriceAfterCashBack']);?></b></span> 
                                                        </div>
                                                        
                                                        <div style="font-size:10px;">
                                                        <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>                               
                                                        <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
                                                                <span class="" style="color:#555;">(&#8377; <?php echo intval($deal['gross_price']);?></span>
                                                        <?php endif;?>
                                                <?php else:?>
                                                        <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
                                                                <span style="color:#555;">(</span><span class="" style="color:red;" data-did="<?php echo $deal['_id']; ?>">&#8377; <?php echo intval($deal['available_price']);?></span>
                                                    
                                                        <?php endif;?>                  
                                                <?php endif;?>
                                      
                                  
                                                                <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
                                                        <span style="color:#555;"><?php echo "less";?></span>
                                                        <?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?>
                                                                <?php if($deal['cash_back_type'] == 2):?>
                                                                        &#8377; <span class="cashback"><?php echo $deal['cash_back'];?></span>   
                                                                <?php else:?>
                                                                        <?php echo $deal['cash_back'];?>%
                                                                <?php endif;?> 
                                                                <span style="font-size:10px;">Cashback</span><span style="color:#555;">)</span>
                                                
                                                        <?php endif;?>
                                                <?php endif;?>
                                                </div>
                                        
                                      <?php else:?>
                                      
                                              <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>                         
                                                <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
                                                        <span class="rupee"></span> <span class="red pt2"><?php echo intval($deal['gross_price']);?></span>
                                                <?php endif;?>
                                              <?php else:?>
                                                      <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
                                                         <span class="rupee"></span> <span class="product_price" data-did="<?php echo $deal['_id']; ?>"><?php echo intval($deal['available_price']);?></span>
                                                    
                                                      <?php endif;?>                  
                                              <?php endif;?>
                                      
                                  
        
                                      
                                        <?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?>&nbsp;+
                                                <?php if($deal['cash_back_type'] == 2):?>
                                                        &#8377; <span class="cashback"><?php echo $deal['cash_back'];?></span>   
                                                <?php else:?>
                                                        <?php echo $deal['cash_back'];?>%
                                                <?php endif;?> 
                                                Cashback
                                        <?php endif;?>
                                        
                                      
                                      <?php endif;?>
        
                                    </div>      
                                <?php endif;?>
                            <?php endif;?>
                          </div> 
                          
                          <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>
                          <div class="text-small accsproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
                            Paytm cashback <?php echo ($deal['gross_price']-$deal['available_price']);?><br/> Net Price = <span class='product_price'><span class="rupee"></span> <?php echo $deal['available_price'];?></span>
                          </div>
                          <?php endif;?>
                          
                          <?php if(isset($deal['coupon']) && !empty($deal['coupon'])):?>
                          <div class="text-small accsproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
                            Use Coupon <span class="red"><?php echo $deal['coupon'];?></span>
                          </div>
                          <?php endif;?>
                          
                          <?php if(isset($deal['codAvailable']) && !$deal['codAvailable']):?>
                          <div class="text-small accsproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
                            (COD not available)
                          </div>
                          <?php else:?>
                            <?php if($key!=0):?>
                            <div class="text-small accsproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
                              (COD available)
                            </div>
                            <?php endif;?>
                          <?php endif;?>
                          
                          <div class="dealoffer <?php if(!isset($deal['offer']) || empty($deal['offer'])):?>hidden<?php endif;?> row">
                              <div class="<?php if(strlen(strip_tags($deal['offer'],'<p>')) == strlen($deal['offer'])):?>offerhasnohtml<?php endif;?> offertext" data-fulltext="<?php echo strip_tags($deal['offer']);?>">              
                                <?php //echo $this->Text->truncate($deal['offer'],140);?>
                                <?php 
                                  if(strlen($deal['offer'])>0){
                                    echo $deal['offer'];
                                  } 
                                  else if($deal['source_id'] == 4){ 
                                    echo "Exclusive price @ProfitMandi";
                                  } 
                                ?>
                              </div>
                
                          </div>
                          
                          <?php if(isset($deal['videoLink']) && !empty($deal['videoLink'])):?>
          
                          <div class="text-small" style = "padding-top:4px;padding-bottom:4px;">
                            <button type="button" class="btn btn-default btn-sm uvideo" data-source="<?php echo $deal['videoLink'];?>">
                              <span class="glyphicon glyphicon-play-circle"></span> Play Video
                            </button>
                          </div>
                          <?php endif;?>
                          
          
                          <?php $colors=0;
                          $colorsAvailable = array();
                          if($deal['source_id']==4  && isset($deal['availabilityInfo']) && count($deal['availabilityInfo']) >1){
                              foreach ($deal['availabilityInfo'] as $key => $value){
                                  if($value['color']!=''){
                                     $colors= $colors+1;
                                     if($value['availability']>0){
                                        array_push($colorsAvailable,$value);
                                     }
                                  }
                              }
                          }
                          ?>
                                <?php if($colors>1 && count($colorsAvailable)>1):?>
                                  <div  class="see_more_colors" data-id="<?php echo $deal['skuBundleId']?>">
                             <span class="morecolors"><u>View More Colors</u></span>
                            </div>
                                <?php endif;?>


                <?php if(isset($deal['filterLink']) && !empty($deal['filterLink']) && isset($deal['filterText']) && !empty($deal['filterText'])):?>
                <div class='see_more_link' style='position:absolute; bottom: 0px;'>
                  <?php if(count($dealarray) >1):?>
                  <?php if($key == 1):?>
                  <a href = <?php echo $deal['filterLink'];?> style='color:#A8A5A5;'><u><?php echo $deal['filterText'];?></u></a>
                <?php endif;?>
                <?php else:?>
                  <a href = <?php echo $deal['filterLink'];?> style='color:#A8A5A5;'><u><?php echo $deal['filterText'];?></u></a>
                  
                <?php endif;?>
                </div> 

        <?php endif;?>
                         
                    <!-- offer data start here-->
                <div style="font-size:12px;color:maroon;">
                        <?php if($offerresponse != ""):?>
                                <?php if( isset($offerresponse['categories_applicable']) && in_array( $deal['category_id'] ,$offerresponse['categories_applicable']) && isset($offerresponse['sub_categories_not_applicable']) && !in_array($deal['subCategoryId'] ,$offerresponse['sub_categories_not_applicable'])):?>
                                        <a href="<?php echo $base_url;?>categories/target" style="color:maroon;" class="useroffers"><span class="glyphicon glyphicon-tags"></span> <u><?php echo $offerresponse['offer_description'];?></u></a>
                                <?php endif;?>
                        <?php endif;?>
                </div>
                <!-- offer data ends here-->
                          
                        </div>
                        
                        <?php if($deal['source_id']==4):?>
                        <?php if(isset($deal['availabilityInfo']) && count($deal['availabilityInfo'])>0 && $deal['availabilityInfo'][0]['maxQuantity']>0):?>
                        <div class="col-xs-2 cartaddition">
                                <div class="input-group number-spinner">
                                        <span class="input-group-btn data-up">
                                                <button class="btn btn-default plusqtybutton" data-minquantity="<?php echo $deal['availabilityInfo'][0]['minBuyQuantity'];?>" <?php printf('data-bulkpricing = "%s"',htmlspecialchars(json_encode($deal['availabilityInfo'][0]['bulkPricing']), ENT_QUOTES, 'UTF-8'));?> data-quantitystep="<?php echo $deal['availabilityInfo'][0]['quantityStep'];?>" data-id="<?php echo $deal['availabilityInfo'][0]['item_id'];?>" data-price="<?php echo intval($deal['availabilityInfo'][0]['sellingPrice']);?>" data-did="<?php echo $deal['_id'];?>" data-dir="up" data-name="<?php echo $deal['source_product_name'];?>" data-brand="<?php echo $deal['brand'];?>" data-identifier="<?php echo $deal['identifier']; ?>"><span class="glyphicon glyphicon-plus plusqty"></span></button>
                                        </span>
                                        <input type="text" class="itemquantity" value="0" min="0" max="<?php echo $deal['availabilityInfo'][0]['maxQuantity'];?>" data-did="<?php echo $deal['_id'];?>" autocomplete="off" readonly>
                                        <span class="input-group-btn data-dwn">
                                                <button class="btn btn-default minusqtybutton" data-minquantity="<?php echo $deal['availabilityInfo'][0]['minBuyQuantity'];?>" <?php printf('data-bulkpricing = "%s"',htmlspecialchars(json_encode($deal['availabilityInfo'][0]['bulkPricing']), ENT_QUOTES, 'UTF-8'));?> data-quantitystep="<?php echo $deal['availabilityInfo'][0]['quantityStep'];?>" data-id="<?php echo $deal['availabilityInfo'][0]['item_id'];?>" data-price="<?php echo intval($deal['availabilityInfo'][0]['sellingPrice']);?>" data-did="<?php echo $deal['_id'];?>" data-dir="dwn" data-name="<?php echo $deal['source_product_name'];?>" data-brand="<?php echo $deal['brand'];?>" data-identifier="<?php echo $deal['identifier']; ?>"><span class="glyphicon glyphicon-minus minusqty"></span></button>
                                        </span>
                                </div>
                        </div>
                                          
                        <?php endif;?>  
                <?php endif;?>
                </div>
                
                
      </div>

    <?php if($deal['source_id']==4  && isset($deal['availabilityInfo']) && count($colorsAvailable) >1 && $colors>1):?>
        <div class="morecoloroptions_<?php echo $deal['skuBundleId']?> hidden"
                style="background: #fff;">
                                        <div class="col-xs-2"></div>
                                        <div class="col-xs-10 button-checkbox text-left">
                                                <?php for($i=0; $i<count($colorsAvailable); $i=$i+2){
                                                                $value = $colorsAvailable[$i];
                                                        ?>
                                                <button type="button" data-setsetect="<?php echo "priceshow".$value['item_id']."ps".$i;?>" class="btn btn-xs choosecolor colorbtn" data-minquantity="<?php echo $value['minBuyQuantity'];?>" <?php printf('data-bulkpricing = "%s"',htmlspecialchars(json_encode($value['bulkPricing']), ENT_QUOTES, 'UTF-8'));?> data-quantitystep="<?php echo $value['quantityStep'];?>" data-id="<?php echo $value['item_id'];?>" data-price="<?php echo $value['sellingPrice'];?>" data-did="<?php echo $deal['_id'];?>" data-color="primary" data-max="<?php echo $value['maxQuantity'];?>"><?php echo strtoupper($value['color']);?></button>
                                                <?php
                                                        $j = $i+1;
                                                        $value = $colorsAvailable[$j];
                                                        if($j<count($colorsAvailable)){?>
                                                        <button type="button" data-setsetect="<?php echo "priceshow".$value['item_id']."ps".$j;?>" class="btn btn-xs choosecolor colorbtn" data-minquantity="<?php echo $value['minBuyQuantity'];?>" <?php printf('data-bulkpricing = "%s"',htmlspecialchars(json_encode($value['bulkPricing']), ENT_QUOTES, 'UTF-8'));?> data-quantitystep="<?php echo $value['quantityStep'];?>" data-id="<?php echo $value['item_id'];?>" data-price="<?php echo $value['sellingPrice'];?>" data-did="<?php echo $deal['_id'];?>" data-color="primary" data-max="<?php echo $value['maxQuantity'];?>"><?php echo strtoupper($value['color']);?></button><br> 
                            
                                                <?php }?>
                                    <?php }?>
                                </div>
                                
        </div>
        <?php endif;?>