Skip to content

Commit 36b53a5

Browse files
committed
cart part 1
1 parent 725404a commit 36b53a5

5 files changed

Lines changed: 181 additions & 75 deletions

File tree

assets/products.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"originalPrice": "",
1111
"discount": "",
1212
"finalPrice": "27,960.40 $",
13+
"stock": 1,
1314
"buyLink": "../products/product page.html"
1415
},
1516
{
@@ -23,6 +24,7 @@
2324
"originalPrice": "",
2425
"discount": "",
2526
"finalPrice": "6,399.70 $",
27+
"stock": 1,
2628
"buyLink": "../products/product page.html"
2729
},
2830
{
@@ -36,6 +38,7 @@
3638
"originalPrice": "10,561.95 $",
3739
"discount": "-5%",
3840
"finalPrice": "10,033.85 $",
41+
"stock": 1,
3942
"buyLink": "../products/product page.html"
4043
},
4144
{
@@ -49,6 +52,7 @@
4952
"originalPrice": "",
5053
"discount": "",
5154
"finalPrice": "23769.91 $",
55+
"stock": 1,
5256
"buyLink": "../products/product page.html"
5357
},
5458
{
@@ -62,6 +66,7 @@
6266
"originalPrice": "",
6367
"discount": "",
6468
"finalPrice": "41,499.46 $",
69+
"stock": 1,
6570
"buyLink": "../products/product page.html"
6671
},
6772
{
@@ -75,6 +80,7 @@
7580
"originalPrice": "29,642.47 $",
7681
"discount": "-10%",
7782
"finalPrice": "26,678.22 $",
83+
"stock": 1,
7884
"buyLink": "../products/product page.html"
7985
},
8086
{
@@ -88,6 +94,7 @@
8894
"originalPrice": "",
8995
"discount": "",
9096
"finalPrice": "59,284.95 $",
97+
"stock": 1,
9198
"buyLink": "../products/product page.html"
9299
},
93100
{
@@ -101,6 +108,7 @@
101108
"originalPrice": "",
102109
"discount": "",
103110
"finalPrice": "8,389.38 $",
111+
"stock": 1,
104112
"buyLink": "../products/product page.html"
105113
},
106114
{
@@ -114,6 +122,7 @@
114122
"originalPrice": "",
115123
"discount": "",
116124
"finalPrice": "7,830.09 $",
125+
"stock": 1,
117126
"buyLink": "../products/product page.html"
118127
},
119128
{
@@ -127,6 +136,7 @@
127136
"originalPrice": "46,700.88 $",
128137
"discount": "-7%",
129138
"finalPrice": "43,431.818 $",
139+
"stock": 1,
130140
"buyLink": "../products/product page.html"
131141
},
132142
{
@@ -140,6 +150,7 @@
140150
"originalPrice": "",
141151
"discount": "",
142152
"finalPrice": "41,667.25 $",
153+
"stock": 1,
143154
"buyLink": "../products/product page.html"
144155
},
145156
{
@@ -148,11 +159,12 @@
148159
"status": "isNormal",
149160
"image": "../images/product/kawasaki product/Versys_650_Tourer.png",
150161
"logo": "../images/product logos/kawasaki logo.png",
151-
"name": "Versys_650_Tourer",
162+
"name": "Versys 650 Tourer",
152163
"description": "A versatile touring motorcycle with a 649cc engine, 67 hp, and long-distance comfort",
153164
"originalPrice": "",
154165
"discount": "",
155166
"finalPrice": "8,586.53 $",
167+
"stock": 1,
156168
"buyLink": "../products/product page.html"
157169
}
158170
]

cart/cart.html

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<div class="chosen_products_box">
4949
<div class="cart_header">
5050
<h2>Shopping Cart</h2>
51-
<p>You have: 3 items in your cart.</p>
51+
<p>You have: 0 items in your cart.</p>
5252
</div>
5353

5454
<div class="cart_filter">
@@ -61,45 +61,8 @@ <h2>Shopping Cart</h2>
6161
</div>
6262

6363
<div class="chosen_products_list">
64-
<ul>
65-
<li>
66-
<div class="chosen_product_list">
67-
<i class="delete_product fa-solid fa-xmark"></i>
68-
<div class="chosen_product_img_box"><a href="../motorcycle catalog/motorcycles.html#6"><img src="../images/product/kawasaki product/h2 sx.png" alt=""></a></div>
69-
<ul>
70-
<li>Ninja h2 sx</li>
71-
<li>26,678.22 $</li>
72-
<li><input class="chosen_product_input" type="number" value="1" min="1"></li>
73-
<li>26,678.22 $</li>
74-
</ul>
75-
</div>
76-
</li>
77-
78-
<li>
79-
<div class="chosen_product_list">
80-
<i class="delete_product fa-solid fa-xmark"></i>
81-
<div class="chosen_product_img_box"><a href="../motorcycle catalog/motorcycles.html#1"><img src="../images/product/kawasaki product/z1000sx.png" alt=""></a></div>
82-
<ul>
83-
<li>Z1000SX</li>
84-
<li>27,960.40 $</li>
85-
<li><input class="chosen_product_input" type="number" value="1" min="1"></li>
86-
<li>27,960.40 $</li>
87-
</ul>
88-
</div>
89-
</li>
90-
91-
<li>
92-
<div class="chosen_product_list">
93-
<i class="delete_product fa-solid fa-xmark"></i>
94-
<div class="chosen_product_img_box"><a href="../motorcycle catalog/motorcycles.html#2"><img src="../images/product/suzuki product/GSX-R125.png" alt=""></a></div>
95-
<ul>
96-
<li>GSX-R125</li>
97-
<li>6,399.70 $</li>
98-
<li><input class="chosen_product_input" type="number" value="1" min="1"></li>
99-
<li>6,399.70 $</li>
100-
</ul>
101-
</div>
102-
</li>
64+
<ul id="chosen_products_list_ul">
65+
10366
</ul>
10467

