-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathShopping_Cart.aspx
163 lines (146 loc) · 7.29 KB
/
Shopping_Cart.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<%@ Page Title="" Language="VB" MasterPageFile="~/Masterpage.master" AutoEventWireup="false" CodeFile="Shopping_Cart.aspx.vb" Inherits="Shopping_Cart" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<meta charset="UTF-8">
<meta name="description" content="Male_Fashion Template">
<meta name="keywords" content="Male_Fashion, unica, creative, html">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Male-Fashion | Template</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800;900&display=swap"
rel="stylesheet">
<!-- Css Styles -->
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="css/elegant-icons.css" type="text/css">
<link rel="stylesheet" href="css/magnific-popup.css" type="text/css">
<link rel="stylesheet" href="css/nice-select.css" type="text/css">
<link rel="stylesheet" href="css/owl.carousel.min.css" type="text/css">
<link rel="stylesheet" href="css/slicknav.min.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<!-- Breadcrumb Section Begin -->
<section class="breadcrumb-option">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="breadcrumb__text">
<h4>Shopping Cart</h4>
<div class="breadcrumb__links">
<a href="./Default.aspx">Home</a>
<a href="Shop.aspx">Shop</a>
<span>Shopping Cart</span>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Breadcrumb Section End -->
<!-- Shopping Cart Section Begin -->
<section class="shopping-cart spad">
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="shopping__cart__table">
<table>
<thead>
<tr>
<th>Product</th>
<th>Quantity</th>
<th>Total</th>
<th></th>
</tr>
</thead>
<tbody>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<tr>
<td class="product__cart__item">
<div class="product__cart__item__pic">
<img src='<%# "img/product/" + Eval("pimg") %>' alt="" height="90" width="90">
</div>
<div class="product__cart__item__text">
<h6><%# Eval("pname") %></h6>
<h5>₹<%# Eval("pprice") %></h5>
</div>
</td>
<td class="quantity__item">
<div class="quantity">
<div class="pro-qty-2" id="qty">
<input type="text" id="quantity" value='<%# Eval("Quantity") %>' readonly>
</div>
</div>
</td>
<td class="cart__price" id="price">₹<%#Eval("Quantity") * Eval("pprice") %></td>
<td class="cart__close" runat="server" id="Cancel" >
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="Order_id" OnClick="LinkButton1_Click" CommandArgument='<%# Eval("id") %>'>
<i class="fa fa-close"></i>
</asp:LinkButton>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
<asp:HiddenField ID="qty_hidden" runat="server" />
<asp:HiddenField ID="HiddenField1" runat="server" value ='<%#Eval("Quantity") * Eval("pprice") %>'/>
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString='<%$ ConnectionStrings:data_stu6ConnectionString %>' SelectCommand="SELECT * FROM [Cart_Master], [Product_Master] WHERE ([User_id] = @User_id) and Cart_Master.pid = Product_Master.pid">
<SelectParameters>
<asp:SessionParameter SessionField="User_id" DefaultValue="0" Name="User_id" Type="Int32"></asp:SessionParameter>
</SelectParameters>
</asp:SqlDataSource>
</tbody>
</table>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="continue__btn">
<a href="Shop.aspx">Continue Shopping</a>
</div>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="cart__discount">
<h6>Discount codes</h6>
<%--<form action="#">--%>
<input type="text" placeholder="Coupon code" runat="server" id="coupanCode">
<asp:Button ID="Apply" runat="server" Text="Apply" />
<%--</form>--%>
</div>
<div class="cart__total">
<h6>Cart total</h6>
<ul>
<li>Subtotal <span id="subtotal">₹0</span></li>
<li>Total <span id="total">₹0</span></li>
</ul>
<a href="Checkout.aspx" class="primary-btn" onclick="fun1()" id="checkout">Proceed to checkout</a>
</div>
</div>
</div>
</div>
</section>
<!-- Shopping Cart Section End -->
<script>
document.getElementById("cart_item").innerText = "<%= qty_hidden.Value %>"
document.getElementById("subtotal").innerHTML = "₹<%= HiddenField1.Value %>"
document.getElementById("total").innerHTML = "₹<%= HiddenField1.Value %>"
function fun1() {
if (document.getElementById("total").innerText == "₹0") {
alert("Your Cart is Empty")
document.getElementById("checkout").setAttribute("href", "#")
}
}
</script>
<!-- Js Plugins -->
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.nice-select.min.js"></script>
<script src="js/jquery.nicescroll.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<%--<script src="js/jquery.countdown.min.js"></script>--%>
<script src="js/jquery.slicknav.js"></script>
<script src="js/mixitup.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/main.js"></script>
</asp:Content>