├── assets ├── img │ ├── acc.jpg │ ├── home.jpg │ ├── logo.png │ ├── one.avif │ ├── pc.jpg │ ├── back.avif │ ├── ByteBeat.png │ ├── brandon.png │ ├── brandtwo.png │ ├── laptop1.jpeg │ ├── laptop2.jpeg │ ├── laptop3.jpeg │ ├── laptop4.jpeg │ ├── pv dxvd1.jpeg │ ├── pv dxvd2.jpeg │ ├── pv dxvd3.jpeg │ ├── pv dxvd4.jpeg │ ├── Home_Image2.jpg │ ├── Home_Image3.jpg │ ├── brandfour.jpeg │ ├── brandthree.png │ ├── Brands │ │ ├── Brands-02.png │ │ ├── Brands-03.png │ │ ├── Brands-04.png │ │ ├── Brands-05.png │ │ └── Brands-06.png │ └── ByteBeat-01.svg └── css │ └── style.css ├── server ├── get_featured_product.php ├── get_pc.php ├── get_acceseioes.php ├── logout.php ├── connection.php ├── changePassword.php ├── complete_payment.php ├── login.php ├── place_order.php ├── register.php ├── fogot_password.php └── reset_password.php ├── admin ├── server │ ├── logout.php │ ├── login.php │ ├── update_image.php │ └── create_product.php ├── register.php ├── delete_user.php ├── delete_order.php ├── delete_product.php ├── help.php ├── account.php ├── login.php ├── edit_image.php ├── header.php ├── edit_user.php ├── footer.php ├── users.php ├── add_Product.php ├── edit_order.php ├── dashboard.php ├── edit_product.php └── product.php ├── contact.php ├── about.php ├── fogot_password.php ├── checkout.php ├── reset_password.php ├── login.php ├── register.php ├── README.md ├── order_details.php ├── layouts ├── footer.php └── header.php ├── payment.php ├── account.php ├── single_product.php ├── cart.php ├── index.php ├── shop.php └── tables.sql /assets/img/acc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/acc.jpg -------------------------------------------------------------------------------- /assets/img/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/home.jpg -------------------------------------------------------------------------------- /assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/logo.png -------------------------------------------------------------------------------- /assets/img/one.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/one.avif -------------------------------------------------------------------------------- /assets/img/pc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/pc.jpg -------------------------------------------------------------------------------- /assets/img/back.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/back.avif -------------------------------------------------------------------------------- /assets/img/ByteBeat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/ByteBeat.png -------------------------------------------------------------------------------- /assets/img/brandon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/brandon.png -------------------------------------------------------------------------------- /assets/img/brandtwo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/brandtwo.png -------------------------------------------------------------------------------- /assets/img/laptop1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/laptop1.jpeg -------------------------------------------------------------------------------- /assets/img/laptop2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/laptop2.jpeg -------------------------------------------------------------------------------- /assets/img/laptop3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/laptop3.jpeg -------------------------------------------------------------------------------- /assets/img/laptop4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/laptop4.jpeg -------------------------------------------------------------------------------- /assets/img/pv dxvd1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/pv dxvd1.jpeg -------------------------------------------------------------------------------- /assets/img/pv dxvd2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/pv dxvd2.jpeg -------------------------------------------------------------------------------- /assets/img/pv dxvd3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/pv dxvd3.jpeg -------------------------------------------------------------------------------- /assets/img/pv dxvd4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/pv dxvd4.jpeg -------------------------------------------------------------------------------- /assets/img/Home_Image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/Home_Image2.jpg -------------------------------------------------------------------------------- /assets/img/Home_Image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/Home_Image3.jpg -------------------------------------------------------------------------------- /assets/img/brandfour.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/brandfour.jpeg -------------------------------------------------------------------------------- /assets/img/brandthree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/brandthree.png -------------------------------------------------------------------------------- /assets/img/Brands/Brands-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/Brands/Brands-02.png -------------------------------------------------------------------------------- /assets/img/Brands/Brands-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/Brands/Brands-03.png -------------------------------------------------------------------------------- /assets/img/Brands/Brands-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/Brands/Brands-04.png -------------------------------------------------------------------------------- /assets/img/Brands/Brands-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/Brands/Brands-05.png -------------------------------------------------------------------------------- /assets/img/Brands/Brands-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vipunsanjana/E-commerce_web_application/HEAD/assets/img/Brands/Brands-06.png -------------------------------------------------------------------------------- /server/get_featured_product.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM products LIMIT 4"); 6 | $stmt->execute(); 7 | $featured_product = $stmt->get_result(); 8 | 9 | ?> -------------------------------------------------------------------------------- /server/get_pc.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM products WHERE product_category='pc' LIMIT 4"); 6 | $stmt->execute(); 7 | $pc = $stmt->get_result(); 8 | 9 | ?> -------------------------------------------------------------------------------- /server/get_acceseioes.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM products WHERE product_category='acceseries' LIMIT 4"); 6 | $stmt->execute(); 7 | $acceseries = $stmt->get_result(); 8 | 9 | ?> -------------------------------------------------------------------------------- /server/logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin/server/logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/connection.php: -------------------------------------------------------------------------------- 1 | connect_error) { 10 | die("Connection failed: " . $conn->connect_error); 11 | } 12 | ?> 13 | -------------------------------------------------------------------------------- /contact.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |

Contact us

8 |
9 |

Phone number: 077-8780559

10 |

Email address: pcarcade@email.com

11 |

We work 24/7 to answer your questions

12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /admin/register.php: -------------------------------------------------------------------------------- 1 | prepare($insert_sql); 13 | 14 | $hash_password=password_hash($password,PASSWORD_DEFAULT); 15 | 16 | 17 | $insert_stmt->bind_param("sss",$name,$email,$hash_password); 18 | $result=$insert_stmt->execute(); 19 | 20 | if(!$result){ 21 | echo $stmt->error; 22 | } 23 | 24 | 25 | 26 | header("Location: login.php?register=successfully"); 27 | exit(); 28 | 29 | 30 | 31 | 32 | ?> -------------------------------------------------------------------------------- /admin/delete_user.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | prepare($sql2); 23 | $stmt2->bind_param("i",$user_id); 24 | $stmt2->execute(); 25 | if($stmt2->execute()){ 26 | 27 | header('Location: users.php?delete_successfull_user=userdeletesuccessfully'); 28 | 29 | }else{ 30 | 31 | header('Location: users.php?delete_error_user=userdeleteunsuccessfully'); 32 | 33 | } 34 | 35 | } 36 | 37 | } 38 | 39 | 40 | ?> -------------------------------------------------------------------------------- /admin/delete_order.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | prepare($sql2); 23 | $stmt2->bind_param("i",$order_id); 24 | $stmt2->execute(); 25 | if($stmt2->execute()){ 26 | 27 | header('Location: dashboard.php?delete_successfull_order=orderdeletesuccessfully'); 28 | 29 | }else{ 30 | 31 | header('Location: dashboard.php?delete_error_order=orderdeleteunsuccessfully'); 32 | 33 | } 34 | 35 | } 36 | 37 | } 38 | 39 | 40 | ?> -------------------------------------------------------------------------------- /admin/delete_product.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | prepare($sql2); 23 | $stmt2->bind_param("i",$product_id); 24 | $stmt2->execute(); 25 | if($stmt2->execute()){ 26 | 27 | header('Location: product.php?delete_successfull_product=Productdeletesuccessfully'); 28 | 29 | }else{ 30 | 31 | header('Location: product.php?delete_error_product=Productdeleteunsuccessfully'); 32 | 33 | } 34 | 35 | } 36 | 37 | } 38 | 39 | 40 | ?> -------------------------------------------------------------------------------- /about.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |

About us

8 |
9 |

Welcome to pcarcade, your one-stop destination for all things computer-related. 10 | Established with a passion for technology and a commitment to customer satisfaction, 11 | we strive to provide exceptional products and services to meet the needs of both individuals and businesses.

12 |

Our Mission

13 |

At pcarcade, our mission is simple: to deliver high-quality products, expert advice, and outstanding customer service. We aim to empower our customers with the latest technology solutions, ensuring they have the tools they need to succeed in today's digital world.

14 |

We work 24/7 to answer your questions

15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /fogot_password.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |

Fogot Your Password

8 |
9 |
10 |
11 |
12 |
13 | 14 | 15 |
16 |
17 | 18 |
19 |
20 | 23 |
24 | 25 |
26 |
27 | 28 |
29 | 30 | -------------------------------------------------------------------------------- /server/changePassword.php: -------------------------------------------------------------------------------- 1 | prepare($sql_update); 32 | 33 | $hashPass = password_hash($password, PASSWORD_DEFAULT); 34 | 35 | $stmt_update->bind_param("ss", $hashPass,$user_email); 36 | $stmt_update->execute(); 37 | 38 | 39 | header("Location: ../account.php?passwordreset=successfully"); 40 | 41 | } 42 | 43 | $stmt_update->close(); 44 | $conn->close(); 45 | 46 | 47 | }else{ 48 | 49 | header("Location: ../account.php?error=notloggedin"); 50 | exit(); 51 | } 52 | 53 | ?> -------------------------------------------------------------------------------- /server/complete_payment.php: -------------------------------------------------------------------------------- 1 | prepare($sql_update); 25 | 26 | 27 | $stmt_update->bind_param("si", $order_status,$order_id); 28 | $stmt_update->execute(); 29 | 30 | $sql_one = "INSERT INTO payments (order_id,user_id,transaction_id,payment_date) VALUES (?,?,?,?);"; 31 | $stmt_one = $conn->prepare($sql_one); 32 | $stmt_one->bind_param('iiss',$order_id,$user_id,$transaction_id,$payment_date); 33 | $stmt_one->execute(); 34 | 35 | header("Location: ../account.php?payment_successful=paid successfully,thanks for shopping with us!"); 36 | 37 | }else{ 38 | header("Location: index.php"); 39 | exit(); 40 | } 41 | 42 | 43 | 44 | 45 | 46 | 47 | ?> -------------------------------------------------------------------------------- /server/login.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 24 | 25 | if($stmt===false){ 26 | 27 | echo $conn->error; 28 | 29 | } 30 | 31 | $stmt->bind_param("s",$email); 32 | $stmt->execute(); 33 | 34 | $result=$stmt->get_result(); 35 | 36 | if($result->num_rows>0){ 37 | 38 | $user=$result->fetch_assoc(); 39 | 40 | $password_check = password_verify($password, $user['user_password']); 41 | 42 | 43 | $stmt->close(); 44 | $conn->close(); 45 | if($password_check){ 46 | 47 | session_start(); 48 | 49 | $_SESSION['user_id'] = $user['user_id']; 50 | $_SESSION['user_name'] = $user['user_name']; 51 | $_SESSION['user_email'] = $user['user_email']; 52 | $_SESSION['logged_in'] = true; 53 | 54 | 55 | 56 | header("Location: ../account.php?login=successfully"); 57 | exit(); 58 | 59 | } 60 | 61 | else{ 62 | 63 | header("Location: ../login.php?error=wrongcredential&email=".$email); 64 | exit(); 65 | 66 | } 67 | 68 | }else{ 69 | 70 | header("Location: ../login.php?error=emaildoesnotexist&email=".$email); 71 | exit(); 72 | 73 | } 74 | } 75 | } 76 | 77 | else{ 78 | 79 | header("Location: ../register.php"); 80 | exit(); 81 | 82 | } 83 | 84 | ?> -------------------------------------------------------------------------------- /admin/server/login.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 24 | 25 | if($stmt===false){ 26 | 27 | echo $conn->error; 28 | 29 | } 30 | 31 | $stmt->bind_param("s",$email); 32 | $stmt->execute(); 33 | 34 | $result=$stmt->get_result(); 35 | 36 | if($result->num_rows>0){ 37 | 38 | $admin=$result->fetch_assoc(); 39 | 40 | $password_check = password_verify($password, $admin['admin_password']); 41 | 42 | 43 | $stmt->close(); 44 | $conn->close(); 45 | if($password_check){ 46 | 47 | session_start(); 48 | 49 | $_SESSION['admin_id'] = $admin['admin_id']; 50 | $_SESSION['admin_name'] = $admin['admin_name']; 51 | $_SESSION['admin_email'] = $admin['admin_email']; 52 | $_SESSION['logged_in'] = true; 53 | 54 | 55 | 56 | header("Location: ../dashboard.php?login=successfully"); 57 | exit(); 58 | 59 | } 60 | 61 | else{ 62 | 63 | header("Location: ../login.php?error=wrongcredential&email=".$email); 64 | exit(); 65 | 66 | } 67 | 68 | }else{ 69 | 70 | header("Location: ../login.php?error=emaildoesnotexist&email=".$email); 71 | exit(); 72 | 73 | } 74 | } 75 | } 76 | 77 | else{ 78 | 79 | header("Location: ../login.php"); 80 | exit(); 81 | 82 | } 83 | 84 | ?> -------------------------------------------------------------------------------- /admin/help.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 |
17 |
18 |
19 |

