Subversion Repositories SmartDukaan

Rev

Rev 18753 | Rev 18773 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18753 Rev 18768
Line 7... Line 7...
7
		$('span#totalPayable').text(' ₹ 0');
7
		$('span#totalPayable').text(' ₹ 0');
8
		$('button.confirmcheckout').prop( "disabled", true );
8
		$('button.confirmcheckout').prop( "disabled", true );
9
		$('.confirmprepaid').addClass('confirmprepaidDisabled').removeClass('confirmprepaid');
9
		$('.confirmprepaid').addClass('confirmprepaidDisabled').removeClass('confirmprepaid');
10
		$('button.confirmcredit').prop( "disabled", true );
10
		$('button.confirmcredit').prop( "disabled", true );
11
		$('button.confirmcod').prop( "disabled", true );
11
		$('button.confirmcod').prop( "disabled", true );
-
 
12
		$('span#CreditError').text('');
12
	}else{
13
	}else{
13
		$('button.confirmcheckout').prop( "disabled", false );
14
		$('button.confirmcheckout').prop( "disabled", false );
14
		$('.confirmprepaidDisabled').addClass('confirmprepaid').removeClass('confirmprepaidDisabled');
15
		$('.confirmprepaidDisabled').addClass('confirmprepaid').removeClass('confirmprepaidDisabled');
15
		$('button.confirmcredit').prop( "disabled", false );
16
		$('button.confirmcredit').prop( "disabled", false );
16
		$('button.confirmcod').prop( "disabled", false );
17
		$('button.confirmcod').prop( "disabled", false );
17
	}
18
	}
18
	var totalPayable = <?php echo $totalPayable;?>;
19
	var totalPayable = <?php echo $totalPayable;?>;
19
	var creditLimit = <?php echo $creditLimit;?>;
20
	var creditLimit = <?php echo $creditLimit;?>;
20
	var creditTicketSize = <?php echo $creditTicketSize;?>;
21
	var creditTicketSize = <?php echo $creditTicketSize;?>;
-
 
22
	localStorage.removeItem('creditLimit', creditLimit);
-
 
23
	localStorage.setItem('creditLimit',);
-
 
24
	localStorage.removeItem('creditTicketSize');
-
 
25
	localStorage.setItem('creditLimit', creditTicketSize);
-
 
26
	localStorage.removeItem('totalPayable');
-
 
27
	localStorage.setItem('totalPayable', totalPayable);
21
 
28
	
22
	if(cart_details == undefined || creditTicketSize>totalPayable || totalPayable>=creditLimit){
29
	if(cart_details == undefined || creditTicketSize>totalPayable || totalPayable>=creditLimit){
23
		$('button.confirmcredit').prop( "disabled", true );
30
		$('button.confirmcredit').prop( "disabled", true );
24
	}else{
31
	}else{
25
		$('button.confirmcredit').prop( "disabled", false );
32
		$('button.confirmcredit').prop( "disabled", false );
-
 
33
		var creditAvailable = $("input.css-checkbox:checked").attr('credit_available');
-
 
34
	    if(creditAvailable=='true'){
-
 
35
	    	$('button.confirmcredit').prop( "disabled", false );
-
 
36
	    	$('button.confirmcredit').attr('style', 'background-color: #5cb85c;color: #fff');
-
 
37
	    }else{
-
 
38
	    	$('button.confirmcredit').prop( "disabled", true );
-
 
39
	    	$('button.confirmcredit').attr('style', 'background-color: #B4CAB4');
-
 
40
	    }
26
	}
41
	}
27
	var creditAvailable = $("input.css-checkbox:checked").attr('credit_available');
-
 
28
    if(creditAvailable=='true'){
-
 
29
    	$('button.confirmcredit').prop( "disabled", false );
-
 
30
    	$('button.confirmcredit').attr('style', 'background-color: #5cb85c;color: #fff');
-
 
31
    }else{
-
 
32
    	$('button.confirmcredit').prop( "disabled", true );
-
 
33
    	$('button.confirmcredit').attr('style', 'background-color: #B4CAB4');
-
 
34
    }
-
 
35
 
42
 
