Subversion Repositories SmartDukaan

Rev

Rev 18420 | Rev 18545 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18287 naman 1
 
2
<div class="subcard">
3
        <div class="col-xs-4 productimage">
4
          <?php if($key == 0):?>
5
	          <div class="img-overlay">
6
	          <div class="product_actions likeit" data-id="<?php echo $deal['_id'];?>" name="likediv_<?php echo $deal['_id'];?>">
7
	            <span class="likedeal <?php if(isset($likedDeals[$deal['_id']])):?>active<?php endif;?>">
8
	            </span>
9
	          </div>
10
	          <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']);?>">
11
	          <img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo urlencode($deal['thumbnail']);?>&h=100&q=95" />
12
	          </div>
13
	          <div class="product_actions dislikeit" data-id="<?php echo $deal['_id'];?>" name="dislikediv_<?php echo $deal['_id'];?>">
14
	            <span class="dislikedeal <?php if(isset($disLikedDeals[$deal['_id']])):?>active<?php endif;?>">
15
	            </span>
16
	          </div>
17
 
18
			  </div>
19
 
20
	        <?php else:?>
21
	          <span class="pull-right arrowright"></span>
22
	        <?php endif;?>
23
 
24
        </div>
25
 
26
		<div class="col-xs-8 <?php if($key == 0):?>productdetails<?php else:?>productsmalldetails<?php endif;?>" data-id="<?php echo $deal['_id'];?>">
27
			<?php if($key == 0):?>
28
			<div class="product_title">
29
          		<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']);?>">
30
            	<?php echo $deal['source_product_name'];?>
31
          		</h5>
32
			</div>
33
 
34
			<?php endif;?>
35
			<div class="col-xs-6 productpricedetails" style="position:relative;min-height:70px;padding-bottom:20px;">
36
				<?php if($key == 0):?>
37
				<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']);?>">
38
	            <?php //echo $deal['tagline'];?>
39
	            <?php 
40
	                $str1=preg_replace('/<\/p>/i', '', $deal['tagline']);
41
	                if($str1 != $deal['tagline']) {
42
	                  $str=preg_replace('/<p[^>]*>/i', '', $str1);
43
	                  echo $str;
44
	                } else {
45
	                  echo $deal['tagline'];
46
	                }
47
	            ?>
48
	          	</div>
49
	          	<?php endif;?>
50
				<?php if((isset($deal['showMrp']) && ($deal['showMrp']==1) && isset($deal['mrp']) && ($deal['mrp']>0))) :?>
51
		          <div class="text-small">
52
 
53
		            <?php if(isset($deal['showMrp']) && ($deal['showMrp']==1) && isset($deal['mrp']) && ($deal['mrp']>0)):?>
54
		              <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
55
		                MRP <span class="cashbackrupee"></span> <?php echo round(($deal['mrp']/$deal['quantity']), 2);?>/- per unit.
