Subversion Repositories SmartDukaan

Rev

Rev 20683 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20683 amit.gupta 1
<script type="text/javascript" src="<?php echo $base_url;?>js/iscroll.js?v=<?php echo $staticversion;?>"></script>
18224 naman 2
<script type="text/javascript" src="/js/profittill.js?v=<?php echo $staticversion;?>"></script>
3
<script type="text/javascript" src="/js/jquery.viewport.mini.js"></script>
18211 naman 4
 
18525 naman 5
<script type="text/javascript">
18683 naman 6
$(document).on('click','.morebulkprice',function(e){
7
  		e.stopPropagation();
8
  		if($(this).find('.glyphicon').hasClass('glyphicon-chevron-down'))
18525 naman 9
  		{
10
  			$(this).parent().parent().parent().find('.bulkpricingclass').removeClass('hidden');
18683 naman 11
  			$(this).find('.glyphicon').removeClass('glyphicon-chevron-down');
12
  			$(this).find('.glyphicon').addClass('glyphicon-chevron-up');
18525 naman 13
  		}
14
  		else
15
  		{
16
  			$(this).parent().parent().parent().find('.bulkpricingclass').addClass('hidden');
18683 naman 17
  			$(this).find('.glyphicon').removeClass('glyphicon-chevron-up');
18
  			$(this).find('.glyphicon').addClass('glyphicon-chevron-down');
18525 naman 19
  		}
20
  	});
21
 
18224 naman 22
$(document).ready(function(){	
23
	$('.card').html(localStorage.getItem("productdetail"));
18234 amit.gupta 24
	$('.data-up:first').append('<a id="popovertrigger6"  data-container="body" data-toggle="popover" data-placement="left" data-content="Buy Now"></a>');
25
	showpopover("popovertrigger6", $('.row.card')[0]);
26
	$('.popover').css('position','fixed');
18239 amit.gupta 27
	$('.popover-content').css('padding','9px');
28
	try {
29
   		$("#popovertrigger6").popover('show');
30
    }catch(err){    		
31
    	//
32
    }
33
 
18235 amit.gupta 34
	setTimeout(function(){
35
        	$("#popovertrigger6").popover('hide');
36
        },2000);
37
	setInterval(function(){
38
		try {
39
        		$("#popovertrigger6").popover('show');
40
        	}catch(err){
41
        		//
42
    		}
43
        setTimeout(function(){
44
        	$("#popovertrigger6").popover('hide');
45
        },2000);
46
    },7000);
18224 naman 47
	$('.see_more_link').remove();
18211 naman 48
	var topmargin = $(".card").height();
18231 naman 49
	var value = " "+(topmargin+15)+"px 5px 5px 5px";
18211 naman 50
	$('#detailcontent').css("margin",value);
18234 amit.gupta 51
	//$('.popover').hide();
52
	//$('.arrow').hide();
18224 naman 53
	$('div').removeClass("accsproduct");
54
	$('h5').removeClass("accsproduct");
18231 naman 55
 
56
	 $('.uvideo').click(function(){
19011 naman 57
	  var href = window.location.href;
58
	 window.history.pushState('forward', null, './'+href.substr(href.lastIndexOf('/') + 1));
18231 naman 59
      var source= $(this).data('source');
60
      // alert(source);
61
      $('#content-add').empty();
62
      var content = "<iframe width='100%' height='100%' src='http://www.youtube.com/embed/"+source+"?autoplay=1'></iframe>"
63
      value = " "+(topmargin+10)+"px 5px 5px 5px";
64
      $('#video-body').css("margin",value);
65
      $('#content-add').append(content);
66
      var producttitle = $(this).closest(".productdetails").find(".producttitle").html().trim();
67
      ga('send', 'event', 'Video Link Clicked', producttitle, me);
68
      $('#videoModal').modal('show');
69
    });
70
 
71
    if (window.history && window.history.pushState) {
72
 
73
        $(window).on('popstate', function() {
74
             $('#videoModal').modal('hide');
75
      		 $('.text-center').empty();
76
        });
77
 
78
      }
19011 naman 79
 
18234 amit.gupta 80
    $('#videoModal').click(function(){
81
    	$('#content-add').empty();
19011 naman 82
    	window.history.back();
18231 naman 83
    });
84
 
85
    $('.close').click(function(){
86
      $('#videoModal').modal('hide');
87
      $('.text-center').empty();
88
    });
89
 
18211 naman 90
});
91
function loaded () {
20760 amit.gupta 92
	myScroll = new IScroll('#wrapper', { scrollX: true, scrollY: false, mouseWheel: true, click: true, tap: false ,eventPassthrough: true, bindToWrapper:true});
18211 naman 93
	}
