一、用户申请开店流程
个人、企业申请入驻:实名认证->Paycenter认证通过->申请入驻->平台审核通过
自营店铺:平台后台添加自营店铺
1.申请商家入驻
**实名认证:**
控制器:paycenter/controllers/InfoCtl.php -> certification();
视图:paycenter/views/default/InfoCtl/certification.php
~~~
//认证表单提交
$('#form').validator({
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
rules: {
//验证
......
},
fields : {
'user_realname':'required;',
'user_identity_card':'required;identity_type',
'user_identity_start_time':'required;',
'user_identity_end_time':'times;',
},
valid:function(form){
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data:$("#form").serialize(),
success:function(a){
if(a.status == 200)
{
Public.tips.success("<?=_('操作成功')?>");
var from = $('#page_from').val();
if(from == 'bt'){
location.href= "<?= Yf_Registry::get('url');?>?ctl=Info&met=btinfo";
}else{
location.href= "<?= Yf_Registry::get('url');?>?ctl=Info&met=account";
}
}
else
{
if(typeof(a.msg) != 'undefined'){
Public.tips.error(a.msg);
}else{
Public.tips.error("<?=_('操作失败')?>");
}
return false;
}
}
});
}
});
~~~
方法:editCertification()
~~~
$User_InfoModel = new User_InfoModel();
$flag = $User_InfoModel->editInfo($user_id,$edit);
~~~
**实名认证以后,需要在平台Paycenter后台认证审核:**
控制器:paycenter_admin/admin/controllers/paycen/PayInfoCtl.php
视图:paycenter_admin/admin/views/default/paycen/PayInfoCtl/index.php
(1)个人申请商家入驻(URL参数:apply=1)
控制器:shop/controllers/Seller/Shop/SettledCtl.php -> index();
模型:shop/models/Shop/BaseModel.php、shop/models/Shop/CompanyModel.php
* 签订入驻协议:shop/views/default/Seller/Shop/SettledCtl/step1.php(视图)
* 个人实名信息:shop/views/default/Seller/Shop/SettledCtl/step2.php(视图)
~~~
$('#form_company_info').validator({
//验证、ajax
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
rules: {
tel:[/^[1][0-9]{10}$/,'<?=__('请输入正确的手机号码')?>'],
zjtel:[/(^0\d{2,3}[-]?\d{5,9}$)|(^[1][0-9]{10}$)/,'<?=__('请输入正确的电话号码')?>'],
daima:[/^[a-zA-Z0-9]{8}-[a-zA-Z0-9]$/,'<?=__('请输入正确的组织机构代码')?>'],
times:function(element, params){
var start_time = $('#start_time').val();
var end_time = $('#end_time').val();
if(start_time>end_time && end_time){
return '<?=__('不能小于起始时间')?>';
}
}
},
fields: {
//验证规则
},
valid:function(form){
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data:$("#form_company_info").serialize(),
success:function(a){
if(a.status == 200)
{
location.href="./index.php?ctl=Seller_Shop_Settled&met=index&op=step3";
}
else
{
if(typeof(a.msg) == 'undefined' || !a.msg){
Public.tips.error("<?=__('操作失败')?>");
}else{
Public.tips.error(a.msg);
}
return false;
}
}
});
}
});
})
$('#btn_apply_company_next').click(function() {
$("#form_company_info").submit();
});
~~~
方法:addShopCompany()
~~~
if (!$shop_info){
$flag = $this->shopCompanyModel->addCompany($shop_company, TRUE);
$shop_base['shop_id'] = $flag;
$flag1 = $this->shopBaseModel->addBase($shop_base);
if ($flag1 && $flag && $this->messageModel->sql->commitDb())
{
$status = 200;
$msg = __('success');
}
else
{
$this->messageModel->sql->rollBackDb();
$status = 250;
$msg = __('failure1');
}
}else{
//编辑
$flag = $this->shopCompanyModel->editCompany($shop_info['shop_id'], $shop_company);
$flag1 = $this->shopBaseModel->editBase($shop_info['shop_id'], $shop_base);
$rs_rows = array();
check_rs($flag, $rs_rows);
check_rs($flag1, $rs_rows);
if (is_ok($rs_rows) && $this->messageModel->sql->commitDb()){
$status = 200;
$msg = __('success');
}else{
$this->messageModel->sql->rollBackDb();
$status = 250;
$msg = __('failure2');
}
}
~~~
* 财务资质信息:shop/views/default/Seller/Shop/SettledCtl/step3.php(视图)
~~~
$('#form_company_info').validator({
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
rules: {
yh:[/^(\d{16}|\d{19})$/,"<?=__('请填写正确的银行账号')?>"],
},
fields: {
//验证规则
},
valid:function(form){
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data:$("#form_company_info").serialize(),
success:function(a){
if(a.status == 200)
{
location.href="./index.php?ctl=Seller_Shop_Settled&met=index&op=step4&apply=<?=$apply?>";
}
else
{
alert("<?=__('操作失败!')?>");
}
}
});
}
});
$('#btn_apply_company_next').click(function() {
$("#form_company_info").submit();
});
~~~
方法:editShopCompany()
~~~
$flag = $this->shopCompanyModel->editCompany($shop_id, $shop_company);
$flag1 = $this->shopBaseModel->editBase($shop_id, array('shop_status'=>9));
~~~
* 店铺经营信息:shop/views/default/Seller/Shop/SettledCtl/step4.php(视图)
~~~
$('#form_company_info').validator({
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
rules: {
},
fields: {
'shop_name': 'required;',
'shop_grade_id':'required;',
'joinin_year':'required;',
'shop_class_id':'required;',
'shop_class_bind_id':'required;',
},
valid:function(form){
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data:$("#form_company_info").serialize(),
success:function(a){
if(a.status == 200)
{
location.href="./index.php?ctl=Seller_Shop_Settled&met=index&op=step5&apply=<?=$apply?>";
}
else
{
alert("<?=__('操作失败!')?>");
}
}
});
}
});
$('#btn_apply_company_next').click(function() {
$("#form_company_info").submit();
});
~~~
方法:editShopBase()
~~~
$shopClassBind = $this->shopClassBindModel->listByWhere(array('shop_id'=>$shop_id));
if($shopClassBind['items']){
$calss_id = array();
foreach ($shopClassBind['items'] as $val){
$calss_id[] = $val['shop_class_bind_id'];
}
$this->shopClassBindModel->removeClassBind($calss_id);
}
foreach ($product_class_id as $key => $value)
{
$shop_class['product_class_id'] = $value;
$shop_class['commission_rate'] = $commission_rate[$key];
$shop_class['shop_class_bind_enable'] = 2;
$shop_class['shop_id'] = $shop_id;
$flag1 = $this->shopClassBindModel->addClassBind($shop_class);
}
~~~
(2)企业申请商家入驻(URL参数:apply=2)
控制器:shop/controllers/Seller/Shop/SettledCtl.php -> index();
模型:shop/models/Shop/BaseModel.php、shop/models/Shop/CompanyModel.php
* 签订入驻协议:shop/views/default/Seller/Shop/SettledCtl/step1.php(视图)
* 公司资质信息:shop/views/default/Seller/Shop/SettledCtl/step2.php(视图)
~~~
$('#form_company_info').validator({
//验证、ajax
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
rules: {
tel:[/^[1][0-9]{10}$/,'<?=__('请输入正确的手机号码')?>'],
zjtel:[/(^0\d{2,3}[-]?\d{5,9}$)|(^[1][0-9]{10}$)/,'<?=__('请输入正确的电话号码')?>'],
daima:[/^[a-zA-Z0-9]{8}-[a-zA-Z0-9]$/,'<?=__('请输入正确的组织机构代码')?>'],
times:function(element, params){
var start_time = $('#start_time').val();
var end_time = $('#end_time').val();
if(start_time>end_time && end_time){
return '<?=__('不能小于起始时间')?>';
}
}
},
fields: {
//验证规则
},
valid:function(form){
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data:$("#form_company_info").serialize(),
success:function(a){
if(a.status == 200)
{
location.href="./index.php?ctl=Seller_Shop_Settled&met=index&op=step3";
}
else
{
if(typeof(a.msg) == 'undefined' || !a.msg){
Public.tips.error("<?=__('操作失败')?>");
}else{
Public.tips.error(a.msg);
}
return false;
}
}
});
}
});
})
$('#btn_apply_company_next').click(function() {
$("#form_company_info").submit();
});
~~~
方法:addShopCompany()
~~~
if (!$shop_info){
$flag = $this->shopCompanyModel->addCompany($shop_company, TRUE);
$shop_base['shop_id'] = $flag;
$flag1 = $this->shopBaseModel->addBase($shop_base);
if ($flag1 && $flag && $this->messageModel->sql->commitDb())
{
$status = 200;
$msg = __('success');
}
else
{
$this->messageModel->sql->rollBackDb();
$status = 250;
$msg = __('failure1');
}
}else{
//编辑
$flag = $this->shopCompanyModel->editCompany($shop_info['shop_id'], $shop_company);
$flag1 = $this->shopBaseModel->editBase($shop_info['shop_id'], $shop_base);
$rs_rows = array();
check_rs($flag, $rs_rows);
check_rs($flag1, $rs_rows);
if (is_ok($rs_rows) && $this->messageModel->sql->commitDb()){
$status = 200;
$msg = __('success');
}else{
$this->messageModel->sql->rollBackDb();
$status = 250;
$msg = __('failure2');
}
}
~~~
* 财务资质信息:shop/views/default/Seller/Shop/SettledCtl/step3.php(视图)
~~~
$('#form_company_info').validator({
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
rules: {
yh:[/^(\d{16}|\d{19})$/,"<?=__('请填写正确的银行账号')?>"],
},
fields: {
//验证规则
},
valid:function(form){
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data:$("#form_company_info").serialize(),
success:function(a){
if(a.status == 200)
{
location.href="./index.php?ctl=Seller_Shop_Settled&met=index&op=step4&apply=<?=$apply?>";
}
else
{
alert("<?=__('操作失败!')?>");
}
}
});
}
});
$('#btn_apply_company_next').click(function() {
$("#form_company_info").submit();
});
~~~
方法:editShopCompany()
~~~
$flag = $this->shopCompanyModel->editCompany($shop_id, $shop_company);
$flag1 = $this->shopBaseModel->editBase($shop_id, array('shop_status'=>9));
~~~
* 店铺经营信息:shop/views/default/Seller/Shop/SettledCtl/step4.php(视图)
~~~
$('#form_company_info').validator({
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
rules: {
},
fields: {
'shop_name': 'required;',
'shop_grade_id':'required;',
'joinin_year':'required;',
'shop_class_id':'required;',
'shop_class_bind_id':'required;',
},
valid:function(form){
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data:$("#form_company_info").serialize(),
success:function(a){
if(a.status == 200)
{
location.href="./index.php?ctl=Seller_Shop_Settled&met=index&op=step5&apply=<?=$apply?>";
}
else
{
alert("<?=__('操作失败!')?>");
}
}
});
}
});
$('#btn_apply_company_next').click(function() {
$("#form_company_info").submit();
});
~~~
方法:editShopBase()
~~~
$shopClassBind = $this->shopClassBindModel->listByWhere(array('shop_id'=>$shop_id));
if($shopClassBind['items']){
$calss_id = array();
foreach ($shopClassBind['items'] as $val){
$calss_id[] = $val['shop_class_bind_id'];
}
$this->shopClassBindModel->removeClassBind($calss_id);
}
foreach ($product_class_id as $key => $value)
{
$shop_class['product_class_id'] = $value;
$shop_class['commission_rate'] = $commission_rate[$key];
$shop_class['shop_class_bind_enable'] = 2;
$shop_class['shop_id'] = $shop_id;
$flag1 = $this->shopClassBindModel->addClassBind($shop_class);
}
~~~
**提交申请,平台审核**
平台审核控制器:shop/controllers/Api/Shop/ManageCtl.php
平台审核视图:shop_admin/views/default/Shop/ManageCtl/getShoplist.php
JS:shop_admin/static/default/js/controllers/shop/join/shop_join_list.js
**签订合同**
控制器:shop/controllers/Seller/Shop/SettledCtl.php
签订合同及缴费:shop/views/default/Seller/Shop/SettledCtl/step5.php(视图)
~~~
$('#form').validator({
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
rules: {
},
fields: {
'payment_voucher': 'required;',
'payment_voucher_explain':'required;',
},
valid:function(form){
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data:$("#form").serialize(),
success:function(a){
if(a.status == 200)
{
location.href="./index.php?ctl=Seller_Shop_Settled&met=index&op=step5&apply=<?=$apply?>";
}
else
{
alert("<?=__('操作失败')?>");
}
}
});
}
});
$('#btn_apply_company_next').click(function() {
$("#form").submit();
});
~~~
方法:shopPaystatus()
~~~
//添加卖家
$check_seller = $SellerBaseModel->getByWhere(array('shop_id'=>$shop_id));
if(!$check_seller){
$seller_base['shop_id'] = $shop_id;
$seller_base['user_id'] = Perm::$userId;
$seller_base['seller_name'] = Perm::$row['user_account'];
$seller_base['seller_is_admin'] = 1;
$seller_add = $SellerBaseModel->addBase($seller_base);
}else{
$seller_add = true;
}
~~~
**申请店铺返回上一步**
方法:_getRpStep()
~~~
switch ($shop_step_info['rp']){
case 'step0':
//1.没有入驻信息,2.支持所有的入驻
case 'step1':
//没有入驻信息,仅支持单方面入驻,如果支持所有入驻,就退到step0
if($shop_step_info['shop_status'] == '-1'){
if(Web_ConfigModel::value('join_type') == 3){
$op = 'step0';
}else{
$op = 'step1';
}
}else{
$status = false;
}
break;
case 'step2':
//1. 企业入驻 2. shop_status in 4,5,6,7,8,9
case 'pstep2':
//1. 个人入驻 2. shop_status in 4,5,6,7,8,9
if(in_array($shop_step_info['shop_status'],array(4,5,6,7,8,9))){
if($shop_step_info['shop_business'] == 1){
$op = 'step2';
}else{
$op = 'pstep2';
}
}else{
$status = false;
}
break;
case 'step3':
//1. 企业入驻 2. shop_status in 4,5,6,7,8,9
case 'pstep3':
//1. 个人入驻 2. shop_status in 4,5,6,7,8,9
if(in_array($shop_step_info['shop_status'],array(4,5,6,7,8,9))){
if($shop_step_info['shop_business'] == 1){
$op = 'step3';
}else{
$op = 'pstep3';
}
}else{
$status = false;
}
break;
case 'step4':
//1. shop_status in 4,5,6,7,8,9
if(in_array($shop_step_info['shop_status'],array(4,5,6,7,9))){
$op = 'step4';
}else{
$status = false;
}
break;
case 'step5':
//1. shop_status == 7
if($shop_step_info['shop_status'] == 7){
$op = 'step5';
}else{
$status = false;
}
break;
default :
$status = false;
break;
}
~~~
**平台审核店铺**
平台审核控制器:shop/controllers/Api/Shop/ManageCtl.php
平台审核视图:shop_admin/views/default/Shop/ManageCtl/pay.php
JS:shop_admin/static/default/js/controllers/shop/join/shop_Pay_list.js
2.平台自营店铺
平台添加店铺:
控制器:shop/controllers/Api/Shop/SelfsupportCtl.php
视图:shop_admin/views/default/Shop/SelfsupportCtl/getShopAddRow.php
3.店铺状态
模型:shop/models/shop/BaseModel.php
参数:shop_status
0:关闭
1:待审核资料
2:待审核付款
3:开店成功
4:审核未通过
~~~
public static $shop_status = array(
"0" => "关闭",
"1" => "待审核信息",
"2" => "待审核付款",
"3" => "开店成功",
"4" => "审核未通过"
);
~~~
- 序言
- 系统要求
- 版本更新日志
- 远丰商城技术对接说明
- 开发指导
- 系统架构
- 负载集群
- 云存储
- 框架内容
- 基础
- 开发规范
- 目录结构
- 架构
- 架构总览
- 数据库
- 数据库连接
- 基本使用
- 缓存
- 配置
- 路由
- 数据字典
- ucenter
- shop
- paycenter
- ucenter_admin
- shop_admin
- paycenter_admin
- shop1
- shop2
- shop3
- 通讯内容
- 商家中心
- 顶部导航栏
- 店铺信息栏
- 店铺及商品提示栏
- 交易提示栏
- 销售情况统计栏
- 集群架构图
- 单品销量排行栏
- 店铺运营推广栏
- 平台联系方式栏
- 订单物流
- 商品
- 商品列表
- 商品详情
- 商品发布与编辑
- 分销商品
- 关联版式
- 商品规格
- 图片空间
- 淘宝导入
- 订单流程
- 交易订单
- 订单退款/退货
- 促销
- 团购管理
- 加价购
- 限时折扣
- 满即送
- 代金券管理
- 分销
- 店铺
- 店铺设置
- 自销产品供应商
- 实体店铺
- 品牌申请
- 店铺信息
- 消费者保障服务
- 门店账号
- 分销商--产品供应商
- 分销明细
- 批发市场
- 商家微信公众号
- 售后服务
- 咨询管理
- 投诉管理
- 退款管理
- 退货管理
- 杂项
- 远程上传图片
- 接口(废弃,参考最外层接口项)
- 接口说明
- 品牌
- 商品规格
- 商品类型
- 商品分类
- 商品
- 订单
- 商品/店铺收藏
- 足迹
- 退款及退货
- 商家店铺
- 会员
- 入驻协议
- 订单接口
- 商品接口
- 订单物流接口
- 商家中心接口
- 促销接口
- 快递鸟物流接口
- 代金券接口
- 首页版块
- 团购
- 平台红包
- 限时折扣接口
- 拼团接口
- wap首页模板
- JS
- 银联支付
- 多语言
- 商品评分
- 图片加载
- 买家申请退款退货
- 商家退款退货
- 平台退款退货
- 添加发票
- 提交订单
- 确认订单
- 运费销售区域
- 获取会员地址
- 充值
- 导出XLS
- 商城系统集成
- 多语言实现
- 三级分销推广链接发展推广员
- app.ini.php
- 去分销
- 版本更新
- 物流支持
- 运营人员建议
- 业务逻辑
- 统计结算
- 客服消息
- 账号
- 三级分销
- IM
- 配置
- 平台帐号
- 活动数据表说明
- 接口
- 数据库中间键
- MyCat的优势
- 概念说明
- Mycat的下载及安装
- 参数配置案列
- Mycat读写分离
- 基本命令
- 常见错误