From 7cb8f0660ed81aab5b42504ea15eabc63c9afa63 Mon Sep 17 00:00:00 2001 From: bawantha Date: Wed, 28 Nov 2018 09:52:45 +0530 Subject: [PATCH] cart is added --- cart.php | 230 +++++++++++++++++++++++++++++++ controllers/login.controller.php | 2 +- products.php | 2 +- styles/style.css | 58 ++++++++ view.php | 2 +- 5 files changed, 291 insertions(+), 3 deletions(-) diff --git a/cart.php b/cart.php index e69de29..fe1ff40 100644 --- a/cart.php +++ b/cart.php @@ -0,0 +1,230 @@ + + + + + + C Online + + + + + + + + < + + + + + + + +
+ +
+ +
+ +

Shopping Cart

+ + + +

You currently have item(s) in your cart.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProductQuantityUnit PriceDelete Sub Total
+ + + + + + + + + + + + +
Total
+ + +
+ + + + +
+ + +
+ + window.open('cart.php','_self')"; + } + + + + } + + + + + } + + + + } + + echo @$up_cart = update_cart(); + + + + ?> + + + + + +
\ No newline at end of file diff --git a/controllers/login.controller.php b/controllers/login.controller.php index 71fc781..b195a72 100644 --- a/controllers/login.controller.php +++ b/controllers/login.controller.php @@ -10,7 +10,7 @@ // email and password sent from form $email = mysqli_real_escape_string($db,$_POST['email']); - $password = md5(mysqli_real_escape_string($db,$_POST['password'])); + $password = mysqli_real_escape_string($db,$_POST['password']); $sql = "SELECT customer_id FROM customer_registered WHERE email = '$email' AND password = '$password' "; $result = mysqli_query($db,$sql); diff --git a/products.php b/products.php index 5cec569..f2a093b 100644 --- a/products.php +++ b/products.php @@ -27,7 +27,7 @@

- +f
diff --git a/styles/style.css b/styles/style.css index 1f04940..2ae9d3b 100644 --- a/styles/style.css +++ b/styles/style.css @@ -461,5 +461,63 @@ hr.dotted { margin-right:5px; } +#content #cart .table tbody tr td img { + width: 50px; +} + +#content #cart .table tbody tr td input { + width: 40px; + text-align: right; + +} + +#content #cart .table tbody tr td{ + vertical-align: middle; + +} +#content #cart .table tfoot { + font-size:18px; +} + +.box .box-footer { + background: #f7f7f7; + margin: 30px -20px -20px; + padding:20px; + border-top: solid 1px #eeeeee; +} + +.box .box-footer:before, +.box .box-footer:after { + content:" "; + display: table; +} + +.box .box-footer:after { + clear:both; +} + +.box .box-header { + background:#f7f7f7; + margin:-20px -20px 20px; + padding:20px; + border-bottom: solid 1px #eeeeee; + +} + +#content #order-summary table { + margin-top: 20px; + +} +#content #order-summary table td { + color: #999999; +} + +#content #order-summary table tr.total td, +#content #order-summary table tr.total th{ + font-size: 18px; + color:#555555; + font-weight: 700; + +} diff --git a/view.php b/view.php index d101084..d237218 100644 --- a/view.php +++ b/view.php @@ -42,7 +42,7 @@
- +