36
	if (window.history && window.history.pushState) {
43
	if (window.history && window.history.pushState) {
37
		$(window).on('popstate', function() {
44
		$(window).on('popstate', function() {
38
        	$('#myModal').modal('hide');
45
        	$('#myModal').modal('hide');
39
            $("#cartloader").addClass('hidden');
46
            $("#cartloader").addClass('hidden');
Line 199... Line 206...
199
						<input type="radio" class="css-checkbox"
206
						<input type="radio" class="css-checkbox"
200
							id='<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>'
207
							id='<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>'
201
							value='<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>'
208
							value='<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>'
202
							name="selectedaddress"
209
							name="selectedaddress"
203
							<?php if($defaultselectedaddress == $address['addresses'][$firstshowaddress[$i]]['id']){echo "checked";}?>
210
							<?php if($defaultselectedaddress == $address['addresses'][$firstshowaddress[$i]]['id']){echo "checked";}?>
204
							<?php if($address['addresses'][$firstshowaddress[$i]]['creditOptionAvailable']):?> credit_available="true" <?php else: ?> credit_available="false"<?php endif;?> >
211
							<?php if($creditorAssociated && $address['addresses'][$firstshowaddress[$i]]['creditOptionAvailable']):?> credit_available="true" <?php else: ?> credit_available="false"<?php endif;?> >
205
 
212
 
206
						<label
213
						<label
207
							for="<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>"
214
							for="<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>"
208
							class="css-label radGroup2"
215
							class="css-label radGroup2"
209
							data-pin="<?php echo $address['addresses'][$firstshowaddress[$i]]['pin'];?>"
216
							data-pin="<?php echo $address['addresses'][$firstshowaddress[$i]]['pin'];?>"
Line 218... Line 225...
218
							if(isset($address['addresses'][$firstshowaddress[$i]]['state']) && !empty($address['addresses'][$firstshowaddress[$i]]['state']))
225
							if(isset($address['addresses'][$firstshowaddress[$i]]['state']) && !empty($address['addresses'][$firstshowaddress[$i]]['state']))
219
							{echo ", ",$address['addresses'][$firstshowaddress[$i]]['state'];}
226
							{echo ", ",$address['addresses'][$firstshowaddress[$i]]['state'];}
220
							if(isset($address['addresses'][$firstshowaddress[$i]]['pin']) && !empty($address['addresses'][$firstshowaddress[$i]]['pin']))
227
							if(isset($address['addresses'][$firstshowaddress[$i]]['pin']) && !empty($address['addresses'][$firstshowaddress[$i]]['pin']))
221
							{echo ",",$address['addresses'][$firstshowaddress[$i]]['pin'];}
228
							{echo ",",$address['addresses'][$firstshowaddress[$i]]['pin'];}
222
							?> </label>
229
							?> </label>
-
 
230
							<?php if($creditorAssociated):?>
223
							<?php if($address['addresses'][$firstshowaddress[$i]]['creditOptionAvailable']):?>
231
							<?php if($address['addresses'][$firstshowaddress[$i]]['creditOptionAvailable']):?>
224
							<i class="glyphicon glyphicon-info-sign pull-right" style="font-size: 10px;color: #36BBD9;"> 
232
							<i class="glyphicon glyphicon-info-sign pull-right" style="font-size: 10px;color: #36BBD9;"> 
225
							<span style="color: #36BBD9;font-size: 10px;font-family: &quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;">Credit Available</span>
233
							<span style="color: #36BBD9;font-size: 10px;font-family: &quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;">Credit Available</span>
226
							</i>
234
							</i>
227
							<?php endif;?>
235
							<?php endif;?>
-
 
236
							<?php endif;?>
-
 
237
							<?php if($taxInvoiceEnabledUser):?>
228
							<br>
238
							<br>
229
							<?php if($address['addresses'][$firstshowaddress[$i]]['taxInvoiceAvailable']):?>
239
							<?php if($address['addresses'][$firstshowaddress[$i]]['taxInvoiceAvailable']):?>
230
							<i class="glyphicon glyphicon-info-sign pull-right" style="font-size: 10px;color: #42A150;"> 
240
							<i class="glyphicon glyphicon-info-sign pull-right" style="font-size: 10px;color: #42A150;"> 
231
							<span style="color: #42A150;font-size: 10px;font-family: &quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;">Tax Invoice</span>
241
							<span style="color: #42A150;font-size: 10px;font-family: &quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;">Tax Invoice Available</span>
232
							</i>
242
							</i>
233
							<?php endif;?>
243
							<?php endif;?>
-
 
244
							<?php endif;?>
234
 
245
 
235
					</div>
246
					</div>
236
					<hr style='margin: 0px; padding: 0px; border-color: #58d936;'>
247
					<hr style='margin: 0px; padding: 0px; border-color: #58d936;'>
237
					<?php //endif;?>
248
					<?php //endif;?>
238
 
249
 
Line 255... Line 266...
255
	<div class="modal fade" id="myModal">
266
	<div class="modal fade" id="myModal">
256
		<div class="modal-dialog">
267
		<div class="modal-dialog">
257
			<div class="modal-content"
268
			<div class="modal-content"
258
				style="background-color: #f0f0f0; color: #555;">
269
				style="background-color: #f0f0f0; color: #555;">
259
				<div class="modal-body">
270
				<div class="modal-body">
260
					<p id="confirmOrderText" addressId="" checkoutType="" style="color: #ff0000;" class="text-center"></p>
271
					<p id="confirmOrderText" addressId="" checkoutType="" style="color: #555;" class="text-center"></p>
261
				</div>
272
				</div>
262
				<div class="modal-footer">
273
				<div class="modal-footer">
263
					<button type="button" class="btn btn-md  pull-left" id="changeOption"
274
					<button type="button" class="btn btn-md  pull-left" id="changeOption"
264
						style="background-color: #58d936; color: #fff;">
275
						style="background-color: #58d936; color: #fff;">
265
						<strong>Change Option<br>(विकल्प बदलें)</strong>
276
						<strong>Change Option<br>(विकल्प बदलें)</strong>
Line 324... Line 335...
324
								<span style="font-size: 8px;">Credit Limit<span style="color:#ff0000;font-size:12px;"> &#8377; <?php echo number_format($creditLimit);?></span></span>
335
								<span style="font-size: 8px;">Credit Limit<span style="color:#ff0000;font-size:12px;"> &#8377; <?php echo number_format($creditLimit);?></span></span>
325
							</div>
336
							</div>
326
						</div>
337
						</div>
327
						<?php endif;?>
338
						<?php endif;?>
328
					<?php else:?>
339
					<?php else:?>
329
							<span style='color: red; font-size: 11px; " margin: 0px 10px 0px 0px;'>* Your Credit Limit is less than Order Amount. <br>* आपकी उपलब्ध क्रेडिट लिमिट आर्डर राशि से कम है। </span>
340
							<span id="CreditError"  style='color: red; font-size: 11px; " margin: 0px 10px 0px 0px;'>* Your Credit Limit is less than Order Amount. <br>* आपकी उपलब्ध क्रेडिट लिमिट आर्डर राशि से कम है। </span>
330
							<?php if($codAvailable):?>
341
							<?php if($codAvailable):?>
331
							<div class="col-xs-12" style="margin-left: 20px;">
342
							<div class="col-xs-12" style="margin-left: 20px;">
332
								<div class="col-xs-4">
343
								<div class="col-xs-4">
333
									<button type="button" class="btn btn-md confirmprepaid"
344
									<button type="button" class="btn btn-md confirmprepaid"
334
										style="margin: 10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">Other</button>
345
										style="margin: 10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">Other</button>
Line 365... Line 376...
365
								</div>
376
								</div>
366
							</div>
377
							</div>
367
							<?php endif;?>
378
							<?php endif;?>
368
					<?php endif;?>
379
					<?php endif;?>
369
				<?php else:?>
380
				<?php else:?>
370
						<span style='color: red; font-size: 11px; " margin: 0px 10px 0px 0px;'>* Minimum Order Amount Should be  &#8377; <?php echo number_format($creditTicketSize);?> for Credit <br>* क्रेडिट के लिए न्यूनतम आर्डर राशि  &#8377; <?php echo number_format($creditTicketSize);?> होनी चाहिए ।</span>
381
						<span id="CreditError"  style='color: red; font-size: 11px; " margin: 0px 10px 0px 0px;'>* Minimum Order Amount Should be  &#8377; <?php echo number_format($creditTicketSize);?> for Credit <br>* क्रेडिट के लिए न्यूनतम आर्डर राशि  &#8377; <?php echo number_format($creditTicketSize);?> होनी चाहिए ।</span>
371
							<?php if($codAvailable):?>
382
							<?php if($codAvailable):?>
372
							<div class="col-xs-12" style="margin-left: 20px;">
383
							<div class="col-xs-12" style="margin-left: 20px;">
373
								<div class="col-xs-4">
384
								<div class="col-xs-4">
374
									<button type="button" class="btn btn-md confirmprepaid"
385
									<button type="button" class="btn btn-md confirmprepaid"
375
										style="margin: 10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">Other</button>
386
										style="margin: 10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">Other</button>