Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
18388 naman 1
 
19828 naman 2
<script type="text/javascript" src="<?php echo $base_url;?>js/iscroll.js"></script>
3
<script type="text/javascript" src="<?php echo $base_url;?>js/deals.js?v=<?php echo $staticversion;?>"></script>
4
<script type="text/javascript">
5
function loaded () {
6
	myScroll = new IScroll('#wrapper', { scrollX: true, scrollY: false, mouseWheel: true, click: true, tap: true });
20004 naman 7
	myScroll3 = new IScroll('#wrapper3', { scrollX: true, scrollY: false, mouseWheel: true, click: true, tap: true });
19828 naman 8
	myScroll1 = new IScroll('#wrapper1', { scrollX: true, scrollY: false, mouseWheel: true, click: true, tap: true });
9
}</script>
10
 
11
 
19605 naman 12
<script>
13
$(document).ready(function(){
14
 
15
	var scrollerwidth = 0;
16
	var scroller1width = 0;
20004 naman 17
	var scroller3width = 0;
19605 naman 18
	$('#scroller li').each(function() {
19
	    var $this = $(this);
20
	    scrollerwidth =scrollerwidth + $this.outerWidth() + 4;
21
	});
22
	var scrollerwidth = ""+(scrollerwidth + 2)+"px";
23
	$('#scroller1 li').each(function() {
24
	    var $this = $(this);
25
	    scroller1width =scroller1width + $this.outerWidth() + 10;
26
	});
27
	var scroller1width = ""+(scroller1width + 2)+"px";
28
 
20004 naman 29
	$('#scroller3 li').each(function() {
30
	    var $this = $(this);
31
	    scroller3width =scroller3width + $this.outerWidth() + 10;
32
	});
33
	var scroller3width = ""+(scroller3width + 2)+"px";
34
 
19605 naman 35
    $('#scroller').css("width",scrollerwidth);
36
    $('#scroller1').css("width",scroller1width);
20004 naman 37
    $('#scroller3').css("width",scroller3width);
19605 naman 38
 
39
});
40
</script>
41
<style>
42
.activate{
43
	color:green;
44
}
45
#wrapper,#wrapper1 {
46
	z-index: 1;
47
	bottom: 48px;
48
	left: 0;
49
	overflow: hidden;
50
}
51
#wrapper{
19620 naman 52
	max-height:40px;
19605 naman 53
	width: 97%;
19620 naman 54
	padding: 0px 5px;
55
	min-height: 0px;
19605 naman 56
}
57
#wrapper1{
58
	height:30px;
59
	width: 100%;
60
}
61
 
20004 naman 62
#wrapper3{
19605 naman 63
	z-index: 1;
20004 naman 64
	left: 0;
65
	overflow: hidden;
66
	height:25px;
67
	width: 100%;
68
}
69
 
70
#scroller, #scroller1,  #scroller3{
71
	z-index: 1;
19605 naman 72
	-webkit-tap-highlight-color: rgba(0,0,0,0);
73
	-webkit-transform: translateZ(0);
74
	-moz-transform: translateZ(0);
75
	-ms-transform: translateZ(0);
76
	-o-transform: translateZ(0);
77
	transform: translateZ(0);
78
	-webkit-touch-callout: none;
79
	-webkit-user-select: none;
80
	-moz-user-select: none;
81
	-ms-user-select: none;
82
	user-select: none;
83
	-webkit-text-size-adjust: none;
84
	-moz-text-size-adjust: none;
85
	-ms-text-size-adjust: none;
86
	-o-text-size-adjust: none;
87
	text-size-adjust: none;
88
}
89
 
20004 naman 90
#scroller ul,#scroller1 ul ,#scroller3 ul{
19605 naman 91
	list-style: none;
92
	padding: 0;
93
	margin: 0;
94
	width: 100%;	
95
	text-align: center;
96
}
97
 
20004 naman 98
#scroller li, #scroller1 li,#scroller3 li {
19605 naman 99
	display: block;
100
	float: left;
101
  	margin:2px;
102
	color:white;
103
	border-right: 1px solid #ccc;
20004 naman 104
/* 	background-color: #F2DEDE; */
19605 naman 105
	font-size: 12px;
106
}
107
#scroller li{
108
	font-weight:bold;