Dashboard

20 |
21 |
22 | 23 |
24 |
25 |
26 | 27 |

Help

28 | 29 |

30 |
31 | 32 | 33 | 34 |
35 |
36 |

Software Engineer - UOK

37 |
38 | 39 |
40 |
41 |

077-8780559

42 |
43 | 44 |
45 |
46 |

pcarcade@gamil.com

47 |
48 | 49 |
50 |
51 |

No 122/3,Kesbawa Road,Bandaragama,Sri Lanka.

52 |
53 | 54 | 55 |
56 |
57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /admin/server/update_image.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | prepare("UPDATE products SET product_image=?, product_image2=?, product_image3=?, product_image4=? WHERE product_id=?"); 44 | $stmt->bind_param("ssssi", $image_name1, $image_name2, $image_name3, $image_name4,$product_id); 45 | 46 | if ($stmt->execute()) { 47 | header('Location: ../product.php?successfull_update_image=Productimagechangesuccessfully'); 48 | } else { 49 | header('Location: ../product.php?error_update_image=Productimagechangeunsuccessfully'); 50 | } 51 | 52 | 53 | $stmt->close(); 54 | $conn->close(); 55 | 56 | 57 | }else{ 58 | header('Location: ../product.php'); 59 | } 60 | 61 | 62 | } 63 | 64 | 65 | ?> -------------------------------------------------------------------------------- /admin/account.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | prepare("SELECT * FROM admins WHERE admin_email=?"); 17 | $stmt3->bind_param("i",$admin_email); 18 | $stmt3->execute(); 19 | $admins = $stmt3->get_result(); 20 | 21 | }else{ 22 | 23 | header('Location: dashboard.php?error=cantlookadminaccount'); 24 | exit(); 25 | 26 | } 27 | 28 | } 29 | 30 | 31 | ?> 32 | 33 |
34 |
35 |
36 |

Dashboard

37 |
38 |
39 | 40 |
41 |
42 |
43 | 44 |

Admin Account

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 | -------------------------------------------------------------------------------- /admin/login.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
9 |

Admin Login

10 | 11 |
12 |
13 |
14 |
15 | 16 | 17 |
18 |
19 | 20 | 21 |
22 |
23 | 24 |
25 | 28 | 29 |
30 | 31 | 32 | 33 | 38 | All fields are required! 39 |
'; 40 | } 41 | else if($_GET['error']=="wrongcredential"){ 42 | echo ''; 45 | } 46 | else{ 47 | echo ''; 50 | } 51 | } 52 | 53 | ?> 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 | 63 | -------------------------------------------------------------------------------- /server/place_order.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 26 | $stmt->bind_param('isiisss',$order_cost,$order_status,$user_id,$phone,$city,$address,$order_date); 27 | 28 | $stmt_status = $stmt->execute(); 29 | 30 | if(!$stmt_status){ 31 | header("Location: ../index.php"); 32 | } 33 | 34 | $order_id = $stmt->insert_id; 35 | 36 | 37 | foreach ($_SESSION['cart'] as $key => $value) { 38 | 39 | $product = $_SESSION['cart'][$key]; 40 | $product_id = $product['product_id']; 41 | $product_name = $product['product_name']; 42 | $product_image = $product['product_image']; 43 | $product_price = $product['product_price']; 44 | $product_quatity = $product['product_quatity']; 45 | $order = $_SESSION['cart'][$key]; 46 | $date = $order['order_date']; 47 | 48 | $sql_one = "INSERT INTO order_items (order_id,product_id,product_name,product_image,product_price,product_quatity,user_id,order_date) VALUES (?,?,?,?,?,?,?,?);"; 49 | $stmt_one = $conn->prepare($sql_one); 50 | $stmt_one->bind_param('iissiiis',$order_id,$product_id,$product_name,$product_image,$product_price,$product_quatity,$user_id,$order_date); 51 | $stmt_one->execute(); 52 | 53 | } 54 | 55 | 56 | // unset($_SESSION['cart']); 57 | 58 | $_SESSION['order_id'] = $order_id; 59 | 60 | 61 | header("Location: ../payment.php?order_status=order placed successfully"); 62 | 63 | 64 | } 65 | } 66 | 67 | 68 | ?> -------------------------------------------------------------------------------- /server/register.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 34 | 35 | $stmt->bind_param("s",$email); 36 | $stmt->execute(); 37 | 38 | 39 | $result=$stmt->get_result(); 40 | 41 | if($result->num_rows > 0){ 42 | 43 | $stmt->close(); 44 | 45 | header("Location: ../register.php?error=emailalreadyexits&name=".$name."&email=".$email); 46 | exit(); 47 | } 48 | else{ 49 | 50 | $insert_sql="INSERT INTO users (user_name,user_email,user_password) VALUES (?,?,?)"; 51 | 52 | $insert_stmt=$conn->prepare($insert_sql); 53 | 54 | $hash_password=password_hash($password,PASSWORD_DEFAULT); 55 | 56 | 57 | $insert_stmt->bind_param("sss",$name,$email,$hash_password); 58 | $result=$insert_stmt->execute(); 59 | 60 | if(!$result){ 61 | echo $stmt->error; 62 | } 63 | 64 | 65 | 66 | $user_id = $insert_stmt->insert_id; 67 | $_SESSION['user_id'] = $user_id; 68 | $_SESSION['user_email'] = $email; 69 | $_SESSION['user_name'] = $name; 70 | $_SESSION['logged_in'] = true; 71 | 72 | $insert_stmt->close(); 73 | $conn->close(); 74 | 75 | header("Location: ../login.php?register=successfully"); 76 | exit(); 77 | } 78 | } 79 | catch(mysqli_sql_exception $e){ 80 | echo $e->getMessage(); 81 | } 82 | } 83 | } 84 | // elseif(isset($_SESSION['logged_in'])){ 85 | 86 | // header("Location: ../account.php?alreadyregisterdsuccessfully"); 87 | // exit(); 88 | 89 | // } 90 | else{ 91 | 92 | header("Location: ../register.php?error=filltheregisterform"); 93 | exit(); 94 | 95 | } 96 | 97 | 98 | ?> -------------------------------------------------------------------------------- /admin/server/create_product.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | prepare("INSERT INTO products (product_name, product_category, product_description, product_image, product_image2, product_image3, product_image4, product_price, product_special_offer, product_color) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); 51 | $stmt->bind_param("ssssssssss", $product_name, $product_category, $product_description, $image_name1, $image_name2, $image_name3, $image_name4, $product_price, $product_special_offer, $product_color); 52 | 53 | if ($stmt->execute()) { 54 | header('Location: ../dashboard.php?successfull_add=Productaddsuccessfully'); 55 | } else { 56 | header('Location: ../dashboard.php?error_add=Productaddunsuccessfully'); 57 | } 58 | 59 | 60 | $stmt->close(); 61 | $conn->close(); 62 | 63 | 64 | }else{ 65 | header('Location: ../dashboard.php'); 66 | } 67 | 68 | 69 | } 70 | 71 | 72 | ?> -------------------------------------------------------------------------------- /server/fogot_password.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 30 | 31 | $stmt->bind_param("s",$email); 32 | $stmt->execute(); 33 | 34 | $result=$stmt->get_result(); 35 | 36 | if($result->num_rows>0){ 37 | 38 | //delete exixting token perticular user 39 | $sql_delete="DELETE FROM pwd_reset WHERE email=?"; 40 | 41 | $stmt_delete=$conn->prepare($sql_delete); 42 | 43 | $stmt_delete->bind_param("s",$email); 44 | $stmt_delete->execute(); 45 | 46 | //inset new token 47 | $sql_insert="INSERT INTO pwd_reset(email,selector,token,expires) VALUES(?,?,?,?)"; 48 | 49 | $stmt_insert=$conn->prepare($sql_insert); 50 | 51 | //encrypt token 52 | $hash_token=password_hash($token, PASSWORD_DEFAULT); 53 | 54 | $stmt_insert->bind_param("ssss",$email,$selector,$hash_token,$expirate); 55 | 56 | $stmt_insert->execute(); 57 | 58 | $to=$email; 59 | $subject="password reset request"; 60 | 61 | 62 | $message = '

We receive your paswword reset request. The link toreset your password is below. if you did not request, please ignore this message.

'; 63 | $message .= '

Here is your password reset link
'; 64 | $message .= 'Click Here

'; 65 | 66 | $headers = "From: Authentication "; 67 | $headers .= "Replty-to: vipunsanjana34@gmail.com"; 68 | $headers .= "Content-type: text/html\n"; 69 | 70 | mail($to, $subject, $message, $headers); 71 | 72 | header("Location:../fogot_password.php?reset=successful&url=".$url); 73 | 74 | 75 | $stmt->close(); 76 | $stmt_delete->close(); 77 | $stmt_insert->close(); 78 | $conn->close(); 79 | 80 | } 81 | else{ 82 | header("Location:../fogot_password.php?error=usernotfound"); 83 | } 84 | } 85 | } 86 | else{ 87 | header("Location:../fogot_password.php"); 88 | exit(); 89 | } 90 | 91 | ?> -------------------------------------------------------------------------------- /checkout.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
32 |

Check Out

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 |

Total amount: $

59 | 60 |
61 |
62 |
63 |
64 | 65 | -------------------------------------------------------------------------------- /reset_password.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |

Reset Password

8 |
9 |
10 |
11 | 12 | 21 | Could not validate your request 22 |
'; 23 | } 24 | else{ 25 | if(ctype_xdigit($selector) !== false && ctype_xdigit($validator) !== false){ 26 | ?> 27 |
28 | 29 | 30 | 31 |
32 | 33 | 34 |
35 |
36 | 37 | 38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 | 46 | 52 | Could not validate your request 53 | '; 54 | } 55 | ?> 56 | 57 | 58 | 59 |
60 | 63 |
64 | 65 | 66 | 67 | 68 |
69 | 70 | -------------------------------------------------------------------------------- /admin/edit_image.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 24 | 25 |
26 |
27 |
28 |

Dashboard

29 |
30 |
31 | 32 |
33 |
34 |
35 | 36 |

Update Product Image

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 | -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |

Login

