forked from Ajay-bhagal/team_12
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Products.html
864 lines (788 loc) · 29.3 KB
/
Products.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport">
<title>Overstock.com | The Best Deals Online: Furniture, Bedding, Rugs, Kitchen Essentials & More</title>
<link href="product.css" rel="stylesheet" />
<link href="footer.css" rel="stylesheet" />
<link href="navbar.css" rel="stylesheet" />
<link rel="icon" href="https://th.bing.com/th/id/OIP.hwhAzr40Lm_D2HK9mmnWvgAAAA?w=173&h=180&c=7&r=0&o=5&dpr=1.3&pid=1.7">
<script src="https://kit.fontawesome.com/34bcab5945.js" crossorigin="anonymous"></script>
</head>
<body>
<!--Navbar Division-->
<div id="navbar">
<div class="header">
<div>
<div type="button"
data-bs-toggle="offcanvas"
data-bs-target="#offcanvasExample"
aria-controls="offcanvasExample" class="menupage">
</div>
<div class="overstocklogo" onclick="window.location.href='index.html'">
<img class="overstockIndex" src="https://i.postimg.cc/0yCKC2SV/svgexport-1.png" alt="" />
</div>
<div class="class-input">
<div>
<input type="text" placeholder="Search... everthing you find ships for free" id="Searchitem"/>
</div>
<div>
<img src="https://i.postimg.cc/tgWqzB8p/Search-1.png alt=" onclick="SearchPro()">
</div>
</div>
<div id="account1" class="class-account class-account-common">
<div onclick="window.location.href='signin$signup.html'">
<img src="https://i.postimg.cc/RCb3PDNz/User.png" alt="" />
</div>
<div onclick="window.location.href='signin$signup.html'" >Account</div>
<div class="chevronup">
<img src="https://i.postimg.cc/DZHpvK2K/Chevron-Up.png" alt="" />
</div>
<div class="Account-hidden-content">
<div>My Account</div>
<div>My Orders</div>
<div>My Reviews</div>
<div>Gift Cards</div>
<div>Help</div>
<div>Sign Out</div>
</div>
</div>
<div onclick="window.location.href='list.html'" class="class-account class-account-common">
<div>
<img src="https://i.postimg.cc/B6TrjykP/Heart.png" alt="" />
</div>
<div>Lists</div>
<div class="chevronup">
<img src="https://i.postimg.cc/DZHpvK2K/Chevron-Up.png" alt="" />
</div>
<div class="Account-hidden-content" style="right: -100%">
<div>Favorites</div>
<div>Save for Later</div>
<div>View All My Lists</div>
<div>Find a List</div>
</div>
</div>
<div id="cart1" class="class-account">
<div>
<img onclick="window.location.href='cart.html'" src="https://i.postimg.cc/DyZNh8vX/Cart-Empty.png" alt="" />
</div>
<div onclick="window.location.href=''">Cart</div>
</div>
</div>
<div class="section-div">
<div onclick="window.location.href=''"
>Furniture</div>
<div>Rugs</div>
<div>Decor</div>
<div>Bed & Bath</div>
<div>Home Improvement</div>
<div>Kitchen</div>
<div>Outdoor</div>
<div>Jewelry</div>
<div>Lighting</div>
<div>Kids & Baby</div>
<div>More</div>
<div>Holiday & Gifts</div>
<div>Sales & Deals</div>
</div>
<div class="dropdown-content-main dropdown-content-part">
<div>
<div>
<div class="D-div">Living Room Furniture</div>
<div>Sofas & Couches</div>
<div>Sectionals</div>
<div>Benches</div>
<div>Ottomans & Poufs</div>
<div>Accent Chairs</div>
<div>Recliners</div>
<div>Coffee & Accent Tables</div>
<div>TV Stands</div>
</div>
<div>
<div class="D-div">Patio & Outdoor Furniture</div>
<div>Patio Furniture Sets</div>
<div>Sofas, Chairs & Sectionals</div>
<div>Dining Sets</div>
<div>Coffee & Side Tables</div>
<div>Chaise Lounges</div>
<div>Adirondack Chairs</div>
</div>
</div>
<div>
<div>
<div class="D-div">Bedroom Furniture</div>
<div>Beds</div>
<div>Bedroom Sets</div>
<div>Headboards</div>
<div>Bed Frames</div>
<div>Dressers & Chests</div>
<div>Nightstands</div>
<div>Armoires & Wardrobes</div>
<div>Mattresses</div>
<div>Kids Beds</div>
</div>
<div>
<div class="D-div">Office Furniture</div>
<div>Desks</div>
<div>Office Chairs</div>
<div>Small Space Desks</div>
<div>Office Shelves & Storage</div>
<div>File Cabinets</div>
</div>
</div>
<div>
<div>
<div class="D-div">Dining, Kitchen & Bar</div>
<div>Kitchen & Dining Sets</div>
<div>Kitchen & Dining Chairs</div>
<div>Kitchen & Dining Tables</div>
<div>Counter & Bar Stools</div>
<div>Bar Tables</div>
<div>Buffets & Sideboards</div>
<div>Home Bars</div>
<div>Kitchen Islands & Carts</div>
<div>Kitchen Furniture</div>
</div>
<div>
<div class="D-div">More</div>
<div>Entryway</div>
<div>Bathroom</div>
<div>Home Gym</div>
<div>Rec Room</div>
<div>Small Space Living</div>
</div>
</div>
<div>
<div class="dropdown-img-cont">
<div>
<img
src="https://i.postimg.cc/tg7z1Kz4/Warrenton-Boho-Handcrafted-2-Door-Acacia-Wood-Sideboard-by-Christopher-Knight-Home.jpg"
alt=""
/>
</div>
<div>extra 15% off</div>
<div>Select Furniture by Christopher Knight*</div>
</div>
<div>
<div class="D-div">More Ways to Shop</div>
<div class="R-div">Featured Sales</div>
<div class="R-div">New Arrivals</div>
<div class="R-div">Clearance</div>
<div class="R-div">Furniture Advice</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Product Page Body Divison-->
<div id="productPageBody">
<!--First Section of Page-->
<div id="first-Section">
<p id="results">
1-30 of 318,189 Results
</p>
<h1>Home Goods Sale</h1>
<p><a href="index.html"> <i class="fa-solid fa-arrow-left-long"></i> Shop All Deals</a></p>
</div>
<!-----Sorting Section-->
<div id="Sorting">
<label for="Sort">Sort By:</label>
<select name="Sorting" id="sorting" onchange="handleSorting()">
<option value="All">Sort</option>
<option value="Ascending">Ascending</option>
<option value="descending">Descending</option>
<option value="Price_LH">Price Low-High</option>
<option value="Price_HL">Price High-Low</option>
<option value="Customer_Rating">Customer Rating</option>
</select>
</div>
<!--Product Section of Page-->
<div id="Product_Section">
<!--Apply Filter Section-->
<div id="Categorization">
<select name="Category" id="category" class="filter" onchange="CategoryFiltering()">
<option value="">Categories</option>
<option value="Home Decor">Home Decor</option>
<option value="Home Goods">Home Goods</option>
<option value="furniture">Furniture</option>
<option value="All">All</option>
</select>
<select name="Rating" id="Rating" class="filter" onchange="RatingFiltering()">
<option value="">Customer Ratings</option>
<option value="4">4 & Up</option>
<option value="3">3 & Up</option>
<option value="2">2 & Up</option>
<option value="All">All</option>
</select>
<select name="price" id="pricing" class="filter" onchange="PriceFiltering()">
<option value="">Price</option>
<option value="15000">15000 or Above</option>
<option value="1000">10000 or Above</option>
<option value="5000">5000 or above</option>
<option value="1000">1000 or Above</option>
<option value="All">All</option>
</select>
<select name="Sales" id="promotion" class="filter">
<option value="">Sales & Promotion</option>
<option value="Clearance">Clearance</option>
<option value="New Products">New Products</option>
<option value="On Sale">On Sale</option>
<option value="Best Selling">Best Selling</option>
</select>
<select name="Available" id="Avalability" class="filter">
<option value="">Availability</option>
<option value="exclude">Exclude Out of Stock item</option>
</select>
</div>
<!--Product List Display Section-->
<div id="parent">
</div>
</div>
<div id="Page_Scroller">
<i id="first_page" class="fa-solid fa-chevron-left"></i>
<p class="page" id="first_page">1</p><p class="page">2</p>
<p class="page">3</p><p class="page">4</p>
<p class="page">5</p><p class="page">6</p>
<p class="page">7</p><p class="page">8</p>
<i id="first_page" class="fa-solid fa-chevron-right"></i>
</div>
<div id="offers_section">
<img src="image/offer-1.png"/>
<img src="image/offer-2.png"/>
</div>
<div id="Experience_Section">
<p>How would you rate your search experience?</p>
<div>
<i id="emoticon" class="fa-regular fa-face-tired"></i>
<i id="emoticon" class="fa-regular fa-face-frown-open"></i>
<i id="emoticon" class="fa-regular fa-face-frown-open"></i>
<i id="emoticon" class="fa-regular fa-face-smile-beam"></i>
<i id="emoticon" class="fa-regular fa-face-grin-beam"></i>
</div>
</div>
<div id="Footer_Section">
<div id="footer_menu">
<div>
<h4>MY ACCOUNT </h4>
<p><a href="">Orders & Returns</a></p>
<p><a href="">Email Preferences</a></p>
<p> <a href=""> Account Settings</a></p>
</div>
<div >
<h4>LET US HELP </h4>
<p><a href=""><p></p>Contact Customer Care
</a></p>
<p><a href="">Shipping Information</a></p>
<p><a href="">Return Policy </a></p>
<p> <a href="">International Help </a></p>
<p><a href="">Accessibility</a></p>
</div>
<div>
<h4> COMPANY INFORMATION</h4>
<p><a href="">About Overstock™</a></p>
<p><a href="">Contact Us</a></p>
<p><a href="">Careers</a></p>
<p><a href="">Investor Relations </a></p>
<p> <a href="">Sell Your Products</a></p>
<p><a href="">Supply Chain Transparency</a></p>
</div>
<div>
<h4>MORE WAYS TO SHOP</h4>
<p> <a href="">Tips & Ideas</a></p>
<p><a href="">Deals</a></p>
<p> <a href="">Clearance </a></p>
<p> <a href="">New Arrivals</a></p>
</div>
</div>
<div id="footer_copyright">
<div id="copyrights">
<span>© Copyright 2022, Overstock.com®, Inc.</span><br>
<p style="margin-top:5px;"> 799 Coliseum Way Midvale, UT 84047 | 1-800-843-2446</p>
</div>
<div id="copyright_menu">
<p id="cmenu"><a href="">Privacy Policy</a></p>
<p id="cmenu"><a href="">Terms & Conditions</a></p>
<p id="cmenu"><a href="">*Promotion Terms</a></p>
<p id="cmenu" style="margin-top:15px;"><a href="">Ship to: <img src="https://ak1.ostkcdn.com/img/mxc/intFlag_IN.gif" id="flag"/></a></p>
</div>
</div>
</div>
</body>
</html>
<script>
var product=[
{
id:1,
name:"SAFAVIEH California Shag Izat 2-inch Thick Area Rug - 2'3 Runner - Ivory",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/fa0de7e5f6db966631851fdd3f058a6b965ff170/SAFAVIEH-California-Shag-Izat-2-inch-Thick-Rug.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:3063.50,
rating:4.5,
offer:30,
cost:6789.6,
category:"Home Decor",
ptype:"rugs",
},
{
id:2,
name:"Mabel Linen Fabric Sleeper Sectional with cupholder, USB charging port and pocket",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/34d5d21c3a01a1ce5dd7735e0857d8eea189c038/Mabel-Linen-Fabric-Sleeper-Sectional-with-cupholder%2C-USB-charging-port-and-pocket.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:61613,
rating:3.5,
offer:25,
cost:64231,
category:"furniture"
},
{
id:3,
name:"Aurora Home Thermal Insulated Blackout Grommet Top Curtain Panel Pair",
image_url:"https://ak1.ostkcdn.com/images/products/9515041/Aurora-Home-Thermal-Insulated-Blackout-Grommet-Top-Curtain-Panel-Pair-10719f7e-8633-45e8-911f-f029219375e0_600.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:3000,
rating:"4.5",
offer:25,
cost:3031,
category:"Home Decor",
},
{
id:4,
name:"SAFAVIEH Adirondack Vera Modern Ombre Distressed Stripe Area Rug",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/57e55b6b50af4de47b5b254913333668cb30dec4/SAFAVIEH-Adirondack-Vera-Modern-Ombre-Distressed-Stripe-Area-Rug.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:2173,
rating:"4.5",
offer:20,
cost:2201,
category:"Home Decor",
ptype:"rugs",
},
{
id:5,
name:"TeePee Tent Twin Floor Bed",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/b134112b90b31e831d272f935361423b260877b4/TeePee-Tent-Twin-Bed.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:1350,
rating:4.5,
offer:50,
cost:16238,
category:"furniture",
ptype:"Bed",
},
{
id:6,
name:"Kraus Bolden 2-Function 1-Handle Commercial Pulldown Kitchen Faucet",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/d311c314916e7efa40509003d3ca9cff80f0e58b/Kraus-KPF-1610-Bolden-Commercial-2-Function-Pulldown-Kitchen-Faucet.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:13796,
rating:4.5,
offer:25,
cost:12661,
category:"Home Goods"
},
{
id:7,
name:"Rustic Wooden Floating Wall Shelves (Set of 2)",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/d14a8ea2336e8cbc99771690f2b44d1942d3f6bd/Floating-Shelves-Rustic-Wood-Wall-Shelf-USA-Handmade-Set-of-2.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:3684,
rating:4.5,
offer:10,
cost:3936,
category:"Home Decor"
},
{
id:8,
name:"SAFAVIEH Madison Diederike Boho Medallion Distressed Rug",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/709fee12c5b7e2b834fe98b74814982b8b9a1d15/SAFAVIEH-Madison-Diederike-Boho-Medallion-Distressed-Rug.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:2136,
rating:"4.5",
offer:10,
cost:2059,
category:"Home Decor",
ptype:"rugs",
},
{
id:9,
name:"Brookside Tara Square Tufted Upholstered Platform Bed",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/61141aac4c39eb90e24011d5ddce0ac8ccc8efd6/Brookside-Tara-Square-Tufted-Upholstered-Platform-Bed.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:14003,
rating:3.5,
offer:35,
cost:15931,
category:"furniture",
ptype:"Bed",
},
{
id:10,
name:"East West Furniture Interlock Hardwood Floor Tiles - Engineered Wood Flooring for Indoor (Color Option)",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/edef19e7e7f83f8c8c8c4baf4bf3b60fb59de845/East-West-Furniture-SP-5OH01-Interlock-Hardwood-Floor-Tiles---Engineered-Wood-Flooring-for-Indoor%2C-Oak-Chestnut-Finish.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:14769,
rating:0,
offer:15,
cost:14794,
category:"Home Goods"
},
{
id:11,
name:"Home Dynamix Buffalo Bear Rustic Area Rug",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/1a9f4209a16a08f0c0c219dc05f3c7c1e63859c4/SAFAVIEH-Lyndhurst-Ambrogina-Traditional-Rug.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:1797,
rating:4.5,
offer:30,
cost:2106,
category:"Home Decor",
ptype:"rugs"
},
{
id:12,
name:"Subrtex Stretch Spandex 2-piece Armchair Slipcover Furniture Protector",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/6ece6ceb86ac7e232598e6d4085b7a5ece1eb3b7/Subrtex-Stretch-Armchair-Slipcover-2-Piece-Spandex-Furniture-Protector.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:2504,
rating:4.5,
offer:20,
cost:2472,
category:"Home Decor"
},
{
id:13,
name:"Key West Bathroom Storage Cabinet with Doors by Bush Furniture",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/975311835232303dc7382db7011d8093fd3fbce9/My-Texas-House-by-Orian-Indoor-Outdoor-Lady-Bird-Natural-Runner-Rug.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:21000,
rating:3,
offer:10,
cost:21826,
category:"furniture"
},
{
id:14,
name:"Cheer Collection Solid Color Faux Fur Throw Pillows (Set of 2)",
image_url:"https://ak1.ostkcdn.com/images/products/14053721/Cheer-Collection-Faux-Fur-Throw-Pillow-Set-of-2-3634cd3e-4f24-4246-8350-223bcb3077ac_600.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:2381,
rating:4,
offer:20,
cost:2443,
category:"Home Decor"
},
{
id:15,
name:"Key West 60W L Shaped Desk by Bush Furniture",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/edb95008a14fb6666497a298481db6fd6fc5ff7e/The-Gray-Barn-Hatfield-60-inch-L-shaped-Desk.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:15000,
rating:4.5,
offer:20,
cost:15705,
category:"furniture"
},
{
id:16,
name:"SAFAVIEH Vision Tanasa Modern Ombre Tonal Rug",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/6f2f4c20d2f89bed074d54fbdf2ad920533a8657/SAFAVIEH-Vision-Tanasa-Modern-Ombre-Tonal-Rug.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:2394,
rating:4.5,
offer:15,
cost:2398,
category:"Home Decor",
ptype:"rugs",
},
{
id:17,
name:"SEI Furniture Denargo Black Spine Tower Shelf",
image_url:"https://ak1.ostkcdn.com/images/products/12527083/Harper-Blvd-Ferguson-Black-Spine-Tower-Shelf-074cc908-c3b4-43c1-af5c-b9ada8e8b112_600.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:10106,
rating:4,
offer:10,
cost:10124,
category:"furniture"
},
{
id:18,
name:"Designart 'Geometric Cream Block II' Modern Glam Framed Canvas - Multi-color",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/802ee1b729dd1a43a067b875ae2d7754d591dd52/Designart-%27Geometric-Cream-Block-II%27-Modern-Glam-Framed-Canvas.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:5895,
rating:4.5,
offer:20,
cost:6299,
category:"Home Decor",
ptype:"wall Decor",
},
{
id:19,
name:"SAFAVIEH Florida Shag Sigtraud Abstract Waves 1.2-inch Area Rug",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/44d606cf7157741e1e1e4d6b1ec3989ada1d44b1/SAFAVIEH-Florida-Shag-Sigtraud-Abstract-Waves-1.2-inch-Thick-Rug.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:3610,
rating:3.5,
offer:20,
cost:3558,
category:"Home Decor",
ptype:"rugs",
},
{
id:20,
name:"Moro Handcrafted Modern Cotton Pouf by Christopher Knight Home",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/0fca08feca2587d3c7502ed689d8b47150a36076/Moro-Handcrafted-Cotton-Pouf-by-Christopher-Knight-Home.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:4171,
rating:4,
offer:20,
cost:4441,
category:"Home Decor"
},
{
id:21,
name:"TRINITY-Sliding-Undersink-Organizer",
image_url:"https://ak1.ostkcdn.com/images/products/23507547/TRINITY-Sliding-Undersink-Organizer-d9272da2-9bc6-46c9-b3d6-aa4c7679ad11_600.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:5305,
rating:3,
offer:10,
cost:5505,
category:"Home Goods"
},
{
id:22,
name:"Zenvida Rustic Grey Bistro / Pub Table 5-piece Dining Set",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/4264f8bc6f7411d93a41bcfadf847952575ebf80/Zenvida-5-Piece-Bistro---Pub-Table-Set-With-4-Stools.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:14946,
rating:3.5,
offer:10,
cost:14972,
category:"Home Goods"
},
{
id:23,
name:"Flannibrook House Bed Frame",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/2e8d8c0f63fa10b6875faf4235dae423156af3df/Flannibrook-White-Full-House-Bed-Frame.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:20419,
rating:4,
offer:10,
cost:22969,
category:"furniture",
ptype:"Bed",
},
{
id:24,
name:"XXXL Extra Large Woven Cotton Rope Tall 25 Height Laundry Hamper Basket with Handles",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/67204db01a135c58518ceb963f89affd4257fe5c/XXXL-Extra-Large-Woven-Cotton-Rope-Tall-25%22-Height-Laundry-Hamper-Basket-with-Handles---20-x-25.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:4642,
rating:3,
offer:10,
cost:4349,
category:"Home Goods"
},
{
id:25,
name:"36in x 84in K Series Pine Wood Sliding Barn Door With Hardware Kit",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/ab3155dacecbc162030e44db35f7c81428e373bb/36in-x-84in-K-Series-Pine-Wood-Sliding-Barn-Door-With-Hardware-Kit.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:31239,
rating:4,
offer:10,
cost:32837,
category:"Home Decor"
},
{
id:26,
name:"Black Metal Field of Trees Wall Decor",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/1696c79c53891be9249991c09022bd89bc20ae6c/Black-Metal-Field-of-Trees-Wall-Decor.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:10858,
rating:4,
offer:10,
cost:11858,
category:"Home Decor",
ptype:"wall Decor",
},
{
id:27,
name:"Metro2 door Solid Wood Mirror Wardrobe by Palace Imports",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/71e5eb10024712f7819b0174d2e57a10d302ebad/Metro-2-door-Solid-Wood-Mirror-Wardrobe-by-Palace-Imports.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:31239,
rating:4,
offer:10,
cost:32837,
category:"furniture"
},
{
id:28,
name:"Simple Living Manhattan Bar Cart",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/896bc813bdfaadb291c9ed745d2ec59e10a32fee/Simple-Living-Manhattan-Bar-Cart.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:61613,
rating:3.5,
offer:25,
cost:64231,
category:"furniture"
},
{
id:29,
name:"SAFAVIEH Natura Gerta Handmade Wool Area Rug",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/e1fb5466f94b0fe6f76093d889cf1cf1ba711dc3/SAFAVIEH-Natura-Gerta-Handmade-Wool-Area-Rug.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:3000,
rating:"4.5",
offer:25,
cost:3031,
category:"Home Decor",
ptype:"rugs",
},
{
id:30,
name:"White Stained Glass Floral Art Large FloralWall Art Canvas",
image_url:"https://ak1.ostkcdn.com/images/products/is/images/direct/001b9a6064d7b8529c75ed0fad7c1f7bd1f636e7/White-Stained-Glass-Floral-Art---Large-Floral-Wall-Art-Canvas.jpg?imwidth=480&impolicy=medium",
qty:1,
fprice:2173,
rating:"4.5",
offer:20,
cost:2201,
category:"Home Decor",
ptype:"wall Decor",
},
];
productList(product);
function CategoryFiltering()
{
var SelectedProducts=document.querySelector("#category").value;
var filteredProduct=product.filter(function(elem){
return elem.category===SelectedProducts;
});
productList(filteredProduct);
}
function RatingFiltering()
{
var SelectedProducts=parseInt(document.querySelector("#Rating").value);
var filteredProduct=product.filter(function(elem){
return elem.rating>=SelectedProducts;
});
productList(filteredProduct);
}
function PriceFiltering()
{
var SelectedProducts=parseInt(document.querySelector("#pricing").value);
var filteredProduct=product.filter(function(elem){
return elem.fprice>=SelectedProducts;
});
productList(filteredProduct);
}
function handleSorting()
{
var Selected=document.querySelector("#sorting").value;
if(Selected==="Ascending"){
product.sort(function(a,b){
if(a.name>b.name){
return 1;
}
if(a.name<b.name){
return -1;
}
return 0;
});
}
else if(Selected==="descending"){
product.sort(function(a,b){
if(a.name<b.name){
return 1;
}
if(a.name>b.name){
return -1;
}
return 0;
});
}
else if(Selected==="Price_LH"){
product.sort(function(a,b){
return a.fprice-b.fprice;
});
}
else if(Selected==="Price_HL"){
product.sort(function(a,b){
return b.fprice-a.fprice;
});
}
else if(Selected==="Customer_Rating"){
product.sort(function(a,b){
return b.rating-a.rating;
});
}
productList(product);
}
function productList(list_product){
var length=list_product.length;
document.getElementById("results").textContent="1-"+length+" of 318,189 Results";
document.getElementById("parent").textContent="";
list_product.map(function(elem)
{
var div=document.createElement("div");
var img=document.createElement("img");
img.setAttribute("src",elem.image_url);
img.setAttribute("alt",elem.name);
img.setAttribute("id","Product_image");
img.addEventListener("click",()=>{
localStorage.setItem("product_data",JSON.stringify(elem));
location.href="productDetails.html";
})
var wishlist=document.createElement("div");
wishlist.setAttribute("id","wishlist");
var like=document.createElement("i");
like.setAttribute("class","fa-regular fa-heart");
like.setAttribute("id","like");
like.addEventListener("click",function(){
if(document.getElementById("like").className=="fa-regular fa-heart")
{
like.setAttribute("class","fa-solid fa-heart");
}
else{
like.setAttribute("class","fa-regular fa-heart");
}
});
var price=document.createElement("h4");
price.textContent="Sale Starts at INR "+elem.fprice;
price.setAttribute("id","Product_price")
var ratBox=document.createElement("div");
img.setAttribute("class","Ratbox")
var rating=document.createElement("img");
rating.setAttribute("src","https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSyNm3O0L9PWAzL3oGmbsZl_EgQEggF6mlR1w&usqp=CAU");
rating.setAttribute("id","rating_image")
var rate=document.createElement("p");
rate.textContent=elem.rating;
rate.setAttribute("id","rating")
var link=document.createElement("a");
link.setAttribute("href","");
link.innerHTML="Details";
link.setAttribute("id","Product_details")
var name=document.createElement("p");
name.textContent=elem.name;
name.setAttribute("id","Product_name")
ratBox.append(rating,rate,link);
wishlist.append(like);
div.append(wishlist,img,price,ratBox,name);
document.getElementById("parent").append(div);
});
}
function SearchPro()
{
var SelectedProducts=document.querySelector("#Searchitem").value;
var filteredProduct=product.filter(function(elem){
return (elem.category===SelectedProducts || elem.ptype===SelectedProducts);
});
productList(filteredProduct);
}
</script>