109
	padding: 7px;
110
	height: 37px;
111
	border-radius:5px;
112
	vertical-align:middle;
113
	font-size: 11px;
114
	min-width: 67px;
115
	max-width: 92px;
116
	text-transform: uppercase;
117
/* 	overflow: hidden ; */
118
	}
119
#scroller1 li {
120
	color: #555;
121
    padding: 5px;
122
    background : none;
123
    height: 23px;
124
    border : #E5E5E5 1px solid;
125
    margin:3px;
126
    text-transform: uppercase;
127
    font-size: 10px;
128
}
129
 
130
.cancelstyle{
131
	font-weight:bold;
132
	background: black;
133
    padding: 1px 3px;
134
    color: white;
135
	border-radius: 4px;
136
 
137
}
138
</style>
20006 naman 139
<?php if(!isset($dealpin) || empty($dealpin)):?>
140
	<script>
141
		$(document).ready(function(){
142
			$('#pinModal').modal('show');
143
		});
144
	</script>
145
<?php endif;?>
146
 
19656 naman 147
<?php
148
	if(isset($subcategories)){
149
		$catstr = explode("^",$subcategories);
150
	}
151
 
152
?>
19605 naman 153
 
16912 naman 154
 <ul class="nav nav-tabs catselect">
16929 anikendra 155
<?php foreach($categories AS $catId => $name):?>
17686 naman 156
 
19638 naman 157
  	<li class=" tab_layout <?php if((isset($id)) && $catId == $id):?>active<?php endif;?> col-xs-<?php echo (12/(count($categories)));?>">
19383 amit.gupta 158
	    <a href="/category/<?php echo $catId;?>"<?php if($id!=6 && $catId==6):?> id="popovertrigger4" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Accessories at wholesale rates"<?php endif;?>>
19638 naman 159
	    	<?php if($catId==6):?>
160
	    		Accessories
161
	    	<?php else:?>
162
	    		<?php echo $name;?>
163
	    	<?php endif;?>
19383 amit.gupta 164
	    </a>
18008 amit.gupta 165
    </li>
19383 amit.gupta 166
<?php endforeach;?>		
16929 anikendra 167
</ul>
19661 naman 168
 
19909 naman 169
<?php if($this->params->action != 'linkdeal'):?>
170
	<?php if(isset($id)):?>
171
 
172
	<div class="filters row" >	
173
	<!-- For apps tab -->		
174
	<?php if($id==2):?>
175
		<div class="text-center">
176
			<div class="text_arrange cb">				
177
 
178
	                  <div class="card row" >
179
	                  	<a href = "<?php echo $base_url;?>appb"><span style="color:red;font-size:1.1em">Earn upto Rs. 10,000 per month</span> 
180
	                  		<!-- <u style="font-size:.9em">SEE HOW</u> -->
181
	                  		<button type="button" class="btn btn-primary btn-sm">SEE HOW</button>
182
	                  	</a><br>
183
	                  	<!--<span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>--><a href = "<?php echo $base_url;?>appb" style="font-size:1em; color:black"> Download these free apps for your customer.</a>
184
	            <hr style="margin:1px;">
185
	            <ul class="list-unstyled " style='margin:1px';>
186
	                <li class="row row_style" >
187
	                  	<div class="row showtips" style="font-size:.9em">
188
	                  		<br>
189
	                  		<div class='col-xs-11'>
190
	                  	 		<font color= 'grey'>Normally cashbacks are not approved for 30-40% cases.</font><br> <font color='red'>Click here </font>to see tips on increasing your profit. 
191
	                  	 	</div>
192
	                  	 	<div class='col-xs-1'><span class="glyphicon glyphicon-chevron-down"></span></div>
193
	                  	</div>
194
	                  </div>
195
	                  <div class="apptips hidden" style="background:#fff;">
196
	                    <div class="row">
197
 
198
	                    	<div class="col-xs-12" style='padding:1px'>
199
	                    		<ol style="text-align:left;background:#f9fafb">
200
	                    			<li>Only install new apps</li>
201
	                    			<li>Keep network connected after installing apps</li>   			
202
	                    			<li>Open the app 4-5 minutes after installing</li>
203
	                    			<li>Preferably register and login on app</li>
204
	                    		</ol>
205
	                    	</div>
206
 