8 |
9 |
10 |
11 |
12 |
13 | 14 | 15 |
16 |
17 | 18 | 19 |
20 |
21 | 22 |
23 |
24 | 27 | 30 | 33 |
34 | 35 |
36 | 37 | 38 | 39 | 44 | All fields are required! 45 |
'; 46 | } 47 | else if($_GET['error']=="wrongcredential"){ 48 | echo ''; 51 | } 52 | else{ 53 | echo ''; 56 | } 57 | } 58 | 59 | ?> 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
70 | 71 | -------------------------------------------------------------------------------- /server/reset_password.php: -------------------------------------------------------------------------------- 1 | =?"; 26 | $stmt=$conn->prepare($sql); 27 | 28 | $stmt->bind_param("ss",$selector,$current_time); 29 | $stmt->execute(); 30 | 31 | $result=$stmt->get_result(); 32 | 33 | 34 | if($result->num_rows>0){ 35 | 36 | $user_token=$result->fetch_assoc(); 37 | 38 | $token_bin=hex2bin($validator); 39 | 40 | $token_check=password_verify($token_bin,$user_token['token']); 41 | 42 | if($token_check===false){ 43 | header("Location: ../reset_password.php?error=etokendissmathch&selector=".$selector."&validator=".$validator); 44 | exit(); 45 | } 46 | else if($token_check===true){ 47 | $tokenemail=$user_token['email']; 48 | 49 | $sql_select="SELECT *FROM users WHERE user_email=?;"; 50 | $stmt_select=$conn->prepare($sql_select); 51 | 52 | $stmt_select->bind_param("s", $tokenemail); 53 | $stmt_select->execute(); 54 | 55 | $result = $stmt_select->get_result(); 56 | 57 | 58 | if($result->num_rows > 0){ 59 | 60 | $sql_update = "UPDATE users SET user_password = ? WHERE user_email =?;"; 61 | $stmt_update = $conn->prepare($sql_update); 62 | 63 | $hashPass = password_hash($password, PASSWORD_DEFAULT); 64 | 65 | $stmt_update->bind_param("ss", $hashPass, $tokenemail); 66 | $stmt_update->execute(); 67 | 68 | $sql_delete = "DELETE FROM pwd_reset WHERE email = ?;"; 69 | $stmt_delete = $conn->prepare($sql_delete); 70 | 71 | 72 | $stmt_delete->bind_param("s", $tokenemail); 73 | $stmt_delete->execute(); 74 | 75 | header("Location: ../login.php?passwordreset=success"); 76 | 77 | } 78 | else{ 79 | header("Location: ../login.php?error=usernotfound"); 80 | exit(); 81 | } 82 | } 83 | else{ 84 | header("Location: ../login.php?error=somethingwentwrong"); 85 | exit(); 86 | } 87 | } 88 | else{ 89 | header("Location: ../login.php?error=nopassswordrequest"); 90 | exit(); 91 | } 92 | 93 | $stmt->close(); 94 | $stmt_select->close(); 95 | $stmt_update->close(); 96 | $stmt_delete->close(); 97 | $conn->close(); 98 | 99 | 100 | } 101 | 102 | 103 | } 104 | 105 | else{ 106 | header("Location: ../login.php"); 107 | exit(); 108 | } 109 | 110 | 111 | ?> 112 | 113 | -------------------------------------------------------------------------------- /register.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
9 |

Register

10 | 11 |
12 |
13 |
14 |
15 | 16 | 17 |
18 |
19 | 20 | 21 |
22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
31 | 32 |
33 | 36 |
37 | 38 | 39 | 40 | 41 | 46 | All fields are required! 47 |
'; 48 | } 49 | else if($_GET['error']=="emailerror"){ 50 | echo ''; 53 | } 54 | else if($_GET['error']=="passwordmistakes"){ 55 | echo ''; 58 | } 59 | else if($_GET['error']=="emailalreadyexits"){ 60 | echo ''; 63 | } 64 | else{ 65 | echo ''; 68 | } 69 | } 70 | 71 | ?> 72 | 73 | 74 | 75 | 76 |
77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | 4 | # E-commerce Web Application (Pure PHP) 5 | 6 | Welcome to the E-commerce Web Application repository built entirely with PHP! 7 | 8 | ## Table of Contents 9 | 10 | - [Introduction](#introduction) 11 | - [Features](#features) 12 | - [Getting Started](#getting-started) 13 | - [Prerequisites](#prerequisites) 14 | - [Installation](#installation) 15 | - [Usage](#usage) 16 | - [Contributing](#contributing) 17 | - [Contact](#contact) 18 | 19 | ## Introduction 20 | 21 | This E-commerce Web Application is a full-featured, PHP-powered platform designed to provide businesses with a robust and customizable online selling solution. Whether you're starting a new e-commerce venture or looking to enhance an existing one, our application offers a range of features to streamline your online operations. 22 | 23 | ## Features 24 | 25 | - **Responsive Design**: Ensuring a seamless shopping experience across various devices. 26 | - **Product Management**: Easy product catalog management with detailed descriptions, images, and pricing. 27 | - **User Authentication**: Secure authentication and authorization mechanisms to protect user data. 28 | - **Shopping Cart**: Dynamic cart functionality for users to add, remove, and update items. 29 | - **Payment Integration**: Support for paypal payment gateways for secure transactions. 30 | - **Order Tracking**: Real-time order tracking to keep customers informed. 31 | - **Search and Filters**: Robust product search and filtering options. 32 | - **Admin Dashboard**: An intuitive dashboard for managing products, orders, and customer data. 33 | - **Customization**: Highly customizable through theming and extensible via plugins. 34 | - **Security**: Built with security best practices to protect against common web vulnerabilities. 35 | - **Scalability**: Designed to accommodate a growing user base and a large product catalog. 36 | 37 | ## Getting Started 38 | 39 | ### Prerequisites 40 | 41 | Before you begin, ensure you have met the following requirements: 42 | 43 | - [PHP](https://www.php.net/) (version X.X or higher) 44 | - [MySQL](https://www.mysql.com/) database 45 | - Web server (e.g., [Apache](https://httpd.apache.org/) or [Nginx](https://nginx.org/)) 46 | 47 | ### Installation 48 | 49 | 1. Clone the repository: 50 | 51 | ```shell 52 | git clone https://github.com/vipunsanajana/e-commerce-web-app.git 53 | ``` 54 | 55 | 2. Configure your web server to point to the project's root directory. 56 | 57 | 3. Create a MySQL database and configure the database settings in `config.php`. 58 | 59 | 4. Import the database schema using the provided SQL file (`database.sql`). 60 | 61 | 5. Start your web server. 62 | 63 | 6. Access the application in your web browser. 64 | 65 | ## Usage 66 | 67 | - Visit the application's homepage to start exploring and using the features. 68 | - For detailed usage instructions and customization options, refer to the w3schools. 69 | 70 | ## Contributing 71 | 72 | We welcome contributions from the open-source community. To contribute to this project, please review our project and feel free to submit pull requests. 73 | 74 | ## Contact 75 | 76 | If you have any questions, suggestions, or issues to report, please feel free to vipunsanjana34@gmail.com. We appreciate your feedback! 77 | 78 | 79 | Collaborators: 80 | - Yasith Maura 81 | - Ragapriya 82 | - Thusitha 83 | - Vipun 84 | 85 | --- 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /admin/header.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Home 17 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 87 | -------------------------------------------------------------------------------- /assets/img/ByteBeat-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 12 | 15 | 19 | 23 | 27 | 33 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /admin/edit_user.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | prepare("SELECT * FROM users WHERE user_id=?"); 17 | $stmt3->bind_param("i",$user_id); 18 | $stmt3->execute(); 19 | $users = $stmt3->get_result(); 20 | 21 | }else if(isset($_POST['edit_btn'])){ 22 | 23 | $user_id = $_POST['user_id']; 24 | $user_name = $_POST['name']; 25 | $user_email = $_POST['email']; 26 | 27 | 28 | $sql_update = "UPDATE users SET user_name = ?, user_email = ? 29 | WHERE user_id =?"; 30 | 31 | $stmt_update = $conn->prepare($sql_update); 32 | 33 | $stmt_update->bind_param("ssi",$user_name, $user_email, $user_id); 34 | 35 | if($stmt_update->execute()){ 36 | 37 | header('Location: users.php?update_successfull_user=usereditsuccessfully'); 38 | 39 | }else{ 40 | 41 | header('Location: users.php?update_error_user=usereditunsuccessfully'); 42 | 43 | } 44 | 45 | }else{ 46 | 47 | header('Location: users.php'); 48 | exit(); 49 | 50 | } 51 | 52 | } 53 | 54 | 55 | ?> 56 | 57 |
58 |
59 |
60 |

Dashboard

61 |
62 |
63 | 64 |
65 |
66 |
67 | 68 |

Edit User

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 | -------------------------------------------------------------------------------- /order_details.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 16 | 17 | $stmt->bind_param("i", $order_id); 18 | $stmt->execute(); 19 | 20 | $order_details = $stmt->get_result(); 21 | 22 | $order_total_price = calculateTotalOrderPrice($order_details); 23 | } else { 24 | header("Location: account.php"); 25 | exit(); 26 | } 27 | } 28 | 29 | // Move the calculateTotalOrderPrice function outside of the else block 30 | function calculateTotalOrderPrice($order_details) 31 | { 32 | $total = 0; 33 | 34 | foreach ($order_details as $row) { 35 | $product_price = $row['product_price']; 36 | $product_quantity = $row['product_quatity']; 37 | 38 | $total = $total + ($product_price * $product_quantity); 39 | } 40 | 41 | return $total; 42 | } 43 | ?> 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
52 |
53 |

Order Details

54 |
55 |
56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 76 | 77 | 80 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |
Product NameProduct PriceProduct Quantity
69 |
70 | lap 71 |
72 |

73 |
74 |
75 |
78 | $ 79 | 81 | 82 |
90 | 91 | 94 | 95 |
96 | 97 | 98 | 99 | 100 |
101 | 102 | 103 | 104 | 105 |
106 | 107 | -------------------------------------------------------------------------------- /layouts/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /admin/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /layouts/header.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Home 16 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 97 | -------------------------------------------------------------------------------- /payment.php: -------------------------------------------------------------------------------- 1 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 |

Payment

36 |
37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |

Total payment: $

48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

Total payment: $

61 | 62 |
63 |
64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 |

You don't have any order.

72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 |
80 | 81 | 82 | 83 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /admin/users.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | prepare($sql2); 21 | $stmt2->execute(); 22 | $result = $stmt2->get_result(); 23 | $row = $result->fetch_assoc(); 24 | $total_records = $row['total_records']; 25 | 26 | $total_records_per_page = 10; 27 | $offset = ($page_no - 1) * $total_records_per_page; 28 | 29 | $previous_page = $page_no - 1; 30 | $next_page = $page_no + 1; 31 | 32 | $adjacents = 2; 33 | 34 | $total_no_of_pages = ceil($total_records / $total_records_per_page); 35 | 36 | $stmt3 = $conn->prepare("SELECT * FROM users LIMIT ?, ?"); 37 | $stmt3->bind_param("ii", $offset, $total_records_per_page); 38 | $stmt3->execute(); 39 | $users = $stmt3->get_result(); 40 | 41 | } 42 | 43 | 44 | ?> 45 | 46 |

Dashboard

47 |

Dashboard

48 | 49 | 50 |

User has been deleted successfully!

51 | 52 | 53 | 54 | 55 |

User has been deleted unsuccessfully!

56 | 57 | 58 | 59 | 60 | 61 |

User has been updated successfully!

62 | 63 | 64 | 65 | 66 | 67 | 68 |

User has been updated unsuccessfully!

