-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cart.aspx
91 lines (89 loc) · 6.5 KB
/
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
<%@ Page Title="" Language="C#" MasterPageFile="~/User.master" AutoEventWireup="true"
CodeFile="Cart.aspx.cs" Inherits="Cart" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<title>Cart</title>
<link href="Styles.css" rel="stylesheet" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" />
<%--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>--%>
<link href="css/Custome.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<br />
<br />
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div class="container">
<br />
<br />
<button id="btnCart2" runat="server" class="btn btn-primary navbar-btn pull-right" onserverclick="btnCart2_ServerClick" type="button">
Cart <span id="CartBadge" runat="server" class="badge">0</span>
</button>
<div style="padding-top: 50px">
<div class="col-md-9">
<h4 class="proNameViewCart" runat="server" id="h4NoItems"></h4>
<div id="divQtyError" runat="server" class="alert alert-success alert-dismissible fade in h4">
<a href="#" class="close" data-dismiss="alert" aria-label="close"> ×</a>
<strong>Oops! </strong>Quantity cannot be less than 1.
</div>
<asp:Repeater ID="RptrCartProducts" OnItemCommand="RptrCartProducts_ItemCommand" runat="server">
<ItemTemplate>
<%--Show cart details start--%>
<div class="media" style="border: 1px solid black;">
<div class="media-left">
<a href="ProductView.aspx?PID=<%# Eval("PID") %>" target="_blank">
<img class="media-object" width="100px" src="Images/ProductImages/<%# Eval("PID") %>/<%# Eval("Name") %><%# Eval("Extention") %>" alt="<%# Eval("Name") %>" onerror="this.src='Images/NoImg.png'" />
</a>
</div>
<div class="media-body">
<h4 class="media-heading proNameViewCart"><%# Eval("PName") %></h4>
<span class="ProPriceViewCart">Rs.  <%# Eval("PSelPrice","{0:0.00}") %></span>
<span class="proOgPriceView">Rs.  <%# Eval("PPrice","{0:0.00}") %></span>
<span class="proPriceDiscountView"> Off Rs.<%# string.Format("{0}",Convert.ToInt64(Eval("PPrice"))-Convert.ToInt64(Eval("PSelPrice"))) %></span>
<div class="pull-right form-inline">
<asp:Label ID="lblQty" runat="server" Text="Qty:" Font-Size="Large"></asp:Label>
<asp:Button ID="BtnMinus" CommandArgument='<%# Eval("PID") %>' CommandName="DoMinus" Font-Size="Large" runat="server" Text="-" /> 
<asp:TextBox ID="txtQty" runat="server" Width="40" Font-Size="Large" TextMode="SingleLine" Style="text-align: center" Text='<%# Eval("Qty") %>'></asp:TextBox> 
<asp:Button ID="BtnPlus" CommandArgument='<%# Eval("PID") %>' CommandName="DoPlus" runat="server" Text="+" Font-Size="Large" />   
</div>
<br />
<p>
<asp:Button CommandArgument='<%#Eval("CartID") %>' CommandName="RemoveThisCart" ID="btnRemoveCart" CssClass="RemoveButton1" runat="server" Text="Remove" />
<br />
<span class="proNameViewCart pull-right">SubTotal: Rs.  <%# Eval("SubSAmount","{0:0.00}") %></span>
</p>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
<%--Show cart details Ending--%>
</div>
<div class="col-md-3" runat="server" id="divAmountSect">
<div>
<h5 class=" proNameViewCart">Price Details</h5>
<div>
<label class=" ">Total</label>
<span class="pull-right priceGray" runat="server" id="spanCartTotal"></span>
</div>
<div>
<label class=" ">Cart Discount</label>
<span class="pull-right priceGreen" runat="server" id="spanDiscount"></span>
</div>
</div>
<div>
<div class="cartTotal">
<label>Cart Total</label>
<span class="pull-right " runat="server" id="spanTotal"></span>
<div>
<asp:Button ID="btnBuyNow" CssClass="buyNowbtn" runat="server" OnClick="btnBuyNow_Click" Text="BUY NOW" />
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>