207
	                    </div>
208
	                  </div>              
209
	                </li>
210
	            </ul>
211
	            <hr style="margin:1px;">
212
			</div>
213
		</div>		
214
	<?php endif;?>	
215
	<!-- End of apps tab code -->
216
	<?php if(isset($notification) && !empty($notification)):?>
217
		<?php if($notification['NotificationRule']['type']=='link'):?>
218
		<div class="alert alert-info text-center col-xs-12">
219
			<a target="_blank" href="<?php echo $notification['NotificationRule']['url'].'?user_id='.$logged_user['id'];?>" class="webnotification"><?php echo $notification['NotificationRule']['message'];?></a>
16929 anikendra 220
		</div>
19909 naman 221
		<?php elseif($notification['NotificationRule']['type']=='popup'):?>
222
		<?php 
223
			$url = $notification['NotificationRule']['url'];
224
			if(strpos($url, '?')!==false){
225
				$url .= '&user_id='.$logged_user['id'];
226
			}else{
227
				$url .= '?user_id='.$logged_user['id'];
228
			}
229
		?>
230
		<div class="herotext col-xs-9" style='padding-top:0px'>
231
			<!-- Daily profitable deals for you -->
232
			<?php //echo $this->element('headerlinks',array(),array());?>
233
			<script type="text/javascript">
234
				$(function(){
235
					$('.notificationMessage').html('<?php echo $notification['NotificationRule']['message'];?>');
236
					$('.notificationUrl').prop('href','<?php echo $url;?>').data('id','<?php echo $notification['NotificationRule']['id'];?>');
237
					if(showpopup(<?php echo $notification['NotificationRule']['id'];?>,<?php echo $notification['NotificationRule']['popup_display_count'];?>,<?php echo $notification['NotificationRule']['popup_display_interval'];?>)) {
238
						$('#notificationModal'+'<?php echo ucfirst($notification['NotificationRule']['popup_type']);?>').modal({show: true,keyboard: false,backdrop: 'static'});	
239
						var postdata = {'user_id':me,'notification_rule_id':'<?php echo $notification['NotificationRule']['id'];?>'};
240
						$.post( "/notification_views/add", postdata, function( data ) {});		
241
						ga('send', 'event', 'popupnotification-<?php echo $notification['NotificationRule']['id'];?>', 'shown', me);	
242
						var properties = {};
243
						properties.id = String('<?php echo $notification['NotificationRule']['id'];?>');
244
						pma.send('popupnotification','shown','<?php echo $notification['NotificationRule']['type'];?>',me,properties);			
245
					}
246
				});
247
			</script>
248
		</div>
249
		<?php endif;?>
16929 anikendra 250
	<?php endif;?>
19605 naman 251
 
252
 
19909 naman 253
		<?php if($id != 2 && ((!isset($brands) || ( empty($brands))) && (!isset($subcategories) || (empty($subcategories))))):?>
254
 
255
		<div class="col-xs-12 herotext" style='padding-top:0px'> 
256
 
257
				<?php echo $this->element('headerlinks',array(),array());?>
258
 
259
		</div>
260
 
19931 naman 261
		<?php elseif($id != 2 && $id != 6 && (isset($brands) || !empty($brands))):?>
262
 
19909 naman 263
		<div class="col-xs-12 herotext" style='padding-top:0px'> 
264
 
265
				<?php echo $this->element('headerlinks',array(),array());?>
266
 
267
		</div>
19605 naman 268
 
19909 naman 269
		<?php elseif($id!=2):?>
270
		<div class="col-xs-9 herotext" style='padding-top:0px'>                	
271
 
272
		    	<?php if($id == 6):?>
273
			    	<div id="wrapperboss" style="position:relative;">
274
					<!-- crossfilter start -->
275
 
276
			    		<div id="wrapper1" style="background:white;">
277
							<div id="scroller1">
278
								<ul>
279
 
280
									<?php foreach($allbrandsubcat['idListInfo'] as $akey => $avalue ):?>
281
										<li class="upselect mtop getcancel quickclick" data-type="<?php if(isset($whatfirst)&&!empty($whatfirst)):?><?php echo $whatfirst;?><?php endif;?>" data-<?php echo $whatfirst."id";?>="<?php echo $akey;?>" ><?php echo $avalue;?> <span class="cancelstyle"> X </span></li>