69 | 70 | 71 | 72 | 73 | 74 | num_rows > 0) { 80 | 81 | 82 | 83 | echo(""); 84 | 85 | echo(""); 86 | echo(""); 87 | echo(""); 88 | echo(""); 89 | echo(""); 90 | 91 | echo "

All Users

"; 92 | 93 | foreach($users as $user) { 94 | echo ""; 95 | echo ""; 96 | echo ""; 97 | echo ""; 98 | echo ""; 99 | echo ""; 100 | ?> 101 | 102 | 103 | 104 | "; 106 | } 107 | echo ("
User IDUser NameUser EmailEditRemove
".$user["user_id"]."".$user["user_name"]."$".$user["user_email"]."Edit UserRemove User
"); 108 | 109 | }else{ 110 | echo ('

The Users table is empty

'); 111 | } 112 | 113 | $conn->close(); 114 | 115 | 116 | ?> 117 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /admin/add_Product.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 18 |
19 |
20 |
21 |

Dashboard

22 |
23 |
24 | 25 |
26 |
27 |
28 | 29 |

Create Product

30 |
31 | 32 | 33 | 34 |
35 |
36 |

37 |
38 | 39 | 40 | 41 |
42 | 43 |
44 | 45 | 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 | -------------------------------------------------------------------------------- /admin/edit_order.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | prepare("SELECT * FROM orders WHERE order_id=?"); 17 | $stmt3->bind_param("i",$order_id); 18 | $stmt3->execute(); 19 | $orders = $stmt3->get_result(); 20 | 21 | }else if(isset($_POST['edit_btn'])){ 22 | 23 | $order_id = $_POST['order_id']; 24 | $order_cost = $_POST['cost']; 25 | $order_status = $_POST['status']; 26 | $order_date = $_POST['date']; 27 | 28 | 29 | $sql_update = "UPDATE orders SET order_cost = ?, order_status = ?, order_date = ? 30 | WHERE order_id =?"; 31 | 32 | $stmt_update = $conn->prepare($sql_update); 33 | 34 | $stmt_update->bind_param("sssi",$order_cost, $order_status, $order_date, $order_id); 35 | 36 | if($stmt_update->execute()){ 37 | 38 | header('Location: dashboard.php?update_successfull_order=ordereditsuccessfully'); 39 | 40 | }else{ 41 | 42 | header('Location: dashboard.php?update_error_order=ordereditunsuccessfully'); 43 | 44 | } 45 | 46 | }else{ 47 | 48 | header('Location: dashboard.php'); 49 | exit(); 50 | 51 | } 52 | 53 | } 54 | 55 | 56 | ?> 57 | 58 |
59 |
60 |
61 |

Dashboard

62 |
63 |
64 | 65 |
66 |
67 |
68 | 69 |

Edit Order

70 | 71 |
72 |
73 |
74 |

75 |
76 | 77 | 78 | 79 | 80 |

81 |
82 | 83 |
84 | 85 | 86 | 87 |
88 | 89 | 90 |
91 | 92 | 99 |
100 |
101 | 102 | 103 | 104 |
105 | 106 | 107 | 108 |
109 | 110 |
111 | 112 |
113 |
114 |
115 |
116 |
117 | 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /admin/dashboard.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | prepare($sql2); 21 | $stmt2->execute(); 22 | $result = $stmt2->get_result(); 23 | $row = $result->fetch_assoc(); 24 | $total_records = $row['total_records']; 25 | 26 | $total_records_per_page = 10; 27 | $offset = ($page_no - 1) * $total_records_per_page; 28 | 29 | $previous_page = $page_no - 1; 30 | $next_page = $page_no + 1; 31 | 32 | $adjacents = 2; 33 | 34 | $total_no_of_pages = ceil($total_records / $total_records_per_page); 35 | 36 | $stmt3 = $conn->prepare("SELECT * FROM orders LIMIT ?, ?"); 37 | $stmt3->bind_param("ii", $offset, $total_records_per_page); 38 | $stmt3->execute(); 39 | $orders = $stmt3->get_result(); 40 | 41 | } 42 | 43 | 44 | ?> 45 | 46 |

Dashboard

47 |

Dashboard

48 | 49 | 50 |

Order has been updated successfully!

51 | 52 | 53 | 54 | 55 |

Order has been updated unsuccessfully!

56 | 57 | 58 | 59 | 60 | 61 |

Order has been deleted successfully!

62 | 63 | 64 | 65 | 66 | 67 | 68 |

Order has been deleted unsuccessfully!

69 | 70 | 71 | 72 | 73 | 74 |

New product has been added successfully!

75 | 76 | 77 | 78 | 79 | 80 |

New product has been added unsuccessfully!

81 | 82 | 83 | 84 | num_rows > 0) { 90 | 91 | 92 | 93 | echo(""); 94 | 95 | echo(""); 96 | echo(""); 97 | echo(""); 98 | echo(""); 99 | echo(""); 100 | echo(""); 101 | echo(""); 102 | echo(""); 103 | echo(""); 104 | echo "

All Orders

"; 105 | foreach($orders as $order) { 106 | echo ""; 107 | echo ""; 108 | echo ""; 109 | echo ""; 110 | echo ""; 111 | echo ""; 112 | echo ""; 113 | echo ""; 114 | echo ""; 115 | echo ""; 116 | ?> 117 | 118 | 119 | 120 | "; 123 | 124 | } 125 | 126 | echo ("
Order IDOrder StatusUser IdOrder CostOrder DateUser PhoneUser AddessEditRemove
".$order["order_id"]."".$order["order_status"]."".$order["user_id"]."".$order["order_cost"]."".$order["order_date"]."".$order["user_phone"]."".$order["user_address"]."Edit OrderRemove Order
"); 127 | 128 | }else{ 129 | 130 | echo ('

The Users table is empty

'); 131 | 132 | } 133 | 134 | $conn->close(); 135 | 136 | 137 | ?> 138 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /admin/edit_product.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | prepare("SELECT * FROM products WHERE product_id=?"); 17 | $stmt3->bind_param("i",$product_id); 18 | $stmt3->execute(); 19 | $products = $stmt3->get_result(); 20 | 21 | }else if(isset($_POST['edit_btn'])){ 22 | 23 | $product_id = $_POST['product_id']; 24 | $title = $_POST['title']; 25 | $description = $_POST['description']; 26 | $price = $_POST['price']; 27 | $category = $_POST['category']; 28 | $color = $_POST['color']; 29 | $offer = $_POST['offer']; 30 | 31 | 32 | $sql_update = "UPDATE products SET product_name = ?, product_description = ?, product_price = ?, product_special_offer = ?, product_color = ?, product_category = ? 33 | WHERE product_id =?"; 34 | 35 | $stmt_update = $conn->prepare($sql_update); 36 | 37 | $stmt_update->bind_param("ssssssi", $title,$description,$price,$offer,$color,$category,$product_id); 38 | 39 | if($stmt_update->execute()){; 40 | 41 | header('Location: product.php?successfull=Productupdatesuccessfully'); 42 | 43 | }else{ 44 | 45 | header('Location: product.php?error=Productupdateunsuccessfully'); 46 | 47 | } 48 | 49 | }else{ 50 | 51 | header('Location: product.php'); 52 | exit(); 53 | 54 | } 55 | 56 | } 57 | 58 | 59 | ?> 60 | 61 |
62 |
63 |
64 |

Dashboard

65 |
66 |
67 | 68 |
69 |
70 |
71 | 72 |

Edit Product

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 | 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 | -------------------------------------------------------------------------------- /admin/product.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | prepare($sql2); 21 | $stmt2->execute(); 22 | $result = $stmt2->get_result(); 23 | $row = $result->fetch_assoc(); 24 | $total_records = $row['total_records']; 25 | 26 | $total_records_per_page = 10; 27 | $offset = ($page_no - 1) * $total_records_per_page; 28 | 29 | $previous_page = $page_no - 1; 30 | $next_page = $page_no + 1; 31 | 32 | $adjacents = 2; 33 | 34 | $total_no_of_pages = ceil($total_records / $total_records_per_page); 35 | 36 | $stmt3 = $conn->prepare("SELECT * FROM products LIMIT ?, ?"); 37 | $stmt3->bind_param("ii", $offset, $total_records_per_page); 38 | $stmt3->execute(); 39 | $products = $stmt3->get_result(); 40 | 41 | } 42 | 43 | 44 | ?> 45 | 46 |

Dashboard

47 |

Dashboard

48 | 49 | 50 |

Product has been updated successfully!

51 | 52 | 53 | 54 | 55 |

Product has been updated unsuccessfully!

56 | 57 | 58 | 59 | 60 | 61 |

Product has been deleted successfully!

62 | 63 | 64 | 65 | 66 | 67 | 68 |

Product has been deleted unsuccessfully!

69 | 70 | 71 | 72 | 73 | 74 |

New image has been updated successfully!

75 | 76 | 77 | 78 | 79 | 80 |

New image has been updated unsuccessfully!

