Download Project – SQL DB Query – Responsive Shopping Website using ASP.NET & Bootstrap

0
4041

This tutorial is about creating stunning responsive shopping website using ASP.NET and Bootstrap, this tutorial covers all the development process from client side to server side. This tutorial series is very useful to those who are developing their academic project.

paytm integration

Part 01

Learn the basic setup of Bootstrap and how to implement bootstrap in ASP .NET using Visual Studio.

Part 02

Creates the responsive navigation menu with website branding.

Part 03

Creates responsive Carousel or Image slider

Part 04

Creates three column list with image circle and text.

Part 05

Creates responsive footer section.

Part 06

Creates responsive sign up page.

Part 07

Save the sign up form data to the database.

Part 08

Design a responsive sign in page with asp.net validation.

Part 09

Creates secure login with session, and cookies to remember your password.

Part 10

Creates master page with bootstrap, and how to create web forms using master page.

Part 11

Creates multi user login system.

Part 12

Creates secure forgot password function

Part 13

Generate password recovery link with GUID code and send email to user.

Part 14

How to authenticate user from their reset link, and gives permission to reset their password.

Part 15

Create Add Products page.

Part 16

Products – Database Designing.

Part 17

Insert Master Data – Brands,Main/Sub Categories,Size,Gender.

Part 18

Display our data into bootstrap tables using repeater control.

Part 19

Insert Products – Scope Identity.

Part 20

Insert Size & Quantity- Multiple Image Upload.

Part 21

View All Products-Thumbnails-Tile VIew.

Part 22

Bind All Products with Repeater from Multiple Tables.

Part 23

Designing Product View Page.

Part 24

Dynamic Image carousel.

Part 25

Bind Product,Size Details-Repeater.

Part 26

Add to Cart.

Part 27

Cart Count-Badges-JQuery Click.

Part 28

Cart Page Design-Media Object.

Part 29

Cart-Dynamic Data-Sever Currency.

Part 30

Cart-Bind Price Data-Remove Item.

Part 31

Payment Page Design-Togglable Tabs.

Part 32

Payment Page-Purchase Tracking.

Part 33

Paytm Payment Gateway Integration.

Watch Youtube Full Playlist

Download Full Project

SQL Query to Generate Tables

Tables

CREATE TABLE [dbo].[Users] (
[Uid] INT IDENTITY (1, 1) NOT NULL,
[Username] NVARCHAR (MAX) NULL,
[Password] NVARCHAR (MAX) NULL,
[Email] NVARCHAR (MAX) NULL,
[Name] NVARCHAR (MAX) NULL,
[Usertype] NCHAR (10) NULL,
PRIMARY KEY CLUSTERED ([Uid] ASC)
);

CREATE TABLE [dbo].[tblGender] (
[GenderID] BIGINT IDENTITY (1, 1) NOT NULL,
[GenderName] NVARCHAR (50) NULL,
PRIMARY KEY CLUSTERED ([GenderID] ASC)
);

CREATE TABLE [dbo].[tblCategories] (
[CatID] BIGINT IDENTITY (1, 1) NOT NULL,
[CatName] NVARCHAR (MAX) NULL,
PRIMARY KEY CLUSTERED ([CatID] ASC)
);

CREATE TABLE [dbo].[tblSubCategories] (
[SubCatID] BIGINT IDENTITY (1, 1) NOT NULL,
[SubCatName] NVARCHAR (MAX) NULL,
[MainCatID] BIGINT NULL,
PRIMARY KEY CLUSTERED ([SubCatID] ASC),
CONSTRAINT [FK_tblSubCategories_Cat] FOREIGN KEY ([MainCatID]) REFERENCES [dbo].[tblCategories] ([CatID])
);

CREATE TABLE [dbo].[tblBrands] (
[BrandID] BIGINT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (MAX) NULL,
PRIMARY KEY CLUSTERED ([BrandID] ASC)
);

CREATE TABLE [dbo].[tblSizes] (
[SizeID] BIGINT IDENTITY (1, 1) NOT NULL,
[SizeName] NVARCHAR (50) NULL,
[BrandID] BIGINT NULL,
[CategoryID] BIGINT NULL,
[SubCategoryID] BIGINT NULL,
[GenderID] BIGINT NULL,
PRIMARY KEY CLUSTERED ([SizeID] ASC),
CONSTRAINT [FK_tblSizes_ToBrand] FOREIGN KEY ([BrandID]) REFERENCES [dbo].[tblBrands] ([BrandID]),
CONSTRAINT [FK_tblSizes_ToCat] FOREIGN KEY ([CategoryID]) REFERENCES [dbo].[tblCategories] ([CatID]),
CONSTRAINT [FK_tblSizes_ToSubCat] FOREIGN KEY ([SubCategoryID]) REFERENCES [dbo].[tblSubCategories] ([SubCatID]),
CONSTRAINT [FK_tblSizes_ToGender] FOREIGN KEY ([GenderID]) REFERENCES [dbo].[tblGender] ([GenderID])
);