94
var a;
95
var b;
96
function togglelist(e, id) {
97
 
98
    var el = document.getElementById(id);
99
    if ((a != undefined) && (b != null) && (a != el)) {
100
        a.style.display = 'none';
101
        b.innerHTML = '+';
102
    }
103
    if (el.style.display != 'none') {
104
        el.style.display = 'none';
105
        e.currentTarget.children[1].innerHTML = '+';
106
    } else {
107
        el.style.display = '';
108
        e.currentTarget.children[1].innerHTML = '-';
109
    }
110
    a = el;
111
    b = e.currentTarget.children[1];
112
}
113
</script>
18245 naman 114
<script type="text/javascript" src="/js/checkout.js?v=<?php echo $staticversion;?>"></script>
18211 naman 115
<style>
116
.pd-tab {
117
  background: #e5e6e0;
118
  color: #555555;
119
  text-transform: capitalize;
120
  padding: 7px 5px;
121
  font: 1.2em Helvetica, Arial, sans-serif;
122
  margin-bottom: 2px;
123
  width:100%;
124
}
125
.pd-tab span:nth-of-type(1) {
126
  float: left;
127
  margin-top: 3px;
128
}
129
.pd-tab span:nth-of-type(2) {
130
  float: right;
131
  font: 1.2em Helvetica, Arial, sans-serif;
132
}
133
.pd-tab-open {
134
  width:90%;
135
  margin: 10px;
136
}
137
.pd-tab-open table {
138
  border: #f2f3ef solid 1px;
139
  width: 99%;
140
  border-collapse: collapse;
141
  color: #555555;
142
  margin-bottom: 10px;
143
}
144
.pd-tab-open table th {
145
  background: #f2f3ef;
146
  font: 1em Helvetica, Arial, sans-serif;
147
  padding: 5px 0 5px 5px;
148
  text-align: left;
149
}
150
.pd-tab-open table td {
151
  font: 1em Helvetica, Arial, sans-serif;
152
  text-align: center;
153
  border-bottom: #f2f3ef solid 1px;
154
  padding: 5px 3px;
155
}
156
.pd-tab-open table td:nth-of-type(1) {
157
  border-right: #f2f3ef solid 1px;
158
  text-align: left;
159
  width: 25%;
160
}
161
.pd-tab-open table td:nth-of-type(2) {
162
 
163
  text-align: left;
164
  padding-left: 4px;
165
  box-sizing: border-box;
166
  -webkit-box-sizing: border-box;
167
  -moz-box-sizing: border-box;
168
}
169
.pd-tab-open .detail-div {
170
  color: #555555;
171
  text-align: left;
172
  font: 1.2em Helvetica, Arial, sans-serif;
173
}
174
 
175
#wrapper {
176
	position: absolute;
177
	z-index: 1;
178
	top: 5px;
179
	bottom: 48px;
180
	left: 0;
181
	width: 100%;
18231 naman 182
	height: 210px;
18211 naman 183
	overflow: hidden;
184
}
185
 
186
#scroller {
187
	position: absolute;
188
	z-index: 1;
189
	-webkit-tap-highlight-color: rgba(0,0,0,0);
190
	/*width: 560px;*/
191
 
192
 
193
	-webkit-transform: translateZ(0);
194
	-moz-transform: translateZ(0);
195
	-ms-transform: translateZ(0);
196
	-o-transform: translateZ(0);
197
	transform: translateZ(0);
198
	-webkit-touch-callout: none;
199
	-webkit-user-select: none;
200
	-moz-user-select: none;
201
	-ms-user-select: none;
202
	user-select: none;
203
	-webkit-text-size-adjust: none;
204
	-moz-text-size-adjust: none;
205
	-ms-text-size-adjust: none;
206
	-o-text-size-adjust: none;
207
	text-size-adjust: none;
208
}
209
 
210
#scroller ul {
211
	list-style: none;
212
	padding: 0;
213
	margin: 0;
214
	width: 100%;
215
 
216
	text-align: center;
217
}
218
 
219
#scroller li {
220
	display: block;
221
	float: left;
18231 naman 222
	/*width: 140px;*/
223
	width: 210px;
224
  	height: 210px;
18211 naman 225
 
226
	border-right: 1px solid #ccc;
18231 naman 227
	background-color: white;
18211 naman 228
	font-size: 14px;
229
}
230
.pd-images {
231
  padding: 5px 10px;
232
 
233
  border: #f1f1f1 solid 1
234
}
235
 
236
.goback {z-index:10; height: 32px; width: 32px; position: absolute;top:120px;padding:4px;}
237
</style>
238
 