81 | 82 | 83 | 84 | 85 | num_rows > 0) { 91 | 92 | 93 | 94 | echo(""); 95 | 96 | echo(""); 97 | echo(""); 98 | echo(""); 99 | echo(""); 100 | echo(""); 101 | echo(""); 102 | echo(""); 103 | echo(""); 104 | echo(""); 105 | echo(""); 106 | 107 | echo "

All Products

"; 108 | 109 | foreach($products as $product) { 110 | echo ""; 111 | echo ""; 112 | echo ""; 113 | echo ""; 114 | echo ""; 115 | echo ""; 116 | echo ""; 117 | echo ""; 118 | echo ""; 119 | echo ""; 120 | echo ""; 121 | ?> 122 | 123 | 124 | 125 | "; 127 | } 128 | echo ("
Product IDProduct ImageProduct NameProduct PriceProduct OfferProduct CategoryProduct ColorEdit ImagesEditRemove
".$product["product_id"]."".$product["product_name"]."$".$product["product_price"]."$".$product["product_special_offer"]."".$product["product_category"]."".$product["product_color"]."Edit ImagesEdit ProductRemove Product
"); 129 | 130 | }else{ 131 | echo ('

The Users table is empty

'); 132 | } 133 | 134 | $conn->close(); 135 | 136 | 137 | ?> 138 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /account.php: -------------------------------------------------------------------------------- 1 | prepare($sql); 17 | 18 | $stmt->bind_param("i",$user_id); 19 | $stmt->execute(); 20 | 21 | 22 | 23 | $orders = $stmt->get_result(); 24 | 25 | } 26 | 27 | ?> 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 | 39 | 40 |

41 | 42 |
43 |

44 | 48 | Login Successfully! 49 |

'; 50 | } 51 | }?> 52 | 53 |

Account info

54 |
55 | 61 |
62 |
63 |
64 |

Change Password

65 |
66 |
67 | 68 | 69 |
70 |
71 | 72 | 73 |
74 |
75 | 76 |
77 |
78 |
79 | 80 | 81 | 82 | 87 | All fields are required! 88 | '; 89 | } 90 | else if($_GET['error']=="password&confirmpasswordnotmatch"){ 91 | echo ''; 94 | } 95 | else{ 96 | echo ''; 99 | } 100 | } 101 | else if(isset($_GET['passwordreset'])){ 102 | if($_GET['passwordreset']=="successfully"){ 103 | echo ''; 106 | } 107 | } 108 | 109 | ?> 110 | 111 | 112 | 113 |
114 | 115 | 116 | 117 | 118 | 119 |
120 |
121 |

Your Orders

122 |
123 |
124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | fetch_assoc()) { ?> 137 | 138 | 139 | 147 | 148 | 151 | 154 | 157 | 160 | 168 | 169 | 170 | 171 | 172 | 173 |
Order IdOrder CostOrder CityOrder StatusOrder DateOrder Details
140 |
141 | 142 | 143 |

144 | 145 |
146 |
149 | 150 | 152 | 153 | 155 | 156 | 158 | 159 | 161 |
162 | 163 | 164 | 165 |
166 | 167 |
174 | 175 |
176 | 177 | 178 | -------------------------------------------------------------------------------- /single_product.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM products WHERE product_id = ?"); 18 | $stmt->bind_param("i",$product_id); 19 | $stmt->execute(); 20 | $product = $stmt->get_result(); 21 | 22 | }else{ 23 | header("Location: index.php"); 24 | } 25 | 26 | 27 | ?> 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 |
37 | 38 | fetch_assoc()){ ?> 39 | 40 | 41 |
42 | 43 |
44 |
45 | 46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 |
58 | 59 | 60 |
61 |
Men/Shoes
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 | 151 | 152 | 153 | 154 | 164 | -------------------------------------------------------------------------------- /cart.php: -------------------------------------------------------------------------------- 1 | $_POST['product_id'], 27 | 'product_name' => $_POST['product_name'], 28 | 'product_price' => $_POST['product_price'], 29 | 'product_image' => $_POST['product_image'], 30 | 'product_quatity' => $_POST['product_quatity'], 31 | ); 32 | 33 | $_SESSION['cart'][$product_id] = $product_array; 34 | 35 | }else{ 36 | 37 | echo ''; 38 | //echo ''; 39 | 40 | } 41 | 42 | }else{ 43 | 44 | 45 | $product_id = $_POST['product_id']; 46 | $product_name = $_POST['product_name']; 47 | $product_price = $_POST['product_price']; 48 | $product_image = $_POST['product_image']; 49 | $product_quatity = $_POST['product_quatity']; 50 | 51 | $product_array = array( 52 | 'product_id' => $product_id, 53 | 'product_name' => $product_name, 54 | 'product_price' => $product_price, 55 | 'product_image' => $product_image, 56 | 'product_quatity' => $product_quatity, 57 | ); 58 | 59 | $_SESSION['cart'][$product_id] = $product_array; 60 | } 61 | 62 | calculateTotalCart(); 63 | 64 | }else if(isset($_POST['remove_product'])){ 65 | 66 | $product_id = $_POST['product_id']; 67 | unset($_SESSION['cart'][$product_id]); 68 | 69 | calculateTotalCart(); 70 | 71 | }else if(isset($_POST['edit_quatity'])){ 72 | 73 | $product_id = $_POST['product_id']; 74 | $product_quatity = $_POST['product_quatity']; 75 | 76 | $product_array = $_SESSION['cart'][$product_id]; 77 | $product_array['product_quatity'] = $product_quatity; 78 | 79 | $_SESSION['cart'][$product_id] = $product_array; 80 | 81 | 82 | calculateTotalCart(); 83 | 84 | }else{ 85 | 86 | //header("Location: index.php"); 87 | 88 | } 89 | 90 | 91 | function calculateTotalCart(){ 92 | 93 | $total_price = 0; 94 | $total_quatity = 0; 95 | 96 | foreach ($_SESSION['cart'] as $key => $value) { 97 | 98 | $product = $_SESSION['cart'][$key]; 99 | $price = $product['product_price']; 100 | $quatity = $product['product_quatity']; 101 | 102 | $total_price = $total_price + ($price * $quatity); 103 | $total_quatity = $quatity + $total_quatity; 104 | } 105 | 106 | $_SESSION['total'] = $total_price; 107 | $_SESSION['quatity'] = $total_quatity; 108 | } 109 | 110 | 111 | 112 | 113 | ?> 114 | 115 | 116 | 117 | 118 | 119 | 120 |
121 |
122 |

Your Cart

123 |
124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | $value) { ?> 138 | 139 | 140 | 154 | 155 | 164 | 165 | 169 | 170 | 171 | 172 | 173 | 174 | 175 |
ProductQuantitSubtotal
141 |
142 | lap 143 |
144 |

145 | $ 146 |
147 |
148 | 149 | 150 |
151 |
152 |
153 |
156 | 157 |
158 | 159 | 160 | 161 | 162 |
163 |
166 | $ 167 | 168 |
176 | 177 |
178 | 179 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 |
Total$
193 | 194 |
195 | 196 |
197 |
198 | 199 |
200 |
201 | 202 |
203 | 204 | 205 | 206 | 207 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
NEW ARRIVALS
9 |

Best PricesThis Season

10 |

E-shop offers the best products for the most affordable prices.

11 | "> 12 |
13 |
14 | 15 | 16 | 17 |
18 |
19 | 20 | 21 | 22 | 23 |
24 |
25 | 26 | 27 | 28 |
29 |
30 | 31 |
32 | 33 |
34 |

Extreamly Awesome Laptops

35 | 36 | "> 37 |
38 |
39 | 40 |
41 | 42 |
43 |

Awesome PC

44 | "> 45 | 46 |
47 |
48 | 49 |
50 | 51 |
52 |

50% OFF Accesseries

53 | "> 54 | 55 |
56 |
57 |
58 |
59 | 60 | 61 | 62 | 88 | 89 | 90 | 91 | 98 | 99 | 100 | 101 | 102 | 129 | 130 | 131 | 132 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /shop.php: -------------------------------------------------------------------------------- 1 | prepare($sql2); 22 | $stmt2->bind_param("si", $category, $price); 23 | $stmt2->execute(); 24 | $result = $stmt2->get_result(); 25 | $row = $result->fetch_assoc(); 26 | $total_records = $row['total_records']; 27 | 28 | $total_records_per_page = 8; 29 | $offset = ($page_no - 1) * $total_records_per_page; 30 | 31 | $previous_page = $page_no - 1; 32 | $next_page = $page_no + 1; 33 | 34 | $adjacents = 2; 35 | 36 | $total_no_of_pages = ceil($total_records / $total_records_per_page); 37 | 38 | $stmt3 = $conn->prepare("SELECT * FROM products WHERE product_category=? AND product_price<=? LIMIT ?, ?"); 39 | $stmt3->bind_param("siii", $category, $price, $offset, $total_records_per_page); 40 | $stmt3->execute(); 41 | $products = $stmt3->get_result(); 42 | 43 | } else { 44 | 45 | if (isset($_GET['page_no']) && $_GET['page_no'] != "") { 46 | $page_no = $_GET['page_no']; 47 | } else { 48 | $page_no = 1; 49 | } 50 | 51 | $sql2 = "SELECT COUNT(*) As total_records FROM products"; 52 | $stmt2 = $conn->prepare($sql2); 53 | $stmt2->execute(); 54 | $result = $stmt2->get_result(); 55 | $row = $result->fetch_assoc(); 56 | $total_records = $row['total_records']; 57 | 58 | $total_records_per_page = 8; 59 | $offset = ($page_no - 1) * $total_records_per_page; 60 | 61 | $previous_page = $page_no - 1; 62 | $next_page = $page_no + 1; 63 | 64 | $adjacents = 2; 65 | 66 | $total_no_of_pages = ceil($total_records / $total_records_per_page); 67 | 68 | $stmt3 = $conn->prepare("SELECT * FROM products LIMIT ?, ?"); 69 | $stmt3->bind_param("ii", $offset, $total_records_per_page); 70 | $stmt3->execute(); 71 | $products = $stmt3->get_result(); 72 | } 73 | } 74 | ?> 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | prepare($sql); 104 | // $stmt->bind_param("si",$category,$price); 105 | // $stmt->execute(); 106 | 107 | // $products = $stmt->get_result(); 108 | 109 | // }else{ 110 | 111 | // if(isset($_GET['page_no']) && $_GET['page_no'] != ""){ 112 | // $page_no = $_GET['page_no']; 113 | 114 | // }else{ 115 | // $page_no = 1; 116 | // } 117 | 118 | // $sql2 = "SELECT COUNT(*) As total_records FROM products"; 119 | // $stmt2 = $conn->prepare($sql2); 120 | // $stmt2->execute(); 121 | // $total_records = $stmt2->get_result(); 122 | 123 | // $total_records_per_page = 8; 124 | // $offset = ($page_no - 1) * $total_records_per_page; 125 | 126 | // $previous_page = $page_no - 1; 127 | // $next_page = $page_no + 1; 128 | 129 | // $adjacents = "2"; 130 | 131 | // $total_no_of_pages = ceil($total_records/$total_records_per_page); 132 | 133 | // $stmt3 = $conn->prepare("SELECT * FROM products LIMIT $offset,$total_records_per_page"); 134 | // $stmt3->execute(); 135 | // $products = $stmt3->get_result(); 136 | 137 | // } 138 | // } 139 | 140 | ?> 141 | 142 | 143 | 144 | 145 | 146 | 196 | 197 | 198 | 199 |
200 |
201 |

Our products

202 |
203 |

Here you can check out our new heatured products