CREATE TABLE [dbo].[tblProducts] (
[PID] BIGINT IDENTITY (1, 1) NOT NULL,
[PName] NVARCHAR (MAX) NULL,
[PPrice] MONEY NULL,
[PSelPrice] MONEY NULL,
[PBrandID] BIGINT NULL,
[PCategoryID] BIGINT NULL,
[PSubCatID] BIGINT NULL,
[PGender] BIGINT NULL,
[PDescription] NVARCHAR (MAX) NULL,
[PProductDetails] NVARCHAR (MAX) NULL,
[PMaterialCare] NVARCHAR (MAX) NULL,
[FreeDelivery] INT NULL,
[30DayRet] INT NULL,
[COD] INT NULL,
PRIMARY KEY CLUSTERED ([PID] ASC),
CONSTRAINT [FK_tblProducts_ToTable] FOREIGN KEY ([PBrandID]) REFERENCES [dbo].[tblBrands] ([BrandID]),
CONSTRAINT [FK_tblProducts_ToTable_1] FOREIGN KEY ([PCategoryID]) REFERENCES [dbo].[tblCategories] ([CatID]),
CONSTRAINT [FK_tblProducts_ToTable_2] FOREIGN KEY ([PSubCatID]) REFERENCES [dbo].[tblSubCategories] ([SubCatID]),
CONSTRAINT [FK_tblProducts_ToTable_3] FOREIGN KEY ([PGender]) REFERENCES [dbo].[tblGender] ([GenderID])
);

CREATE TABLE [dbo].[tblProductImages] (
[PIMGID] BIGINT IDENTITY (1, 1) NOT NULL,
[PID] BIGINT NULL,
[Name] NVARCHAR (MAX) NULL,
[Extention] NVARCHAR (50) NULL,
PRIMARY KEY CLUSTERED ([PIMGID] ASC),
CONSTRAINT [FK_tblProductImages_ToTable] FOREIGN KEY ([PID]) REFERENCES [dbo].[tblProducts] ([PID])
);

CREATE TABLE [dbo].[tblProductSizeQuantity] (
[PrdSizeQuantID] BIGINT IDENTITY (1, 1) NOT NULL,
[PID] BIGINT NULL,
[SizeID] BIGINT NULL,
[Quantity] INT NULL,
PRIMARY KEY CLUSTERED ([PrdSizeQuantID] ASC),
CONSTRAINT [FK_tblProductSizeQuantity_ToTable] FOREIGN KEY ([PID]) REFERENCES [dbo].[tblProducts] ([PID]),
CONSTRAINT [FK_tblProductSizeQuantity_ToTable_1] FOREIGN KEY ([SizeID]) REFERENCES [dbo].[tblSizes] ([SizeID])
);

CREATE TABLE [dbo].[tblPurchase] (
[PurchaseID] BIGINT IDENTITY (1, 1) NOT NULL,
[UserID] INT NULL,
[PIDSizeID] NVARCHAR (MAX) NULL,
[CartAmount] MONEY NULL,
[CartDiscount] MONEY NULL,
[TotalPayed] MONEY NULL,
[PaymentType] NVARCHAR (50) NULL,
[PaymentStatus] NVARCHAR (50) NULL,
[DateOfPurchase] DATETIME NULL,
[Name] NVARCHAR (MAX) NULL,
[Address] NVARCHAR (MAX) NULL,
[PinCode] NVARCHAR (50) NULL,
[MobileNumber] NVARCHAR (50) NULL,
PRIMARY KEY CLUSTERED ([PurchaseID] ASC),
CONSTRAINT [FK_tblPurchase_ToUsers] FOREIGN KEY ([UserID]) REFERENCES [dbo].[Users] ([Uid])
);

CREATE TABLE [dbo].[ForgotPassRequests] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[Uid] INT NULL,
[RequestDateTime] DATETIME NULL,
PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_ForgotPassRequests_Users] FOREIGN KEY ([Uid]) REFERENCES [dbo].[Users] ([Uid])
);

STORED PROCEDURES

CREATE PROCEDURE [dbo].[procBindAllProducts]

AS
select A.*,B.*,C.Name,A.PPrice-A.PSelPrice as DiscAmount,B.Name as ImageName,C.Name as BrandName
from tblProducts A
inner join tblBrands C on C.BrandID=A.PBrandID
cross apply(
select top 1 * from tblProductImages B where B.PID = A.PID order by B.PID desc
) B
order by A.pid desc
RETURN 0

CREATE PROCEDURE [dbo].[procInsertProducts]
(
@PName nvarchar(MAX),
@PPrice money,
@PSelPrice money,
@PBrandID bigint,
@PCategoryID bigint,
@PSubCatID bigint,
@PGender bigint,
@PDescription nvarchar(MAX),
@PProductDetails nvarchar(MAX),
@PMaterialCare nvarchar(MAX),
@FreeDelivery int,
@30DayRet int,
@COD int
)
AS
insert into tblProducts values(@PName,@PPrice,@PSelPrice,@PBrandID,@PCategoryID,@PSubCatID,@PGender,
@PDescription,@PProductDetails,@PMaterialCare,@FreeDelivery,@30DayRet,@COD)
select SCOPE_IDENTITY()
RETURN 0

LEAVE A REPLY

Please enter your comment!
Please enter your name here