Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
yii2_fecshop
提交
1bcb5207
Y
yii2_fecshop
项目概览
OpenDocCN
/
yii2_fecshop
通知
17
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yii2_fecshop
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1bcb5207
编写于
1月 13, 2017
作者:
R
root
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细致化更新国家信息
上级
f13c2a34
变更
4
展开全部
显示空白变更内容
内联
并排
Showing
4 changed file
with
582 addition
and
255 deletion
+582
-255
app/appfront/modules/Checkout/block/cart/Index.php
app/appfront/modules/Checkout/block/cart/Index.php
+11
-1
app/appfront/modules/Checkout/block/onepage/Index.php
app/appfront/modules/Checkout/block/onepage/Index.php
+20
-8
app/appfront/modules/Checkout/block/onepage/Placeorder.php
app/appfront/modules/Checkout/block/onepage/Placeorder.php
+11
-0
services/helper/Country.php
services/helper/Country.php
+540
-246
未找到文件。
app/appfront/modules/Checkout/block/cart/Index.php
浏览文件 @
1bcb5207
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
namespace
fecshop\app\appfront\modules\checkout\block\cart
;
use
Yii
;
use
fec\helpers\CModule
;
use
fec\helpers\CRequest
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
class
Index
{
...
...
app/appfront/modules/Checkout/block/onepage/Index.php
浏览文件 @
1bcb5207
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
namespace
fecshop\app\appfront\modules\checkout\block\onepage
;
use
Yii
;
use
fec\helpers\CModule
;
use
fec\helpers\CRequest
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
class
Index
{
protected
$_payment_mothod
;
protected
$_address_view_file
;
...
...
@@ -21,8 +32,6 @@ class Index {
$currency_info
=
Yii
::
$service
->
page
->
currency
->
getCurrencyInfo
();
$this
->
initAddress
();
$this
->
initCountry
();
//$this->initCustomerInfo();
$this
->
initState
();
return
[
'payments'
=>
$this
->
getPayment
(),
...
...
@@ -99,8 +108,8 @@ class Index {
}
$this
->
_address
=
$address_info
;
$this
->
_address_list
=
Yii
::
$service
->
customer
->
address
->
currentAddressList
();
//var_dump($this->_address_list);
#
如果购物车存在customer_address_id,而且用户地址中中也存在customer_address_id
# 如果购物车存在customer_address_id,而且用户地址中也存在customer_address_id
#
则执行if{}内代码。
if
(
$address_id
&&
isset
(
$this
->
_address_list
[
$address_id
])
&&
!
empty
(
$this
->
_address_list
[
$address_id
])){
$this
->
_address_id
=
$address_id
;
$this
->
_address_view_file
=
'checkout/onepage/index/address_select.php'
;
...
...
@@ -115,7 +124,7 @@ class Index {
}
}
else
if
(
is_array
(
$this
->
_address_list
)
&&
!
empty
(
$this
->
_address_list
)){
# 用户存在地址列表,但是,cart中没有customer_address_id
# 这种情况下,从
列表中取出来一个
地址,然后设置成当前的地址。
# 这种情况下,从
用户地址列表中取出来默认
地址,然后设置成当前的地址。
foreach
(
$this
->
_address_list
as
$adss_id
=>
$info
){
if
(
$info
[
'is_default'
]
==
1
){
$this
->
_address_id
=
$adss_id
;
...
...
@@ -138,15 +147,18 @@ class Index {
if
(
!
$this
->
_country
){
$this
->
_country
=
Yii
::
$service
->
helper
->
country
->
getDefaultCountry
();
}
}
/**
* 初始化国家下拉条。
*/
public
function
initCountry
(){
$this
->
_countrySelect
=
Yii
::
$service
->
helper
->
country
->
getAllCountryOptions
(
''
,
''
,
$this
->
_country
);
}
/**
* 初始化省市
*/
public
function
initState
(
$country
=
''
){
$state
=
isset
(
$this
->
_address
[
'state'
])
?
$this
->
_address
[
'state'
]
:
''
;
if
(
!
$country
){
...
...
app/appfront/modules/Checkout/block/onepage/Placeorder.php
浏览文件 @
1bcb5207
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
namespace
fecshop\app\appfront\modules\checkout\block\onepage
;
use
Yii
;
use
fec\helpers\CModule
;
use
fec\helpers\CRequest
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
class
Placeorder
{
public
$_check_error
;
...
...
services/helper/Country.php
浏览文件 @
1bcb5207
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录