56
                    <!-- (Total <span class="cashbackrupee"></span> <?php //echo $deal['mrp']?>) -->
57
		              <?php else:?> 
58
		                MRP <span class="cashbackrupee"></span><?php echo $deal['mrp'];?>
59
		              <?php endif;?>
60
		            <?php endif;?>
61
 
62
		          </div>
63
		           <?php endif;?>
64
 
18526 naman 65
		       <!-- bulk price started-->
66
	              <?php if (isset($deal['availabilityInfo'][0]['bulkPricing']) && !empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
67
 
68
						<?php                                                                                                                                                                                               
69
							usort($deal['availabilityInfo'][0]['bulkPricing'], function($a, $b) { 
70
							    return $a['quantity'] > $b['quantity'] ? -1 : 1; 
71
							});            
72
 
73
							foreach($deal['availabilityInfo'][0]['bulkPricing'] as $key => $value){
74
								if($deal['availabilityInfo'][0]['maxQuantity']< $value['quantity']){
75
									unset($deal['availabilityInfo'][0]['bulkPricing'][$key]);
76
								}
77
							} 
78
							debug($deal['availabilityInfo'][0]['bulkPricing']);                                                                                                                                                                                           						   
79
						?>		            
80
 
81
		               <div class="" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">
82
	                    <?php foreach($deal['availabilityInfo'][0]['bulkPricing'] AS $key => $value):?>
83
 
84
		                      <div class="text-small<?php if($key >1 && $key <=  intval(sizeof($deal['availabilityInfo'][0]['bulkPricing']))-2 && intval(sizeof($deal['availabilityInfo'][0]['bulkPricing'])) !=3):?> bulkpricingclass hidden<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>> 
85
		                        <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
86
									<span class="rupee"></span><span style="font-size:13px; color:#ff0000"><strong><?php echo ($value['price']/($deal['quantity']*$value['quantity']));?></strong></span> per unit for 
87
		                          <?php echo $deal['quantity']*$value['quantity'];?> pcs                      
88
		                        <?php else:?>
89
		                          <span class="rupee"></span><span style="font-size:13px; color:#ff0000"><strong><?php echo $value['price'];?></strong></span> per unit for <?php echo $value['quantity'];?> pcs
90
		                        <?php endif;?>
91
		           				<?php if($key ==1 &&  intval(sizeof($deal['availabilityInfo'][0]['bulkPricing'])) >3):?>
92
		                        	 <button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-chevron-down morebulkprice"></span></button>
93
		                      	<?php endif;?>
94
		                      </div>
95
 
96
 
97
	                    <?php endforeach;?>
98
	                 </div> 
99
	            <?php endif;?>
18287 naman 100
 
18526 naman 101
              <!-- bulk price ended-->
102
 
103
		        <?php if(isset($deal['ppq']) && !empty($deal['ppq']) &&($deal['ppq']>0) && isset($deal['availabilityInfo'][0]['bulkPricing']) && empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
18287 naman 104
		           <div class="text-small">
18297 naman 105
                       <span class="rupee"></span><span style="font-size:14px; color:#ff0000"><strong><?php echo $deal['ppq'];?></strong></span> /- per unit.
18287 naman 106
		            </div>
107
		          <?php endif;?>
108
 
109
		        <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;?>>
110
		            <div>
111
		              <?php if($key == 0 && isset($deal['showDp']) && $deal['showDp']==1 && !empty($deal['dp'])):?>
112
		              <div class="dp">DP <span class="cashbackrupee"></span> <?php echo $deal['dp'];?></div>
113
		              <?php endif;?>
18297 naman 114
 
18526 naman 115
					  <?php if(!isset($deal['availabilityInfo'][0]['bulkPricing']) || empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
116
 
117
			              <span class="rupee"></span>
118
			              <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>
119
			                <span class="red pt2"><?php echo intval($deal['gross_price']);?></span>
120
			              <?php else:?>
121
			                <span class="product_price" data-did="<?php echo $deal['_id']; ?>"><?php echo intval($deal['available_price']);?></span> 
122
		                    <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
123
 
124
		                      <font style="color:black;size:12px;"><?php echo "for ".$deal['quantity']." pcs.";?></font>                      
125
		                    <?php endif;?>
126
	                     <?php endif;?>
127
 
128
	                   <?php endif;?>
18297 naman 129
 
18287 naman 130
 
131
		              <?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?>&nbsp;+
132
		                <?php if($deal['cash_back_type'] == 2):?>
133
		                  <span class="cashbackrupee"></span> <span class="cashback"><?php echo $deal['cash_back'];?></span>   
134
		                <?php else:?>
135
		                  <?php echo $deal['cash_back'];?> %
136
		                <?php endif;?> 
137
		                Cashback
138
		              <?php endif;?>
139
		            </div>
140
		          </div> 
141
 
142
		          <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>
143
		          <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']);?>">
144
		            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>
145
		          </div>
146
		          <?php endif;?>
147
 
148
		          <?php if(isset($deal['coupon']) && !empty($deal['coupon'])):?>
149
		          <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']);?>">
150
		            Use Coupon <span class="red"><?php echo $deal['coupon'];?></span>
151
		          </div>
152
		          <?php endif;?>
153
 
154
		          <?php if(isset($deal['codAvailable']) && !$deal['codAvailable']):?>
155
		          <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']);?>">
156
		            (COD not available)
157
		          </div>
158
		          <?php else:?>
159
		            <?php if($key!=0):?>
160
		            <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']);?>">
161
		              (COD available)
162
		            </div>
163
		            <?php endif;?>
164
		          <?php endif;?>
165
 
166
		          <div class="dealoffer <?php if(!isset($deal['offer']) || empty($deal['offer'])):?>hidden<?php endif;?> row">
167
		              <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']);?>">              
168
		                <?php //echo $this->Text->truncate($deal['offer'],140);?>
169
		                <?php 
170
		                  if(strlen($deal['offer'])>0){
171
		                    echo $deal['offer'];
172
		                  } 
173
		                  else if($deal['source_id'] == 4){ 
174
		                    echo "Exclusive price @ProfitMandi";
175
		                  } 
176
		                ?>
177
		              </div>
178
 
179
		          </div>
180
 
181
		          <?php if(isset($deal['videoLink']) && !empty($deal['videoLink'])):?>
182
 
183
		          <div class="text-small" style = "padding-top:4px;padding-bottom:4px;">
184
		            <button type="button" class="btn btn-default btn-sm uvideo" data-source="<?php echo $deal['videoLink'];?>">
185
		              <span class="glyphicon glyphicon-play-circle"></span> Play Video
186
		            </button>
187
		          </div>
188
		          <?php endif;?>
189
 
190
 
191
		          <?php $colors=0;
192
		          $colorsAvailable = array();
193
		          if($deal['source_id']==4  && isset($deal['availabilityInfo']) && count($deal['availabilityInfo']) >1){
194
		              foreach ($deal['availabilityInfo'] as $key => $value){
195
		                  if($value['color']!=''){
196
		                     $colors= $colors+1;
197
		                     if($value['availability']>0){
198
		                     	array_push($colorsAvailable,$value);
199
		                     }
200
		                  }
201
		              }
202
		          }
203
		          ?>
204
		          	<?php if($colors>1 && count($colorsAvailable)>1):?>
205
		          	  <div  class="see_more_colors" data-id="<?php echo $deal['skuBundleId']?>">
206
		             <span class="morecolors"><u>View More Colors</u></span>
207
		            </div>
208
		          	<?php endif;?>
209
 
210
 
211
                <?php if(isset($deal['filterLink']) && !empty($deal['filterLink']) && isset($deal['filterText']) && !empty($deal['filterText'])):?>
212
                <div class='see_more_link' style='position:absolute; bottom: 0px;'>
213
                  <?php if(count($dealarray) >1):?>
214
                  <?php if($key == 1):?>
215
                  <a href = <?php echo $deal['filterLink'];?> style='color:#A8A5A5;'><u><?php echo $deal['filterText'];?></u></a>
216
                <?php endif;?>
217
                <?php else:?>
218
                  <a href = <?php echo $deal['filterLink'];?> style='color:#A8A5A5;'><u><?php echo $deal['filterText'];?></u></a>
219
 
220
                <?php endif;?>
221
                </div> 
222
 
223
        <?php endif;?>
224
 
225
			</div>
226
 
227
			<?php if($deal['source_id']==4):?>
228
			<?php if(isset($deal['availabilityInfo']) && count($deal['availabilityInfo'])>0 && $deal['availabilityInfo'][0]['maxQuantity']>0):?>
229
			<div class="col-xs-2 cartaddition">
230
				<div class="input-group number-spinner">
231
					<span class="input-group-btn data-up">
232
						<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>
233
					</span>
234
					<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>
235
					<span class="input-group-btn data-dwn">
236
						<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>
237
					</span>
238
				</div>
239
			</div>
240
 
241
			<?php endif;?>	
242
	        <?php endif;?>
243
		</div>
244
 
245
 
246
      </div>
247
 
18420 naman 248
    <?php if($deal['source_id']==4  && isset($deal['availabilityInfo']) && count($colorsAvailable) >1 && $colors>1):?>
249
	<div class="morecoloroptions_<?php echo $deal['skuBundleId']?> hidden"
250
		style="background: #fff;">
251
					<div class="col-xs-2"></div>
252
					<div class="col-xs-10 button-checkbox text-left">
253
						<?php for($i=0; $i<count($colorsAvailable); $i=$i+2){
254
								$value = $colorsAvailable[$i];
255
							?>
256
			            		<button type="button" class="btn btn-xs choosecolor colorbtn" 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>
257
			            		<?php
258
			            			$j = $i+1;
259
			            			$value = $colorsAvailable[$j];
260
			            			if($j<count($colorsAvailable)){?>
261
			            			<button type="button" class="btn btn-xs choosecolor colorbtn" 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>	
262
 
263
			            		<?php }?>
264
			            <?php }?>
265
			        </div>
266
 
267
	</div>
268
	<?php endif;?>