Subversion Repositories SmartDukaan

Rev

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

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