购物车的实现原理
1、 实现原理
购物车
01文件夹--------web跟文档目录(D:/wamp/www/01)
db_shopping_car---mysql的date目录下
2、 http://www.taobao.com
3、 功能
1) 商品展示---相关资料(基本描述、价格、名称、供应商情况、图片等)
2) 购物车功能
购物车相当于现实中超市购物车,但是网页实现的是一个虚拟行为,
用户可以在购物网站不同页面之间任意跳转,选购自己喜欢的商品----点击购买---订单信息---统一到付账台结账
购物车功能包括
1) 添加商品---订购
2) 删除商品
3) 修改商品购买数量(小计、总计)
4) 清空购物车
4、 订单:
填写详细信息的表单
学则支付方式-----支付宝借口
第一步:选择方法
关键:服务器能识别每一个用户并且能维持与他们的联系。
HTTP:无状态(staeless)
cookie session、session+mysql
cookie:
是由服务器产生、存储在客户端一段信息记录;
包含:域客户端浏览器上禁用cookie的是服务器断行为)、
路径、生存周期、变量名、变量值等,
容量:4kb
占用服务器端资源少、浏览器允许存放300个cookie;
cookie是浏览器内置的功能,浏览器关闭信息业不会丢失
基于cookie技术实现的购物车需要开启cookie功能;
存在侵权问题
session:
特点:不依赖于客户端设置(存放到服务器端)
session与cookie更安全、信息更多;
会占用服务器资源
注意:基于cookie:
使用url:
session+mysql
普遍
根据实际情况任选
session
create table admin(
id int unsigned not null primary key auto_increment,
admin_name varchar(30) not null,
admin_password varcahr(30) not null
admin_email varchar(30)not null,
)
买家
create customer(
id int unsigned not null primary key auto_increment,
c_name varchar(30) not null,
c_pass varchar(30)nor null,
c_photo varchar(100) not null,
c_question varchar(100)not null,
c_address varchar(300)not null,
c_email varchar(100)not null,
c_level char(1)not null,
c_num int not null,
)
客户反馈信息
create table idea(
id int unsigned not null primary key auto_increment,
c_name varchar(30)not null,
c_photo varcahr(100)not null,
new_message varcahr(100) not null,
re_message varchar(100)not null,
message varchar(100) not null,
new_time date not null,
re_time date not null,
)
产品表
create table producte(
id int unsigned not null primary key auto_increment,
p_name varchar(20)not null,
p_type varchar(20)not null,
p_price decimal(10,2) not null,//
p_quantity int not null,//商品数量
p_image varchar(100)not null,//商品图片
p_describe text not null, //商品的简单描述
p_time varchar(50)not null, //商品发布时间
p_zk float not null, //商品折扣
p_publisherip varchar(50)not null,//发布者
p_updatetime varchar(30)not null,//最后更新时间
p_userip varchar(300)not null //最后更新的用户
)
商品类别表
create table P_type(
id int unsigned not null primary key auto_increment,
type_name varchar(30) not null,
desc text not null,
);
订单表
create table orders(
order_id int unsigned not null primary key auto_increment,//订单学列号20111101
order_num varcahr(50)not //null,//订单号
order_email varchar(30) not null,//收货人信息
order_user varchar(30) not null,//收货人姓名
order_time varchar(50)not null,//订单时间
order_time varchar(50) not null,//订单时间
//客户提交订单-----商家确认----客户支付----商家发货---product表
order_status enum (‘0’,’1’,’2’) not null.,
//订单状态:未支付0、已支付未发货1、已支付已发货2
);
详细订单表
create table order_detail(
p_id int unsigned not null primary key auto_increment,
order_id int not null,
p_price decimal(10,2)not null,
p_des text not null,
p_num int not null,
p_zk float not null,
);
分享到:
相关推荐
[博客:购物车原理以及实现]文章配套源代码,环境:idea 欢迎下载. 如果您的积分不够,欢迎您关注我的公众号,输入:购物车源码,也提供下载!
Java初学者采用servlet控用户请求jsp实现简单购物车功能原理!
讲解在android上实现购物车的原理,需要源代码的,单独联系我索取。
仿淘宝购物车 原理及方法处理
web开发中购物出功能实现原理,实现购物车的关键在于服务器识别每一个用户并维持与他们的联系。但是HTTP协议是一种“无状态(Stateless)”的协议,因而服务器不能记住是谁在购买商品,当把商品加入购物车时,服务器也...
jquery购物车 实现原理分析
代码通俗容易懂,只要看懂这份你所有的购物车,可以轻松搞定真的!
购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车
SESSION购物车SESSION购物车SESSION购物车SESSION购物车SESSION购物车SESSION购物车SESSION购物车
asp.net购物车 .net购物车 C#购物车 net通用购物车 asp通用购物车 asp.net购物车 .net购物车 C#购物车 net通用购物车 asp通用购物车 asp.net购物车 .net购物车 C#购物车 net通用购物车 asp通用购物车
购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车购物车
cookie购物车cookie购物车cookie购物车cookie购物车cookie购物车cookie购物车cookie购物车cookie购物车cookie购物车cookie购物车cookie购物车cookie购物车
购物车的分类及实现原理 、购物车的分类及实现原理
一个不错的购物车系统,可以让初学者了解一些购物车原理,比较实用,里面有数据库和源代码,可以直接运行
购物车代码购物车代码购物车代码购物车代码购物车代码购物车代码购物车代码购物车代码购物车代码
当当购物车页面123123123651328156545156412354561654156
c# 实现购物车功能 实例代码(非常入门)
简易购物车 简易购物车 简易购物车 简易购物车 简易购物车
包含jsp购物车课程设计的详细代码和截图复制粘贴后即可运行
SSH框架+SQL Server2005制作的简易购物车实现