-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
931 lines (824 loc) · 31.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to Swift Search</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="shortcut icon" type="image/x-icon" href="assets/images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="assets/css/style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="assets/css/common.css" media="screen" />
<script src="assets/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="assets/js/slides.min.jquery.js" type="text/javascript"></script>
<button onclick="topFunction()" id="myBtn" title="Go to top">↑</button>
<script type="text/javascript">
$(function(){
$('.slides').slides({
preload: true,
generatePagination: true,
play:3000
});
});
</script>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="assets/css/all-ie.css" />
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="assets/css/ie8.css" />
<![endif]-->
</head>
<body>
<!--Wrapper-->
<div id="wrapper">
<!--Page-->
<div class="page shadow">
<!--Header-->
<div id="header">
<div class="primary-section">
<div class="logo"> <img src="assets/images/logo.png" alt="logo" title="swiftsearch" style="position: relative;margin-left: 250px" /></a></div>
<div class="header-aside" > <span style="position: relative;margin-bottom: -300px" >Call Us: 044 666000</span>
<ul>
<li class="border"><a href="#" class="log"> View Items </a></li>
<li><a href="#" class="user">Compare Price</a></li>
<li class="carts"><a href="#" class="cart">Shopping Cart</a></li>
</ul>
</div>
</div>
<div class="nav-section">
<ul class="navigation">
<img src="gg.jpg" style="position: relative;margin-left: -80px;top: 24px;height: 90px">
</ul>
<br><br><br><br><br><br>
<!-- <div id="categ">
<input type="text" id="am12" placeholder =" Choose Product ">
<br>
</div> -->
</div>
</div>
<!--Header-->
<!--Content-->
<div id="content">
<div class="sidebar">
<div class="latest-product">
</div>
<div class="latest-product ">
<h2>OUR SERVICES</h2>
<ul class="info">
<li><a href="#">Compare Prices</a></li>
<li><a href="#">Search Engine</a></li>
<li><a href="#">Sort Products</a></li>
<li><a href="#">Intuitive platforms</a></li>
<!-- <li><a href="#">gravida auctor</a></li>
--> </ul>
<a href="#" class="auct">View More <span>»</span></a> </div>
<!-- <h1>hhhhhh</h1><h1>hhhhhh</h1><h1>hhhhhh</h1><h1>hhhhhh</h1> -->
<!-- <img src="gg.jpg"> -->
<div class="latest-product f-des">
<h2> GIFT CARDS</h2></div>
<img src="gift.jpg">
<script>
var url = 'https://wati-integration-service.clare.ai/ShopifyWidget/shopifyWidget.js?73171';
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = url;
var options = {
"enabled":true,
"chatButtonSetting":{
"backgroundColor":"#101010",
"ctaText":"Hey there!",
"borderRadius":"25",
"marginLeft":"0",
"marginBottom":"20",
"marginRight":"50",
"position":"left"
},
"brandSetting":{
"brandName":"Swift Search",
"brandSubTitle":"Typically replies within a day",
"brandImg":"https://cdn.clare.ai/wati/images/WATI_logo_square_2.png",
"welcomeText":"Hi, there!\nHow can I help you?",
"messageText":"Hello, I have a question about {{page_link}}",
"backgroundColor":"#FA7A35",
"ctaText":"Start Chat",
"borderRadius":"25",
"autoShow":false,
"phoneNumber":"917358533088"
}
};
s.onload = function() {
CreateWhatsappChatWidget(options);
};
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
</script>
<style>
*{
margin: 0;
padding: 0;
}
.rate {
float: left;
height: 46px;
padding: 0 10px;
}
.rate:not(:checked) > input {
position:absolute;
top:-9999px;
}
.rate:not(:checked) > label {
float:right;
width:1em;
overflow:hidden;
white-space:nowrap;
cursor:pointer;
font-size:30px;
color:#ccc;
}
.rate:not(:checked) > label:before {
content: '★ ';
}
.rate > input:checked ~ label {
color: #ffc700;
}
.rate:not(:checked) > label:hover,
.rate:not(:checked) > label:hover ~ label {
color: #deb217;
}
.rate > input:checked + label:hover,
.rate > input:checked + label:hover ~ label,
.rate > input:checked ~ label:hover,
.rate > input:checked ~ label:hover ~ label,
.rate > label:hover ~ input:checked ~ label {
color: #c59b08;
}
/* Modified from: https://github.com/mukulkant/Star-rating-using-pure-css */
</style>
</head>
<body>
<div class="latest-product f-des">
<h2>STAR RATING</h2></div>
<!-- ; -->
<div class="rate">
<input type="radio" id="star5" name="rate" value="5" />
<label for="star5" title="text">5 stars</label>
<input type="radio" id="star4" name="rate" value="4" />
<label for="star4" title="text">4 stars</label>
<input type="radio" id="star3" name="rate" value="3" />
<label for="star3" title="text">3 stars</label>
<input type="radio" id="star2" name="rate" value="2" />
<label for="star2" title="text">2 stars</label>
<input type="radio" id="star1" name="rate" value="1" />
<label for="star1" title="text">1 star</label>
</div>
<div class="latest-product f-des">
<h2>COMPARE PRICE</h2>
<div class="plugin">
<div id="fb-root"></div>
<div class="fb-like-box" data-href="http://www.facebook.com/" data-width="289" data-show-faces="true" data-stream="false" data-header="true"></div>
</div> </div>
</div>
<div class="content-right" >
<!-- search bar -->
<!-- <div id="categ">
<input type="text" id="am12" placeholder =" Choose Product ">
<br>
</div> --> <br><br><br>
<ul class="search-box" style="position: relative;margin-left: -296px">
<li>
<input type="text" value="search" id="am12" autocomplete="off" onkeypress="submitenter_search(event);" onblur="if (this.value=='')this.value='search';" onfocus="if (this.value=='search')this.value=''" />
</li>
<li class="sms-last">
<input type="submit" value="" class="submit" />
<a href="#"> search</a></li>
</ul>
<!-- search bar -->
<br>
<br>
<br>
<br>
<div class="banner">
<div class="slides">
<div class="slides_container">
<div class="imgeslider"><img src="assets/images/amazon.png" alt="lapy" title="product" />
<div class="banner-text">
<h1>Lorem Ipsum</h1>
<span>Lorem Ipsum is simply</span>
<p>Lorem Ipsum is simply dummy text of the printing</p>
<a href="#"> Click Here <span></span></a></div>
</div>
<div class="imgeslider"><img src="assets/images/flipkart.jpg" alt="lapy" title="product" />
<div class="banner-text">
<h1>Lorem Ipsum</h1>
<span>Lorem Ipsum is simply</span>
<p>Lorem Ipsum is simply dummy text of the printing</p>
<a href="#"> Click Here <span></span></a></div>
</div>
<div class="imgeslider"><img src="assets/images/snapdeal.png" alt="lapy" title="product" />
<div class="banner-text">
<h1>Lorem Ipsum</h1>
<span>Lorem Ipsum is simply</span>
<p>Lorem Ipsum is simply dummy text of the printing</p>
<a href="#"> Click Here <span></span></a></div>
</div>
<div class="imgeslider"><img src="assets/images/ebay.png" alt="lapy" title="product" />
<div class="banner-text">
<h1>Lorem Ipsum</h1>
<span>Lorem Ipsum is simply</span>
<p>Lorem Ipsum is simply dummy text of the printing</p>
<a href="#"> Click Here <span></span></a></div>
</div>
</div>
</div>
</div>
<div class="product-des">
<div class="product-info"><img src="assets/images/lapy-t.jpg" alt="lapy" title="product" class="lapy" />
<h2>Dell Laptop </h2>
<div class="add"><span>$12.000.00</span><a href="#">Add To Cart</a></div>
<div class="add-to-list blank">
<ul>
<li><a href="#">Add To Wish List</a></li>
<li><a href="#">+ Add To Compare</a></li>
</ul>
</div>
</div>
<div class="product-info"><img src="assets/images/g-camera.jpg" alt="g-camera" title="product" class="lapy" />
<h2>Galaxy Camera</h2>
<div class="add"><span>$2.500.00</span><a href="#">Add To Cart</a></div>
<div class="add-to-list ">
<ul>
<li><a href="#">Add To Wish List</a></li>
<li><a href="#">+ Add To Compare</a></li>
</ul>
</div>
</div>
<div class="product-info last-p"><img src="assets/images/dbl-phone.jpg" alt="dbl-ipad" title="product" class="d-phone" />
<div class="rotatebg"> </div>
<div class="newrotate">New!</div>
<h2>One Plus</h2>
<div class="add"><span>$15,500.00</span><a href="#">Add To Cart</a></div>
<div class="add-to-list ">
<ul>
<li><a href="#">Add To Wish List</a></li>
<li><a href="#">+ Add To Compare</a></li>
</ul>
</div>
</div>
</div>
</div>
<button id="ambu" onclick="myFunction1()"> Amazon </button>
<button id="flbu" onclick="myFunction2()">Flipkart</button>
<button id="snbu"onclick="myFunction3()">Snapdeal</button>
<!-- <br> <br>
--> <button id="ebbu"onclick="myFunction5()">eBay </button>
<button id="bigbu"onclick="myFunction4()">Bigbasket</button>
<button id="mybu"onclick="myFunction6()">Myntra </button>
<button id="nabu"onclick="myFunction7()">Naaptol</button>
<button id="nabu"onclick="myFunction8()">Alibaba</button>
</div>
<!-- <img src="new.jpg"> -->
<div id="buy-now" style="position: relative;margin-left: 450px" >
<script async
src="https://pay.google.com/gp/p/js/pay.js" onload="onGooglePayLoaded()" >
</script>
<script>
/**
* Define the version of the Google Pay API referenced when creating your
* configuration
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
*/
const baseRequest = {
apiVersion: 2,
apiVersionMinor: 0
};
/**
* Card networks supported by your site and your gateway
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
* @todo confirm card networks supported by your site and gateway
*/
const allowedCardNetworks = ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"];
/**
* Card authentication methods supported by your site and your gateway
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
* @todo confirm your processor supports Android device tokens for your
* supported card networks
*/
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];
/**
* Identify your gateway and your site's gateway merchant identifier
*
* The Google Pay API response will return an encrypted payment method capable
* of being charged by a supported gateway after payer authorization
*
* @todo check with your gateway on the parameters to pass
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
*/
const tokenizationSpecification = {
type: 'PAYMENT_GATEWAY',
parameters: {
'gateway': 'example',
'gatewayMerchantId': 'exampleGatewayMerchantId'
}
};
/**
* Describe your site's support for the CARD payment method and its required
* fields
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
*/
const baseCardPaymentMethod = {
type: 'CARD',
parameters: {
allowedAuthMethods: allowedCardAuthMethods,
allowedCardNetworks: allowedCardNetworks
}
};
/**
* Describe your site's support for the CARD payment method including optional
* fields
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
*/
const cardPaymentMethod = Object.assign(
{},
baseCardPaymentMethod,
{
tokenizationSpecification: tokenizationSpecification
}
);
/**
* An initialized google.payments.api.PaymentsClient object or null if not yet set
*
* @see {@link getGooglePaymentsClient}
*/
let paymentsClient = null;
/**
* Configure your site's support for payment methods supported by the Google Pay
* API.
*
* Each member of allowedPaymentMethods should contain only the required fields,
* allowing reuse of this base request when determining a viewer's ability
* to pay and later requesting a supported payment method
*
* @returns {object} Google Pay API version, payment methods supported by the site
*/
function getGoogleIsReadyToPayRequest() {
return Object.assign(
{},
baseRequest,
{
allowedPaymentMethods: [baseCardPaymentMethod]
}
);
}
/**
* Configure support for the Google Pay API
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
* @returns {object} PaymentDataRequest fields
*/
function getGooglePaymentDataRequest() {
const paymentDataRequest = Object.assign({}, baseRequest);
paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
paymentDataRequest.merchantInfo = {
// @todo a merchant ID is available for a production environment after approval by Google
// See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
// merchantId: '01234567890123456789',
merchantName: 'Example Merchant'
};
paymentDataRequest.callbackIntents = ["SHIPPING_ADDRESS", "SHIPPING_OPTION", "PAYMENT_AUTHORIZATION"];
paymentDataRequest.shippingAddressRequired = true;
paymentDataRequest.shippingAddressParameters = getGoogleShippingAddressParameters();
paymentDataRequest.shippingOptionRequired = true;
return paymentDataRequest;
}
/**
* Return an active PaymentsClient or initialize
*
* @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
* @returns {google.payments.api.PaymentsClient} Google Pay API client
*/
function getGooglePaymentsClient() {
if ( paymentsClient === null ) {
paymentsClient = new google.payments.api.PaymentsClient({
environment: "TEST",
merchantInfo: {
merchantName: "Example Merchant",
merchantId: "01234567890123456789"
},
paymentDataCallbacks: {
onPaymentAuthorized: onPaymentAuthorized,
onPaymentDataChanged: onPaymentDataChanged
}
});
}
return paymentsClient;
}
function onPaymentAuthorized(paymentData) {
return new Promise(function(resolve, reject){
// handle the response
processPayment(paymentData)
.then(function() {
resolve({transactionState: 'SUCCESS'});
})
.catch(function() {
resolve({
transactionState: 'ERROR',
error: {
intent: 'PAYMENT_AUTHORIZATION',
message: 'Insufficient funds',
reason: 'PAYMENT_DATA_INVALID'
}
});
});
});
}
/**
* Handles dynamic buy flow shipping address and shipping options callback intents.
*
* @param {object} itermediatePaymentData response from Google Pay API a shipping address or shipping option is selected in the payment sheet.
* @see {@link https://developers.google.com/pay/api/web/reference/response-objects#IntermediatePaymentData|IntermediatePaymentData object reference}
*
* @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}
* @returns Promise<{object}> Promise of PaymentDataRequestUpdate object to update the payment sheet.
*/
function onPaymentDataChanged(intermediatePaymentData) {
return new Promise(function(resolve, reject) {
let shippingAddress = intermediatePaymentData.shippingAddress;
let shippingOptionData = intermediatePaymentData.shippingOptionData;
let paymentDataRequestUpdate = {};
if (intermediatePaymentData.callbackTrigger == "INITIALIZE" || intermediatePaymentData.callbackTrigger == "SHIPPING_ADDRESS") {
if(shippingAddress.administrativeArea == "NJ") {
paymentDataRequestUpdate.error = getGoogleUnserviceableAddressError();
}
else {
paymentDataRequestUpdate.newShippingOptionParameters = getGoogleDefaultShippingOptions();
let selectedShippingOptionId = paymentDataRequestUpdate.newShippingOptionParameters.defaultSelectedOptionId;
paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(selectedShippingOptionId);
}
}
else if (intermediatePaymentData.callbackTrigger == "SHIPPING_OPTION") {
paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(shippingOptionData.id);
}
resolve(paymentDataRequestUpdate);
});
}
/**
* Helper function to create a new TransactionInfo object.
* @param string shippingOptionId respresenting the selected shipping option in the payment sheet.
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
* @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
*/
function calculateNewTransactionInfo(shippingOptionId) {
let newTransactionInfo = getGoogleTransactionInfo();
let shippingCost = getShippingCosts()[shippingOptionId];
newTransactionInfo.displayItems.push({
type: "LINE_ITEM",
label: "Shipping cost",
price: shippingCost,
status: "FINAL"
});
let totalPrice = 0.00;
newTransactionInfo.displayItems.forEach(displayItem => totalPrice += parseFloat(displayItem.price));
newTransactionInfo.totalPrice = totalPrice.toString();
return newTransactionInfo;
}
/**
* Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
*
* Display a Google Pay payment button after confirmation of the viewer's
* ability to pay.
*/
function onGooglePayLoaded() {
const paymentsClient = getGooglePaymentsClient();
paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
.then(function(response) {
if (response.result) {
addGooglePayButton();
// @todo prefetch payment data to improve performance after confirming site functionality
// prefetchGooglePaymentData();
}
})
.catch(function(err) {
// show error in developer console for debugging
console.error(err);
});
}
/**
* Add a Google Pay purchase button alongside an existing checkout button
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
* @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
*/
function addGooglePayButton() {
const paymentsClient = getGooglePaymentsClient();
const button = paymentsClient.createButton({onClick: onGooglePaymentButtonClicked});
document.getElementById('buy-now').appendChild(button);
}
/**
* Provide Google Pay API with a payment amount, currency, and amount status
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
* @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
*/
function getGoogleTransactionInfo() {
return {
displayItems: [
{
label: "Subtotal",
type: "SUBTOTAL",
price: a.toString(),
// price:"490",
},
{
label: "Tax",
type: "TAX",
price: "10",
}
],
countryCode: 'IN',
currencyCode: "INR",
totalPriceStatus: "FINAL",
// totalPrice:"500",
totalPrice: y.toString(),
totalPriceLabel: "Total"
};
}
/**
* Provide a key value store for shippping options.
*/
function getShippingCosts() {
return {
"shipping-001": "50",
"shipping-002": "70",
"shipping-003": "90",
"shipping-004": "150"
}
}
/**
* Provide Google Pay API with shipping address parameters when using dynamic buy flow.
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters|ShippingAddressParameters}
* @returns {object} shipping address details, suitable for use as shippingAddressParameters property of PaymentDataRequest
*/
function getGoogleShippingAddressParameters() {
return {
allowedCountryCodes: ['IN'],
phoneNumberRequired: true
};
}
/**
* Provide Google Pay API with shipping options and a default selected shipping option.
*
* @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingOptionParameters|ShippingOptionParameters}
* @returns {object} shipping option parameters, suitable for use as shippingOptionParameters property of PaymentDataRequest
*/
function getGoogleDefaultShippingOptions() {
return {
defaultSelectedOptionId: "shipping-001",
shippingOptions: [
{
"id": "shipping-001",
"label": "+50:Ship within Chennai",
},
{
"id": "shipping-002",
"label": "+70: Ship within Coimbatore",
},
{
"id": "shipping-003",
"label": "+90:Ship within Madurai",
},
{
"id": "shipping-004",
"label": "+150:Ship outside TN",
},
]
};
}
/**
* Provide Google Pay API with a payment data error.
*
* @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataError|PaymentDataError}
* @returns {object} payment data error, suitable for use as error property of PaymentDataRequestUpdate
*/
function getGoogleUnserviceableAddressError() {
return {
reason: "SHIPPING_ADDRESS_UNSERVICEABLE",
message: "Cannot ship to the selected address",
intent: "SHIPPING_ADDRESS"
};
}
/**
* Prefetch payment data to improve performance
*
* @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}
*/
function prefetchGooglePaymentData() {
const paymentDataRequest = getGooglePaymentDataRequest();
// transactionInfo must be set but does not affect cache
paymentDataRequest.transactionInfo = {
totalPriceStatus: 'NOT_CURRENTLY_KNOWN',
currencyCode: 'INR'
};
const paymentsClient = getGooglePaymentsClient();
paymentsClient.prefetchPaymentData(paymentDataRequest);
}
/**
* Show Google Pay payment sheet when Google Pay payment button is clicked
*/
function onGooglePaymentButtonClicked() {
const paymentDataRequest = getGooglePaymentDataRequest();
paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
const paymentsClient = getGooglePaymentsClient();
paymentsClient.loadPaymentData(paymentDataRequest);
}
/**
* Process payment data returned by the Google Pay API
*
* @param {object} paymentData response from Google Pay API after user approves payment
* @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
*/
function processPayment(paymentData) {
return new Promise(function(resolve, reject) {
setTimeout(function() {
// show returned data in developer console for debugging
console.log(paymentData);
// @todo pass payment token to your gateway to process payment
paymentToken = paymentData.paymentMethodData.tokenizationData.token;
resolve({});
}, 3000);
});
}
</script>
</div>
<!-- Content-->
<br><br>
</div>
<!-- <br> -->
<!--Footer-->
<div id="footer">
<div class="footer-top">
<div class="page">
<br><br>
<div class="f-nav-section">
<ul>
<li ><a href="index.html">Home </a></li>
<li><a href="#">Service </a></li>
<li><a href="#">Shops </a></li>
<li><a href="#">Reviews</a></li>
<li><a href="#">New Products </a></li>
<li><a href="#">Specials </a></li>
<li><a href="#" class="last">Contact </a></li>
</ul>
<div class="signup">
<ul>
<li>
<label>Leave Comments:</label>
</li>
<li>
<input type="text" value="" id="user_text" autocomplete="off" onkeypress="submitenter_search(event);" onblur="if (this.value=='')this.value='';" onfocus="if (this.value=='')this.value=''" />
</li>
<li class="sms-last"><a href="#" class="sms">sms</a></li>
</ul>
</div>
</div>
</div>
<!-- <br> -->
</div>
<div class="page">
<div class="footer-bottom">
<div class="copyright">
<ul>
<li>© 2020 </li>
<li><a href="http://www.swiftsearch.com" class="select">Swift Search</a> All Rights Reserved.</li>
<li class="last"><a href="#">Privacy Policy</a> </li>
</ul>
</div>
<div class="social-icon">
<ul>
<li><a href="#" class="facebook"></a></li>
<li><a href="#" class="twitter"></a></li>
<li class="sms-last"><a href="#" class="bing"></a></li>
</ul>
<!-- <br> -->
</div>
<!-- <br> -->
</div>
</div>
</div>
<!--Footer-->
</div>
<br>
<!-- <button id="ambu" onclick="myFunction1()">Amazon</button>
<button id="flbu" onclick="myFunction2()">Flipkart</button>
<button id="snbu"onclick="myFunction3()">Snapdeal</button>
<button id="bigbu"onclick="myFunction4()">Bigbasket</button>
<br> <br>
<button id="ebbu"onclick="myFunction5()">eBay</button>
<button id="mybu"onclick="myFunction6()">Myntra</button>
<button id="nabu"onclick="myFunction7()">Naaptol</button> -->
<!-- <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5125d19d7877c409"></script>
--><!--
--> <script>
//Get the button
var mybutton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<style >
#myBtn {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color: #101010 ;
color: white;
cursor: pointer;
padding: 15px;
border-radius: 4px;
}
#myBtn:hover {
background-color: #555;
}
</style>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
function myFunction1() {
var product = document.getElementById("am12").value;
var url = "https://www.amazon.in/s?k="+encodeURIComponent(product)+"&ref=nb_sb_noss"
// url.target= '_blank';
// window.location.href = url;
window.open(url);
}
function myFunction2() {
var product = document.getElementById("am12").value;
var url= "https://www.flipkart.com/search?q="+encodeURIComponent(product)+"&otracker=search&otracker1=search&marketplace=FLIPKART&as-show=on&as=off"
window.open(url);
}
function myFunction3() {
//www.snapdeal.com/search?clickSrc=top_searches&keyword=chocolate&categoryId=0&vertical=p&noOfResults=20&SRPID=topsearch&sort=rlvncy
var product = document.getElementById("am12").value;
var url= "https://www.snapdeal.com/search?clickSrc=top_searches&keyword="+encodeURIComponent(product)+"&categoryId=0&vertical=p&noOfResults=20&SRPID=topsearch&sort=rlvncy"
window.open(url);
}
function myFunction4() {
var product = document.getElementById("am12").value;
var url= "https://www.bigbasket.com/ps/?q="+encodeURIComponent(product)+"="
window.open(url);
}
function myFunction5() {
var product = document.getElementById("am12").value;
var url= "https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw="+encodeURIComponent(product)+"&_sacat=0&LH_TitleDesc=0&_osacat=0&_odkw="+encodeURIComponent(product)
window.open(url);
}
function myFunction6() {
var product = document.getElementById("am12").value;
var url = "https://www.myntra.com/"+encodeURIComponent(product)
window.open(url);
}
function myFunction7() {
var product = document.getElementById("am12").value;
var url = "https://www.naaptol.com/search.html?type=srch_catlg&kw="+encodeURIComponent(product)
window.open(url);
}
function myFunction8() {
var product = document.getElementById("am12").value;
// https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20210104111756&SearchText=book
var url = " https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20210104111756&SearchText="+encodeURIComponent(product)
window.open(url);
}
</script>
<!--Wrapper-->
</body>
</html>