18231 naman 239
<div class="modal fade" id="videoModal">
240
  <div class="modal-dialog">
241
    <div class="modal-content" id='video-body'>      
242
      <div class="modal-body">
243
        <div class="text-center" id='content-add'>
244
 
245
        </div>        
246
      </div>      
247
    </div><!-- /.modal-content -->
248
  </div><!-- /.modal-dialog -->
249
</div>
18224 naman 250
<div class="modal fade" id="loadingModal">
251
  <div class="modal-dialog">
252
    <div class="modal-content">      
253
      <div class="modal-body">
254
        <div class="text-center">
255
          <img src="/img/ajax-loader.gif"/>          
256
        </div>        
257
      </div>      
258
    </div><!-- /.modal-content -->
259
  </div><!-- /.modal-dialog -->
260
</div>
18211 naman 261
 
18231 naman 262
<div style="position:fixed;z-index:2;top:-5px; background:#58d936;padding:15px 5px 2px 5px;width:100%">
263
<a href="javascript:history.back();"><span class="glyphicon glyphicon-remove-circle pull-right" style='left: 5px;z-index: 55;font-size: 20px;color: #555;'></span></a>
18224 naman 264
<div class="row card">
18211 naman 265
 
266
 
267
</div>
18224 naman 268
</div>
18211 naman 269
 
18224 naman 270
<div id = "detailcontent" style="background:white;position:relative;margin-bottom:50px;">
18211 naman 271
 
272
<div id="wrapper" style="background:white;">
18231 naman 273
	<div id="scroller" style='width: <?php echo count($dealinfo['entity']['images'])*220;?>px;'>
18211 naman 274
		<ul>
275
			<?php foreach($dealinfo['entity']['images'] as $image){?>
276
	          	<?php //echo $image['url'];?>
18231 naman 277
	          	<li class='pd-images'><img src="<?php echo $image['url'];?>" height="100%" "></li>
18211 naman 278
 
279
	         <?php } ?>
280
	    </ul>
281
	</div>
18224 naman 282
</div>
283
 
18231 naman 284
	<div style="position:absolute;top:210px;width:100%;padding-bottom:55px;">
18224 naman 285
	<div style="background:white;">
286
		<?php if(isset($dealinfo['entity']['keySpecs']) && !empty($dealinfo['entity']['keySpecs'])):?>
287
			<div class="pd-tab clearfix" >
288
		  		<span>Highlights</span>
289
			</div>
290
 
291
			<div class="pd-tab-open" id="tab1">
292
			  <div class="detail-div">
293
			         <?php foreach($dealinfo['entity']['keySpecs'] as $value):?>
294
			         	<?php echo "<div>".$value."</div>";?>
295
			         <?php endforeach;?>   
296
			  </div>
297
			</div>
298
		<?php endif;?>
18211 naman 299
 
18224 naman 300
		<?php if(isset($dealinfo['entity']['packageContents']) && !empty($dealinfo['entity']['packageContents'])):?>
301
			<div class="pd-tab clearfix" >
302
			  <span>Package Contents</span>
303
			</div>
304
 
305
			<div class="pd-tab-open" id="tab1">
306
			  <div class="detail-div">
307
			         <?php foreach($dealinfo['entity']['packageContents'] as $value):?>
308
			         	<?php echo "<div>".$value."</div>";?>
309
			         <?php endforeach;?>   
310
			  </div>
311
			</div>
312
		<?php endif;?>
313
 
314
		<?php if(isset($dealinfo['entity']['detailedSpecs']) && !empty($dealinfo['entity']['detailedSpecs'])):?>
315
			<div class="pd-tab clearfix" onclick="togglelist(event,'tab2')">
316
			  <span>Detailed Specifications</span><span>-</span>
317
			</div>
318
 
319
			<div class="pd-tab-open" id="tab2" style="width:96%;">
320
			  <div class="detail-div">
321
			         <?php foreach($dealinfo['entity']['detailedSpecs'] as $key=> $value):?>
322
			         	<table>
323
				          <tr>
324
				            <th colspan="2"><?php echo $value['title']; ?></th>
325
				          </tr>
326
				           <?php foreach ($value['specs'] as $item) {?>
327
				            <tr>
328
				              <td><?php echo $item['name'];?></td>
18315 amit.gupta 329
				              <td><?php echo implode('<br>',$item['values']);?></td>
18224 naman 330
				            </tr>
331
				           <?php }?>
332
				        </table>
333
			         <?php endforeach;?>   
334
			  </div>
335
			</div>
336
		<?php endif;?>
18211 naman 337
	</div>
338
	</div>
339
 
340
</div>
341
 
342
<?php echo $this->element('footer');?>
343
 
344
 
345
 
346