282
									<?php endforeach;?>
283
 
284
									<?php foreach($allbrandsubcat['result'] as $ckey => $cvalue ):?>
285
										<?php if(in_array($cvalue[$whatsecondid],$secondloop)):?>
286
											<li class="upselect getcancel quickclick" data-type="<?php if(isset($whatsecond)&&!empty($whatsecond)):?><?php echo $whatsecond;?><?php endif;?>" data-<?php echo $whatsecond."id";?>="<?php echo $cvalue[$whatsecondid];?>">
287
											<?php echo $cvalue[$whatsecond];?> <span class="cancelstyle"> X </span>
288
											</li>
289
										<?php endif;?>
290
									<?php endforeach;?>
291
 
292
							    </ul>
293
							</div>
19605 naman 294
						</div>
19909 naman 295
 
296
					<!-- crossfilter end -->
297
 
298
 
299
			    	</div>
300
			    <?php elseif (isset($brands) ||  !empty($brands)):?>
301
			    	<?php echo $this->element('headerlinks',array(),array());?>
302
		    	<!-- Daily profitable deals for you	               	        -->
303
			    <?php endif;?>
304
 
305
		</div>   
306
 
307
 
308
		<div class="col-xs-3 pt7">
309
			<?php if($id == 6 && (isset($brands) && !empty($brands)) || (isset($subcategories) && !empty($subcategories))):?>
310
					<a class="btn btn-xs btn-danger filteraction clearfilters pull-right mr5" id="clearfilters" style="margin-top: 4px;padding: 2px 16px; background: #efefef !important;border: 1px; color: #333!important;font-size: 12px;"> RESET </a>
311
				<?php endif;?>	
312
		</div>
313
		<?php endif;?> 
19605 naman 314
 
19909 naman 315
 
16929 anikendra 316
	</div>
19909 naman 317
 
318
	<?php if($id == 6 && ((isset($brands) && !empty($brands)) || (isset($subcategories) && !empty($subcategories))) && (isset($allbrandsubcat) && !empty($allbrandsubcat))):?>
319
	<!-- for quickfilter start-->
320
					<div style="background:white;">
321
			    		<div id="wrapper" style="background:white;">
322
							<div id="scroller">
323
								<ul>
324
								<?php $colorcount = 0;?>
325
								<?php foreach($allbrandsubcat['result'] as $bkey => $bvalue ):?>
326
									<?php if(!in_array($bvalue[$whatsecondid],$secondloop)):?>
327
									<?php $strarr = explode(" ", $bvalue[$whatsecond]);?>
328
										<li class="downselect quickclick" data-type="<?php if(isset($whatsecond)&&!empty($whatsecond)):?><?php echo $whatsecond;?><?php endif;?>" data-<?php echo $whatsecond."id";?>="<?php echo $bvalue[$whatsecondid];?>" style="background:<?php echo $color[$colorcount];?>; <?php if(strlen($bvalue[$whatsecond]) >9 && sizeof($strarr)>1):?> font-size: 10px;line-height: 12px;<?php elseif(strlen($bvalue[$whatsecond]) <=9 && sizeof($strarr)>1):?>line-height: 12px;<?php else:?>line-height: 24px;<?php endif;?>">
18388 naman 329
 
19909 naman 330
											<?php 
331
												echo $strarr[0]; 
332
												if(sizeof($strarr) >1){
333
													echo "<br>";
334
													for($abs = 1; $abs< sizeof($strarr);$abs++)
335
													{
336
														echo $strarr[$abs]." ";
337
													}	
338
												}									
17700 naman 339
 
340
 
19909 naman 341
 
342
											?>
19605 naman 343
 
19909 naman 344
										</li>
345
										<?php $colorcount = $colorcount+1;
346
											if($colorcount == 6)
347
											{
348
												$colorcount = 0;
349
											}
19605 naman 350
										?>
19909 naman 351
									<?php endif;?>
352
								<?php endforeach;?>
353
							    </ul>
354
							</div>
19605 naman 355
						</div>
356
					</div>
19909 naman 357
	<!-- for quickfilter end-->
358
	<?php endif;?>
359
 
360
	<?php endif;?>
19661 naman 361
 
19605 naman 362
<?php endif;?>