10568
<form action="cart.html" method="get">

moto ride.css

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,6 +2763,11 @@ i {
27632763
list-style: none;
27642764
}
27652765

2766+
.cart_filter ul li {
2767+
width: 85px;
2768+
overflow-x: hidden;
2769+
}
2770+
27662771
.chosen_product_list {
27672772
width: 100%;
27682773
height: 200px;
@@ -2774,7 +2779,7 @@ i {
27742779
position: relative;
27752780
}
27762781

2777-
.delete_product {
2782+
.cart_delete {
27782783
cursor: pointer;
27792784
position: absolute;
27802785
left: 0%;
@@ -2810,6 +2815,11 @@ i {
28102815
width: calc(100% - 300px);
28112816
}
28122817

2818+
.chosen_product_list ul li {
2819+
width: 85px;
2820+
overflow-x: hidden;
2821+
}
2822+
28132823
.chosen_product_input {
28142824
width: 35px;
28152825
color: black;
@@ -2975,6 +2985,10 @@ i {
29752985
width: calc(100% - 135px);
29762986
}
29772987

2988+
.cart_filter ul li {
2989+
width: 60px;
2990+
}
2991+
29782992
.chosen_product_img_box {
29792993
width: 100px;
29802994
height: 100px;
@@ -2986,6 +3000,10 @@ i {
29863000
width: calc(100% - 135px);
29873001
}
29883002

3003+
.chosen_product_list ul li {
3004+
width: 60px;
3005+
}
3006+
29893007
.coupns_code_box input {
29903008
width: 100px;
29913009
font-size: 10px;
@@ -3007,7 +3025,23 @@ i {
30073025

30083026
/*XS Phone*/
30093027
@media screen and (max-width: 360px){
3028+
.chosen_product_img_box {
3029+
display: none;
3030+
}
3031+
3032+
.cart_filter {
3033+
justify-content: start;
3034+
}
3035+
3036+
.cart_filter ul {
3037+
margin-left: 30px;
3038+
width: 100%;
3039+
}
30103040

3041+
.chosen_product_list ul {
3042+
margin-left: 30px;
3043+
width: 100%;
3044+
}
30113045
}
30123046

30133047
/*Xl Phone*/
@@ -3028,6 +3062,10 @@ i {
30283062
width: calc(100% - 220px);
30293063
}
30303064

3065+
.cart_filter ul li {
3066+
width: 70px;
3067+
}
3068+
30313069
.chosen_product_img_box {
30323070
margin-left: 40px;
30333071
}
@@ -3036,6 +3074,10 @@ i {
30363074
width: calc(100% - 220px);
30373075
}
30383076

3077+
.chosen_product_list ul li {
3078+
width: 70px;
3079+
}
3080+
30393081
.coupns_code_box input {
30403082
width: 80px;
30413083
font-size: 10px;
@@ -3073,6 +3115,10 @@ i {
30733115
width: calc(100% - 220px);
30743116
}
30753117

3118+
.cart_filter ul li {
3119+
width: 100px;
3120+
}
3121+
30763122
.chosen_product_img_box {
30773123
margin-left: 40px;
30783124
}
@@ -3081,6 +3127,10 @@ i {
30813127
width: calc(100% - 220px);
30823128
}
30833129

3130+
.chosen_product_list ul li {
3131+
width: 100px;
3132+
}
3133+
30843134
.checkout_box {
30853135
width: 100%;
30863136
padding: 10px;
@@ -3112,6 +3162,10 @@ i {
31123162
width: calc(100% - 220px);
31133163
}
31143164

3165+
.cart_filter ul li {
3166+
width: 100px;
3167+
}
3168+
31153169
.chosen_product_img_box {
31163170
margin-left: 40px;
31173171
}
@@ -3120,6 +3174,10 @@ i {
31203174
width: calc(100% - 220px);
31213175
}
31223176

3177+
.chosen_product_list ul li{
3178+
width: 100px;
3179+
}
3180+
31233181
.checkout_box {
31243182
width: 100%;
31253183
padding: 10px;
@@ -3342,7 +3400,9 @@ i {
33423400

33433401
/*XS Phone*/
33443402
@media screen and (max-width: 360px){
3345-
3403+
.wish_header p {
3404+
width: 185px;
3405+
}
33463406
}
33473407

33483408
/*Xl Phone*/

0 commit comments

Comments
 (0)