204 |
205 |
206 | 207 | fetch_assoc()){ ?> 208 | 209 |
210 | 211 |
212 | 213 | 214 | 215 | 216 | 217 |
218 |
219 |

$

220 | Buy Now 221 |
222 | 223 | 224 | 225 | 226 | 240 |
241 |
242 | 243 | 244 | 245 | 246 | 247 | -------------------------------------------------------------------------------- /tables.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.2.0 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Jan 28, 2024 at 02:04 PM 7 | -- Server version: 10.4.25-MariaDB 8 | -- PHP Version: 8.1.10 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Database: `php_project` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Table structure for table `admins` 28 | -- 29 | 30 | CREATE TABLE `admins` ( 31 | `admin_id` int(11) NOT NULL, 32 | `admin_name` varchar(250) NOT NULL, 33 | `admin_email` text NOT NULL, 34 | `admin_password` varchar(255) NOT NULL 35 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 36 | 37 | -- 38 | -- Dumping data for table `admins` 39 | -- 40 | 41 | INSERT INTO `admins` (`admin_id`, `admin_name`, `admin_email`, `admin_password`) VALUES 42 | (3, 'admin', 'admin@gmail.com', '$2y$10$Jm2pzhJpGPynCQbarHPIu.JEmTwaCqhLAUfK0NIXZ23ZSe2VlPqWK'); 43 | 44 | -- -------------------------------------------------------- 45 | 46 | -- 47 | -- Table structure for table `orders` 48 | -- 49 | 50 | CREATE TABLE `orders` ( 51 | `order_id` int(11) NOT NULL, 52 | `order_cost` decimal(6,2) NOT NULL, 53 | `order_status` varchar(100) NOT NULL DEFAULT 'on hold', 54 | `user_id` int(11) NOT NULL, 55 | `user_phone` int(11) NOT NULL, 56 | `user_city` varchar(255) NOT NULL, 57 | `user_address` varchar(255) NOT NULL, 58 | `order_date` datetime NOT NULL DEFAULT current_timestamp() 59 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 60 | 61 | -- 62 | -- Dumping data for table `orders` 63 | -- 64 | 65 | INSERT INTO `orders` (`order_id`, `order_cost`, `order_status`, `user_id`, `user_phone`, `user_city`, `user_address`, `order_date`) VALUES 66 | (1, '0.00', 'shipped', 1, 0, 'ssssssssssssssss', 'aaa', '2023-09-23 21:06:59'), 67 | (2, '2333.00', 'not paid', 1, 0, 'ccccccccccccccccc', 'fewgfe', '2023-09-23 21:40:45'), 68 | (3, '2333.00', 'not paid', 1, 0, 'ccccccccccccccccc', 'fewgfe', '2023-09-23 21:41:16'), 69 | (4, '2333.00', 'not paid', 1, 0, 'ccccccccccccccccc', 'fewgfe', '2023-09-23 21:41:44'), 70 | (5, '2333.00', 'paid', 1, 0, 'ssssssssssssssss', 'fewgfe', '2023-09-23 23:30:25'), 71 | (6, '2456.00', 'not paid', 1, 0, 'ddddddddd', 'fewgfe', '2023-09-24 10:38:56'), 72 | (7, '0.00', 'shipped', 1, 0, 'ssssssssssssssss', 'fewgfe', '2023-09-24 14:46:15'), 73 | (8, '933.00', 'paid', 1, 0, 'ssssssssssssssss', 'fewgfe', '2023-09-24 21:47:01'), 74 | (9, '123.00', 'not paid', 6, 0, 'ssssssssssssssss', 'fewgfe', '2023-09-24 22:19:59'), 75 | (12, '123.00', 'paid', 1, 0, 'ssssssssssssssss', 'fewgfe', '2023-09-27 10:00:22'), 76 | (13, '933.00', 'paid', 7, 0, 'ssssssssssssssss', 'dddddddd', '2023-09-30 11:25:32'), 77 | (14, '1689.00', 'not paid', 8, 0, 'ssssssssssssssss', 'fewgfe', '2023-09-30 15:43:17'), 78 | (15, '123.00', 'paid', 7, 0, 'ccccccccccccccccc', 'dddddddd', '2023-10-06 06:39:59'), 79 | (16, '123.00', 'paid', 10, 777, ' nm ', 'ddd', '2023-12-02 15:11:26'), 80 | (17, '563.00', 'not paid', 13, 1231, ' bv', 'wvvcr', '2024-01-07 16:40:35'), 81 | (18, '563.00', 'not paid', 13, 21321, 'b ', 'n', '2024-01-07 16:41:13'), 82 | (19, '123.00', 'not paid', 14, 5345, 'wdv', 'hwveh', '2024-01-27 18:11:47'); 83 | 84 | -- -------------------------------------------------------- 85 | 86 | -- 87 | -- Table structure for table `order_items` 88 | -- 89 | 90 | CREATE TABLE `order_items` ( 91 | `item_id` int(11) NOT NULL, 92 | `order_id` int(11) NOT NULL, 93 | `product_id` int(11) NOT NULL, 94 | `product_name` varchar(255) NOT NULL, 95 | `product_image` varchar(255) NOT NULL, 96 | `product_price` decimal(6,2) NOT NULL, 97 | `product_quatity` int(11) NOT NULL, 98 | `user_id` int(11) NOT NULL, 99 | `order_date` datetime NOT NULL DEFAULT current_timestamp() 100 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 101 | 102 | -- 103 | -- Dumping data for table `order_items` 104 | -- 105 | 106 | INSERT INTO `order_items` (`item_id`, `order_id`, `product_id`, `product_name`, `product_image`, `product_price`, `product_quatity`, `user_id`, `order_date`) VALUES 107 | (1, 4, 2, 'laptop', 'logo.png', '2333.00', 1, 1, '2023-09-23 21:41:44'), 108 | (2, 5, 2, 'laptop', 'logo.png', '2333.00', 1, 1, '2023-09-23 23:30:25'), 109 | (3, 6, 1, 'pc', 'one.avif', '123.00', 1, 1, '2023-09-24 10:38:56'), 110 | (4, 6, 2, 'laptop', 'logo.png', '2333.00', 1, 1, '2023-09-24 10:38:56'), 111 | (5, 7, 1, 'pc', 'one.avif', '123.00', 1, 1, '2023-09-24 14:46:15'), 112 | (6, 8, 2, 'laptop', 'logo.png', '933.00', 1, 1, '2023-09-24 21:47:01'), 113 | (7, 9, 1, 'pc', 'one.avif', '123.00', 1, 6, '2023-09-24 22:19:59'), 114 | (8, 10, 1, 'pc', 'one.avif', '123.00', 1, 1, '2023-09-25 21:06:55'), 115 | (9, 11, 2, 'laptop', 'logo.png', '933.00', 1, 1, '2023-09-26 10:51:39'), 116 | (10, 12, 4, 'pc', 'one.avif', '123.00', 1, 1, '2023-09-27 10:00:22'), 117 | (11, 13, 11, 'laptop', 'logo.png', '933.00', 1, 7, '2023-09-30 11:25:32'), 118 | (12, 14, 3, 'laptop', 'laptop1.jpeg', '563.00', 3, 8, '2023-09-30 15:43:17'), 119 | (13, 15, 4, 'pc', 'one.avif', '123.00', 1, 7, '2023-10-06 06:39:59'), 120 | (14, 16, 7, 'pc', 'one.avif', '123.00', 1, 10, '2023-12-02 15:11:26'), 121 | (15, 17, 3, 'laptop', 'laptop1.jpeg', '563.00', 1, 13, '2024-01-07 16:40:35'), 122 | (16, 18, 3, 'laptop', 'laptop1.jpeg', '563.00', 1, 13, '2024-01-07 16:41:13'), 123 | (17, 19, 15, 'pc', 'one.avif', '123.00', 1, 14, '2024-01-27 18:11:47'); 124 | 125 | -- -------------------------------------------------------- 126 | 127 | -- 128 | -- Table structure for table `payments` 129 | -- 130 | 131 | CREATE TABLE `payments` ( 132 | `payment_id` int(11) NOT NULL, 133 | `order_id` int(11) NOT NULL, 134 | `user_id` int(11) NOT NULL, 135 | `transaction_id` varchar(255) NOT NULL, 136 | `payment_date` datetime NOT NULL 137 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 138 | 139 | -- 140 | -- Dumping data for table `payments` 141 | -- 142 | 143 | INSERT INTO `payments` (`payment_id`, `order_id`, `user_id`, `transaction_id`, `payment_date`) VALUES 144 | (1, 10, 1, '7FS58243WM238772K', '2023-09-26 10:39:15'), 145 | (2, 8, 1, '2A190559ME1224602', '2023-09-26 10:40:09'), 146 | (3, 5, 1, '79B94367PJ4377228', '2023-09-26 10:41:39'), 147 | (4, 11, 1, '1HB16744CC381994P', '2023-09-26 22:02:53'), 148 | (5, 12, 1, '52U39839NW6893333', '2023-09-27 10:02:40'), 149 | (6, 13, 7, '23J63367K2002993A', '2023-09-30 11:29:15'), 150 | (7, 15, 7, '9YV40814M1865842C', '2023-10-06 06:40:26'), 151 | (8, 16, 10, '7DV04472V5033793U', '2023-12-02 15:12:12'); 152 | 153 | -- -------------------------------------------------------- 154 | 155 | -- 156 | -- Table structure for table `products` 157 | -- 158 | 159 | CREATE TABLE `products` ( 160 | `product_id` int(11) NOT NULL, 161 | `product_name` varchar(100) NOT NULL, 162 | `product_category` varchar(100) NOT NULL, 163 | `product_description` varchar(255) NOT NULL, 164 | `product_image` varchar(255) NOT NULL, 165 | `product_image2` varchar(255) DEFAULT NULL, 166 | `product_image3` varchar(255) NOT NULL, 167 | `product_image4` varchar(255) NOT NULL, 168 | `product_price` decimal(6,2) NOT NULL, 169 | `product_special_offer` int(11) NOT NULL, 170 | `product_color` varchar(100) NOT NULL 171 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 172 | 173 | -- 174 | -- Dumping data for table `products` 175 | -- 176 | 177 | INSERT INTO `products` (`product_id`, `product_name`, `product_category`, `product_description`, `product_image`, `product_image2`, `product_image3`, `product_image4`, `product_price`, `product_special_offer`, `product_color`) VALUES 178 | (3, 'laptop', 'laptop', 'laptop', 'laptop1.jpeg', 'laptop2.jpeg', 'laptop3.jpeg', 'laptop4.jpeg', '563.00', 2000, 'black'), 179 | (4, 'pc', 'pc', 'pc', 'one.avif', 'one.avif', 'one.avif', 'one.avif', '123.00', 120, 'black'), 180 | (7, 'pc', 'pc', 'pc', 'one.avif', 'one.avif', 'one.avif', 'one.avif', '123.00', 120, 'black'), 181 | (8, 'laptop', 'laptop', 'laptop', 'logo.png', 'logo.png', 'logo.png', 'logo.png', '933.00', 2000, 'black'), 182 | (14, 'laptop', 'pc', 'laptop', 'laptop1.jpeg', 'laptop2.jpeg', 'laptop3.jpeg', 'laptop4.jpeg', '563.00', 2000, 'white'), 183 | (15, 'pc', 'pc', 'pc', 'one.avif', 'one.avif', 'one.avif', 'one.avif', '123.00', 120, 'black'), 184 | (17, 'laptop', 'pc', 'fgggg', 'logo.png', 'logo.png', 'logo.png', 'logo.png', '563.00', 2000, 'black djxvnj'), 185 | (18, 'pc', 'pc', 'pc', 'one.avif', 'one.avif', 'one.avif', 'one.avif', '123.00', 120, 'black'), 186 | (19, 'laptop', 'laptop', 'laptop', 'logo.png', 'logo.png', 'logo.png', 'logo.png', '933.00', 2000, 'black'), 187 | (20, 'laptop', 'laptop', 'laptop', 'logo.png', 'logo.png', 'logo.png', 'logo.png', '563.00', 2000, 'black'), 188 | (21, '', '', '', '', NULL, '', '', '0.00', 0, ''), 189 | (22, 'laptop', 'laptop', 'laptop', 'logo.png', 'logo.png', 'logo.png', 'logo.png', '933.00', 2000, 'black'), 190 | (23, 'laptop', 'laptop', 'laptop', 'logo.png', 'logo.png', 'logo.png', 'logo.png', '563.00', 2000, 'black'), 191 | (24, 'laptop', 'laptop', 'laptop', 'logo.png', 'logo.png', 'logo.png', 'logo.png', '933.00', 2000, 'black'), 192 | (26, 'pv dxvd', 'pc', 'hdvbzh zhvhdsb hzbvjhsbd zbhjvbshzb fffffffffffffffffffffffffffffffffffffffff', 'pv dxvd1.jpeg', 'pv dxvd2.jpeg', 'pv dxvd3.jpeg', 'pv dxvd4.jpeg', '1233.00', 1222, 'black djxvnj eeeeeee'); 193 | 194 | -- -------------------------------------------------------- 195 | 196 | -- 197 | -- Table structure for table `pwd_reset` 198 | -- 199 | 200 | CREATE TABLE `pwd_reset` ( 201 | `id` int(20) NOT NULL, 202 | `email` varchar(255) NOT NULL, 203 | `selector` varchar(255) NOT NULL, 204 | `token` longtext NOT NULL, 205 | `expires` varchar(255) NOT NULL 206 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 207 | 208 | -- -------------------------------------------------------- 209 | 210 | -- 211 | -- Table structure for table `users` 212 | -- 213 | 214 | CREATE TABLE `users` ( 215 | `user_id` int(11) NOT NULL, 216 | `user_name` varchar(100) NOT NULL, 217 | `user_email` varchar(100) NOT NULL, 218 | `user_password` varchar(100) NOT NULL 219 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 220 | 221 | -- 222 | -- Dumping data for table `users` 223 | -- 224 | 225 | INSERT INTO `users` (`user_id`, `user_name`, `user_email`, `user_password`) VALUES 226 | (2, 'vipunddddd', 'vipunsvvvanjana34@gmail.com', '$2y$10$qsT0SyHvTRvXYm6Np5s8C.kirT/4puFGXLJvCQX2nqjSWQlUS6NQ.'), 227 | (3, 'new_one', 'vipunsanjqqqana34@gmail.com', '$2y$10$wKL7z0DGeIaKnNZLOI8gv.qQl62TzOpKhInVpuO.yg3.OyoMf1zam'), 228 | (4, 'new_one', 'vipunsanjqqqssana34@gmail.com', '$2y$10$nDDM2nqQAPYOimrMD6twI.s8fU6utuKSOHnVw3GKbkxw2OMXafQLK'), 229 | (5, 'day_one', 'idno22382@gmail.com', '$2y$10$vmKAeDkO1bFpkkaHFVwlRuTpbUiHWH26tp0mY9UNf/BkJwaH2XWVe'), 230 | (6, 'vipun', 'fdnfgjnj@gmail.com', '$2y$10$wd.qpJbxapX37yu2gGU6Vu0DRsl5DjnlwsOnhuq2i288GsoPzA3l.'), 231 | (7, 'vipun', 'vipunsanjana34@gmail.com', '$2y$10$9Lb8J2yrRPREJ5lli6LSOOfAH3.bvbgXS7Uww5Jgp5aKVOGVcu4Tq'), 232 | (9, 'vipun', 'vipunsanjacccccna34@gmail.com', '$2y$10$n1YZZG0FWdYPUBdeMrXASOgF4sifmenX/ZcQIzo4lArdZZtlzkB3G'), 233 | (10, 'vipun', 'vipunggggsanjana34@gmail.com', '$2y$10$EFskjZzzXtjJ7kVDnK1ysO7mppoxmberuv5TOursQaDdxYGjVJT/S'), 234 | (11, 'vipun', 'idno22fbbbbbbb382@gmail.com', '$2y$10$yk3e96jD3cmFNL8aFpxevuCBd4DQhjoFSTcVW//Xbrtsr21hGYbXy'), 235 | (12, 'vipun', 'vipunsanjana34f@gmail.com', '$2y$10$D6jC4Gpd/JgSTQ8UdWUJh.uCH1/HzSf8Ca4oXfchzSirQdXvhXKWa'), 236 | (13, 'vipun', 'vipunsanjana444444@gmail.com', '$2y$10$8J/2b49tQizPoyrfvg6z8.zwZFZ1kIgFkvnd9WziNhInb1ZMHdHlq'), 237 | (14, 'qhsgchj', 'csfqsg@gmail.com', '$2y$10$L7z3VwjhotWEpckbTFeWkuUNi5X/MheO.ls.L45aJo63K2yUac3Iu'); 238 | 239 | -- 240 | -- Indexes for dumped tables 241 | -- 242 | 243 | -- 244 | -- Indexes for table `admins` 245 | -- 246 | ALTER TABLE `admins` 247 | ADD PRIMARY KEY (`admin_id`); 248 | 249 | -- 250 | -- Indexes for table `orders` 251 | -- 252 | ALTER TABLE `orders` 253 | ADD PRIMARY KEY (`order_id`); 254 | 255 | -- 256 | -- Indexes for table `order_items` 257 | -- 258 | ALTER TABLE `order_items` 259 | ADD PRIMARY KEY (`item_id`); 260 | 261 | -- 262 | -- Indexes for table `payments` 263 | -- 264 | ALTER TABLE `payments` 265 | ADD PRIMARY KEY (`payment_id`); 266 | 267 | -- 268 | -- Indexes for table `products` 269 | -- 270 | ALTER TABLE `products` 271 | ADD PRIMARY KEY (`product_id`); 272 | 273 | -- 274 | -- Indexes for table `pwd_reset` 275 | -- 276 | ALTER TABLE `pwd_reset` 277 | ADD PRIMARY KEY (`id`); 278 | 279 | -- 280 | -- Indexes for table `users` 281 | -- 282 | ALTER TABLE `users` 283 | ADD PRIMARY KEY (`user_id`), 284 | ADD UNIQUE KEY `UX_Constraint` (`user_email`); 285 | 286 | -- 287 | -- AUTO_INCREMENT for dumped tables 288 | -- 289 | 290 | -- 291 | -- AUTO_INCREMENT for table `admins` 292 | -- 293 | ALTER TABLE `admins` 294 | MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; 295 | 296 | -- 297 | -- AUTO_INCREMENT for table `orders` 298 | -- 299 | ALTER TABLE `orders` 300 | MODIFY `order_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; 301 | 302 | -- 303 | -- AUTO_INCREMENT for table `order_items` 304 | -- 305 | ALTER TABLE `order_items` 306 | MODIFY `item_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; 307 | 308 | -- 309 | -- AUTO_INCREMENT for table `payments` 310 | -- 311 | ALTER TABLE `payments` 312 | MODIFY `payment_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; 313 | 314 | -- 315 | -- AUTO_INCREMENT for table `products` 316 | -- 317 | ALTER TABLE `products` 318 | MODIFY `product_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27; 319 | 320 | -- 321 | -- AUTO_INCREMENT for table `pwd_reset` 322 | -- 323 | ALTER TABLE `pwd_reset` 324 | MODIFY `id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; 325 | 326 | -- 327 | -- AUTO_INCREMENT for table `users` 328 | -- 329 | ALTER TABLE `users` 330 | MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; 331 | COMMIT; 332 | 333 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 334 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 335 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 336 | -------------------------------------------------------------------------------- /assets/css/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Montaga&family=Poppins:ital,wght@1,300&display=swap'); 2 | 3 | *{ 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | } 8 | 9 | body{ 10 | font-family: 'Poopins' , sans-serif; 11 | } 12 | 13 | .nav-buttons{ 14 | margin-left: 50%; 15 | } 16 | 17 | h1{ 18 | font-size: 2.5rem; 19 | font-weight: 700; 20 | } 21 | 22 | h2{ 23 | font-size: 1.rem; 24 | font-weight: 600; 25 | } 26 | 27 | h3{ 28 | font-size: 1.5rem; 29 | font-weight: 800; 30 | } 31 | 32 | h4{ 33 | font-size: 1.2rem; 34 | font-weight: 600; 35 | } 36 | 37 | h5{ 38 | color: white; 39 | font-size: 1rem; 40 | font-weight: 400; 41 | } 42 | 43 | .text-uppercase{ 44 | color: wheat; 45 | } 46 | 47 | h6{ 48 | color: #9f6b6b; 49 | } 50 | 51 | .navbar{ 52 | height: 90px !important; 53 | font-size: 16px; 54 | padding-top: 2rem !important; 55 | padding-bottom: 2rem !important; 56 | top: 0; 57 | left: 0; 58 | box-shadow: 0 5px 10px rgba(0, 0, 0,0.1); 59 | } 60 | 61 | .navbar-light .navbar-nav .nav-link{ 62 | padding: 0 20px; 63 | color: #000; 64 | transition: 0.4s ease; 65 | -webkit-transition: 0.4s ease; 66 | -moz-transition: 0.4s ease; 67 | -ms-transition: 0.4s ease; 68 | -o-transition: 0.4s ease; 69 | } 70 | 71 | .navbar-light .navbar-nav .nav-link:hover, 72 | .navbar i:hover, 73 | .navbar-light .navbar-nav .nav-link.active, 74 | .navbar i:hover{ 75 | color: red; 76 | } 77 | 78 | .navbar-brand { 79 | display: inline-block; 80 | margin: 0 auto; 81 | max-width: 15%; 82 | max-height: 4%; 83 | } 84 | 85 | .footer-brand{ 86 | display: inline-block; 87 | margin: 0 auto; 88 | max-width: 35%; 89 | max-height: 10%; 90 | } 91 | 92 | 93 | .navbar i{ 94 | font-size: 1.2rem; 95 | padding: 0 0.7px; 96 | cursor: pointer; 97 | margin-left: 5px; 98 | transition: 0.4s ease; 99 | -webkit-transition: 0.4s ease; 100 | -moz-transition: 0.4s ease; 101 | -ms-transition: 0.4s ease; 102 | -o-transition: 0.4s ease; 103 | } 104 | 105 | @media only screen and (max-width:990px){ 106 | 107 | .nav-buttons{ 108 | margin: 10px; 109 | } 110 | 111 | .nav-buttons ul{ 112 | margin: 1rem; 113 | justify-content: flex-start; 114 | align-items: flex-start; 115 | text-align: left; 116 | } 117 | 118 | .nav-buttons ul .fas{ 119 | margin: 20px 5px 10px 20px; 120 | } 121 | } 122 | 123 | #home{ 124 | background-image: url('../img/home.jpg'); 125 | width: 100%; 126 | height: 100vh; 127 | background-size: cover; 128 | background-position-x: 200px; 129 | background-position-y: 80px; 130 | display: flex; 131 | flex-direction: column; 132 | justify-content: center; 133 | align-items: flex-start; 134 | margin-bottom: 100px !important; 135 | } 136 | 137 | #home span{ 138 | color: red; 139 | } 140 | 141 | 142 | #new{ 143 | color: red; 144 | } 145 | 146 | #new .one img{ 147 | width: 100%; 148 | height: 100%; 149 | background-position: center; 150 | background-repeat: none; 151 | background-size: cover; 152 | } 153 | 154 | #new .one{ 155 | position: relative; 156 | } 157 | 158 | #new .one .details{ 159 | position: absolute; 160 | top: 0; 161 | left: 0; 162 | color: burlywood; 163 | font-weight: bold; 164 | transition: 0.4s ease; 165 | opacity: 0.8; 166 | background-color: rgb(1, 1, 1); 167 | -webkit-transition: 0.4s ease; 168 | -moz-transition: 0.4s ease; 169 | -ms-transition: 0.4s ease; 170 | -o-transition: 0.4s ease; 171 | width: 100%; 172 | height: 100%; 173 | } 174 | 175 | 176 | #new .one .details:hover{ 177 | background-color: rgba(164, 159, 137, 0.492); 178 | } 179 | 180 | 181 | #new .one:nth-child(1) .details{ 182 | display: flex; 183 | justify-content: center; 184 | flex-direction: column; 185 | align-items: flex-start; 186 | text-align: start; 187 | } 188 | 189 | 190 | #new .one:nth-child(2) .details{ 191 | display: flex; 192 | justify-content: center; 193 | flex-direction: column; 194 | align-items: center; 195 | text-align: center; 196 | } 197 | 198 | 199 | #new .one:nth-child(3) .details{ 200 | display: flex; 201 | justify-content: center; 202 | flex-direction: column; 203 | align-items: flex-end; 204 | text-align: end; 205 | } 206 | 207 | 208 | .product{ 209 | cursor: pointer; 210 | margin-bottom: 2rem; 211 | } 212 | 213 | .product img{ 214 | width: 400px; 215 | height: 250px; 216 | margin-left: 2rem; 217 | margin-right: 2rem; 218 | transition: 0.3s all; 219 | -webkit-transition: 0.3s all; 220 | -moz-transition: 0.3s all; 221 | -ms-transition: 0.3s all; 222 | -o-transition: 0.3s all; 223 | } 224 | 225 | .product:hover img{ 226 | opacity: 0.7; 227 | 228 | } 229 | 230 | .product .buy-btn{ 231 | background-color: #d03131; 232 | color: white; 233 | opacity: 0; 234 | transition: 0.3s all; 235 | transform: translateY(50px); 236 | -webkit-transform: translateY(50px); 237 | -moz-transform: translateY(50px); 238 | -ms-transform: translateY(50px); 239 | -o-transform: translateY(50px); 240 | -webkit-transition: 0.3s all; 241 | -moz-transition: 0.3s all; 242 | -ms-transition: 0.3s all; 243 | -o-transition: 0.3s all; 244 | } 245 | 246 | 247 | .shop-buy-btn{ 248 | background-color: #d03131; 249 | color: rgb(255, 255, 255); 250 | opacity: 1; 251 | text-decoration: none !important; 252 | } 253 | 254 | .shop-buy-btn:hover{ 255 | background-color: #d03131; 256 | color: rgb(255, 255, 255); 257 | opacity: 0.5; 258 | text-decoration: none !important; 259 | } 260 | 261 | .product:hover .buy-btn{ 262 | opacity: 1; 263 | transform: translateY(0px); 264 | -webkit-transform: translateY(0px); 265 | -moz-transform: translateY(0px); 266 | -ms-transform: translateY(0px); 267 | -o-transform: translateY(0px); 268 | } 269 | 270 | .pagination{ 271 | display: flex; 272 | justify-content: center; 273 | align-items: center; 274 | color: #fb774b !important; 275 | } 276 | 277 | hr{ 278 | width: 40px; 279 | height: 3px !important; 280 | opacity: 1 !important; 281 | align-items: center !important; 282 | display: flex !important; 283 | background-color: #d4613b; 284 | } 285 | 286 | #banner{ 287 | background-image: url("../img/Home_Image2.jpg"); 288 | width: 100%; 289 | height: 60vh; 290 | background-size: cover; 291 | background-position-x: center; 292 | background-position-y: 88px; 293 | background-repeat: no-repeat; 294 | background-attachment: fixed; 295 | display: flex; 296 | flex-direction: column; 297 | justify-content: center; 298 | align-items: flex-start; 299 | } 300 | 301 | 302 | #banner h1{ 303 | color: coral; 304 | } 305 | 306 | #banner button{ 307 | background-color: #fb774b; 308 | } 309 | 310 | 311 | #banner button:hover{ 312 | background-color: #1d1d1d; 313 | } 314 | 315 | footer{ 316 | background-color: black; 317 | } 318 | 319 | 320 | footer .copyright a:hover{ 321 | color: #D8D8D8; 322 | background-color: red; 323 | } 324 | 325 | footer p{ 326 | color: #999; 327 | font-size: 0.8rem; 328 | } 329 | 330 | .footer-one p{ 331 | color: white; 332 | } 333 | 334 | .icon{ 335 | font-size: 35px; 336 | padding: 10px; 337 | text-align: center; 338 | line-height: 38px; 339 | border-radius: 50%; 340 | margin: 0 5px; 341 | transition: 0.3s ease; 342 | background-color: white; 343 | color: #000; 344 | -webkit-border-radius: 50%; 345 | -moz-border-radius: 50%; 346 | -ms-border-radius: 50%; 347 | -o-border-radius: 50%; 348 | -webkit-transition: 0.3s ease; 349 | -moz-transition: 0.3s ease; 350 | -ms-transition: 0.3s ease; 351 | -o-transition: 0.3s ease; 352 | } 353 | 354 | 355 | .small-img-group{ 356 | display: flex; 357 | justify-content: space-between; 358 | } 359 | 360 | .small-img-col{ 361 | flex-basis: 24%; 362 | cursor: pointer; 363 | } 364 | 365 | .single-product input{ 366 | width: 50px; 367 | height: 40px; 368 | padding-left: 10px; 369 | font-size: 16px; 370 | margin-right: 10px; 371 | } 372 | 373 | 374 | .single-product input:focus{ 375 | outline: none; 376 | } 377 | 378 | 379 | .single-product .buy-btn{ 380 | background-color: orange; 381 | opacity: 1; 382 | transition: 0.4s all; 383 | -webkit-transition: 0.4s all; 384 | -moz-transition: 0.4s all; 385 | -ms-transition: 0.4s all; 386 | -o-transition: 0.4s all; 387 | } 388 | 389 | 390 | .single-product .buy-btn:hover{ 391 | background-color: black; 392 | opacity: 1; 393 | transition: 0.4s all; 394 | -webkit-transition: 0.4s all; 395 | -moz-transition: 0.4s all; 396 | -ms-transition: 0.4s all; 397 | -o-transition: 0.4s all; 398 | } 399 | 400 | .nabar .brand{ 401 | color: coral; 402 | margin: 3px 5px; 403 | font-size: 105rem; 404 | } 405 | 406 | 407 | .cart table{ 408 | width: 100%; 409 | border-collapse: collapse; 410 | } 411 | 412 | .cart .product-info{ 413 | display: flex; 414 | flex-wrap: wrap; 415 | } 416 | 417 | .cart th{ 418 | height: 10px; 419 | text-align: left; 420 | padding: 5px 10px; 421 | color: white; 422 | background-color: orange; 423 | } 424 | 425 | 426 | .cart td{ 427 | padding: 10px 20px; 428 | } 429 | 430 | .cart td a{ 431 | color: red; 432 | } 433 | 434 | .cart-img{ 435 | width: 80px !important; 436 | height: 80px !important; 437 | margin-right: 10px; 438 | } 439 | 440 | .product-img{ 441 | width: 80px !important; 442 | height: 80px !important; 443 | margin-right: 10px; 444 | } 445 | 446 | .cart .remove-btn{ 447 | color: #fb774b; 448 | text-decoration: none; 449 | font-size: 14px; 450 | background-color: white !important; 451 | border: none !important; 452 | width: 100%; 453 | } 454 | 455 | .cart .edit-btn{ 456 | color: #fb774b; 457 | text-decoration: none; 458 | font-size: 15px; 459 | background-color: white !important; 460 | border: none !important; 461 | width: 100%; 462 | } 463 | 464 | .cart .product-info p{ 465 | margin: 3px; 466 | } 467 | 468 | .cart-total{ 469 | display: flex; 470 | justify-content: flex-end; 471 | } 472 | 473 | .cart-total table{ 474 | width: 100%; 475 | max-width: 500px; 476 | border-top: 3px solid orange; 477 | } 478 | 479 | td:last-child{ 480 | text-align: right; 481 | } 482 | 483 | th:last-child{ 484 | text-align: right; 485 | } 486 | 487 | .checkout-container{ 488 | display: flex; 489 | justify-content: flex-end; 490 | } 491 | 492 | .checkout-btn{ 493 | display: flex; 494 | justify-content: flex-end; 495 | background-color: rgb(0, 0, 0); 496 | color: white; 497 | font-weight: 800; 498 | } 499 | 500 | 501 | .checkout-btn:hover{ 502 | display: flex; 503 | justify-content: flex-end; 504 | background-color: rgb(255, 0, 0); 505 | color: white; 506 | font-weight: 800; 507 | } 508 | 509 | 510 | #login-form{ 511 | width: 50%; 512 | margin: 5px auto; 513 | text-align: center; 514 | padding: 20px; 515 | border-top: 1px solid orange; 516 | } 517 | 518 | #login-form input{ 519 | width: 50%; 520 | margin: 5px auto; 521 | } 522 | 523 | #login-form #login-btn{ 524 | margin-top: 10px; 525 | background-color: orangered; 526 | color: white; 527 | height: 35px; 528 | border-radius: 10px; 529 | -webkit-border-radius: 10px; 530 | -moz-border-radius: 10px; 531 | -ms-border-radius: 10px; 532 | -o-border-radius: 10px; 533 | } 534 | 535 | #login-form #login-btn:hover{ 536 | background-color: rgb(0, 0, 0); 537 | color: white; 538 | height: 35px; 539 | border-radius: 10px; 540 | -webkit-border-radius: 10px; 541 | -moz-border-radius: 10px; 542 | -ms-border-radius: 10px; 543 | -o-border-radius: 10px; 544 | } 545 | 546 | 547 | #login-form #register-url{ 548 | color: rgb(199, 70, 70); 549 | } 550 | 551 | 552 | #register-form{ 553 | width: 50%; 554 | margin: 5px auto; 555 | text-align: center; 556 | padding: 20px; 557 | border-top: 1px solid orange; 558 | } 559 | 560 | 561 | #register-form input{ 562 | width: 50%; 563 | margin: 5px auto; 564 | } 565 | 566 | #register-form #register-btn{ 567 | margin-top: 10px; 568 | background-color: orangered; 569 | color: white; 570 | height: 35px; 571 | border-radius: 10px; 572 | -webkit-border-radius: 10px; 573 | -moz-border-radius: 10px; 574 | -ms-border-radius: 10px; 575 | -o-border-radius: 10px; 576 | } 577 | 578 | #register-form #register-btn:hover{ 579 | background-color: rgb(0, 0, 0); 580 | color: white; 581 | height: 35px; 582 | border-radius: 10px; 583 | -webkit-border-radius: 10px; 584 | -moz-border-radius: 10px; 585 | -ms-border-radius: 10px; 586 | -o-border-radius: 10px; 587 | } 588 | 589 | #register-form #login-url{ 590 | color: rgb(199, 70, 70); 591 | } 592 | 593 | #account-form{ 594 | width: 50%; 595 | margin: 35px auto; 596 | text-align: center; 597 | padding: 20px; 598 | } 599 | 600 | 601 | #account-form input{ 602 | margin: 5px auto; 603 | } 604 | 605 | 606 | #account-form #change-pass-btn{ 607 | color: #fff; 608 | background-color: #fb774b; 609 | } 610 | 611 | 612 | #account-form #change-pass-btn:hover{ 613 | color: #fff; 614 | background-color: #000000; 615 | } 616 | 617 | 618 | .account-info #orders-btn, #logout-btn{ 619 | color: #fb774b; 620 | text-decoration: none;; 621 | } 622 | 623 | .orders .product-info{ 624 | display: flex; 625 | flex-wrap: wrap; 626 | } 627 | 628 | .orders th{ 629 | padding: 5px 20px; 630 | color: #fff; 631 | background-color: #fb774b; 632 | text-align: left; 633 | } 634 | 635 | .orders th:nth-child(2){ 636 | text-align: right; 637 | } 638 | 639 | .orders td{ 640 | padding: 10px 20px; 641 | } 642 | 643 | .orders td img{ 644 | width: 80px; 645 | height: 80px; 646 | margin-right: 10px; 647 | } 648 | 649 | .orders .order-details-btn{ 650 | color: white; 651 | background-color: #d4613b !important; 652 | border-radius: 10px; 653 | -webkit-border-radius: 10px; 654 | -moz-border-radius: 10px; 655 | -ms-border-radius: 10px; 656 | -o-border-radius: 10px; 657 | } 658 | 659 | 660 | #checkout-form .checkout-small-element{ 661 | display: inline-block; 662 | width: 48%; 663 | margin: 10px auto; 664 | } 665 | 666 | 667 | #checkout-form .checkout-large-element{ 668 | width: 96.5%; 669 | } 670 | 671 | 672 | #checkout-form .checkout-btn-container{ 673 | margin: 10px; 674 | text-align: right; 675 | margin-right: 40px; 676 | } 677 | 678 | 679 | #checkout-form #checkout-btn{ 680 | color: white; 681 | background-color: orangered; 682 | } 683 | 684 | 685 | #checkout-form #checkout-btn:hover{ 686 | color: white; 687 | background-color: rgb(0, 0, 0); 688 | } 689 | 690 | #contact span{ 691 | color: #fb774b; 692 | } 693 | 694 | .star{ 695 | padding: 10px 0; 696 | } 697 | 698 | .star i{ 699 | font-size: 0.9rem; 700 | color: goldenrod; 701 | } 702 | 703 | 704 | .paypal-buttons .paypal-buttons-context-iframe { 705 | display: flex !important; 706 | align-items: center !important; 707 | justify-content: center !important; 708 | } 709 | 710 | #shop{ 711 | width: 70%; 712 | display: inline-block; 713 | margin-bottom: 50px; 714 | } 715 | 716 | #search{ 717 | margin-top: 10px; 718 | width: 20%; 719 | display: inline-block; 720 | border-radius: 15px; 721 | -webkit-border-radius: 15px; 722 | -moz-border-radius: 15px; 723 | -ms-border-radius: 15px; 724 | -o-border-radius: 15px; 725 | height: 100%; 726 | } 727 | 728 | 729 | .cart-quatity{ 730 | background-color: orangered; 731 | color: white; 732 | padding: 2px 5px; 733 | margin: -2px; 734 | margin-bottom: 3px; 735 | border-radius: 50%; 736 | -webkit-border-radius: 50%; 737 | -moz-border-radius: 50%; 738 | -ms-border-radius: 50%; 739 | -o-border-radius: 50%; 740 | font-size: 1rem; 741 | } 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | .hcenter{ 752 | width:550px; 753 | padding: 2em 0 2em 0; 754 | border:solid 5px #F1F1F1; 755 | margin-top: 10px; 756 | margin-right: auto; 757 | margin-bottom: 0; 758 | margin-left: auto; 759 | background-color:rgba(220, 220, 220, 0.7); 760 | } 761 | .texxst{ 762 | padding: 10px 0px 10px 100px; 763 | } 764 | .admin label{ 765 | padding: 20px; 766 | margin-top: 100px; 767 | margin-bottom: 0; 768 | } 769 | .admins input{ 770 | padding: 0px; 771 | margin: 0px 0px 0px 10px; 772 | } 773 | .table1 th{ 774 | height: 30px; 775 | padding: 10px; 776 | background-color: rgba(254, 85, 0, 0.904); 777 | } 778 | .table1 tr{ 779 | inline-size: auto; 780 | overflow-wrap: break-all; 781 | } 782 | .table1 td{ 783 | padding: 10px; 784 | } 785 | .edit{ 786 | background-color:rgba(7, 0, 221, 0.814) ; 787 | color: #D8D8D8; 788 | } 789 | .edit:hover{ 790 | background-color: rgba(43, 47, 162, 0.8) ; 791 | } 792 | .table1{ 793 | padding: 20px; 794 | margin-bottom: 20px; 795 | margin-top: 60px; 796 | width:100%; 797 | height: 80%; 798 | border:solid 5px #F1F1F1; 799 | margin-right: auto; 800 | margin-left: auto; 801 | text-align: center; 802 | background-color:rgba(180, 208, 200, 0.777); 803 | border-collapse: collapse; 804 | } 805 | .table1 tr:nth-child(even){ 806 | background-color: beige; 807 | } 808 | 809 | .viewws{ 810 | text-align: center; 811 | background-color:rgba(15, 37, 240, 0.918) ; 812 | } 813 | .viewws:hover{ 814 | text-align: center; 815 | background-color:rgba(41, 240, 140, 0.7) ; 816 | } 817 | 818 | --------------------------------------------------------------------------------