Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
6156ed1e3b329688a5d75c9304dc95449eb51f29
1 parent
842627f3
修改结算页面发票以及支付方式的一些逻辑
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
20 deletions
library/Plugin/Helpers.php
static/js/cart/order-ensure.js
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
library/Plugin/Helpers.php
View file @
6156ed1
...
...
@@ -634,6 +634,13 @@ class Helpers
$oneGoods
[
'marketPrice'
]
=
self
::
transPrice
(
$single
[
'market_price'
]);
$oneGoods
[
'count'
]
=
$single
[
'storage_number'
];
//gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
if
(
$single
[
'goods_type'
]
==
'gift'
&&
!
isset
(
$single
[
'isAdvanceBuy'
]))
{
$oneGoods
[
'isGift'
]
=
true
;
}
elseif
(
$single
[
'goods_type'
]
==
'price_gift'
)
{
$oneGoods
[
'isAdvanceBuy'
]
=
true
;
}
$gift
[
'goods'
][]
=
$oneGoods
;
}
...
...
static/js/cart/order-ensure.js
View file @
6156ed1
...
...
@@ -140,8 +140,8 @@ function submitOrder() {
cartType
:
queryString
.
cartType
||
queryString
.
carttype
||
'ordinary'
,
deliveryId
:
orderInfo
(
'deliveryId'
),
deliveryTimeId
:
orderInfo
(
'deliveryTimeId'
),
invoiceText
:
invoiceText
,
invoiceType
:
$invoice
.
find
(
'.invoice-type'
).
val
()
||
orderInfo
(
'invoiceType'
),
invoiceText
:
orderInfo
(
'invoice'
)
?
invoiceText
:
null
,
invoiceType
:
orderInfo
(
'invoice'
)
?
(
$invoice
.
find
(
'.invoice-type'
).
val
()
||
orderInfo
(
'invoiceType'
))
:
null
,
msg
:
msg
,
paymentTypeId
:
orderInfo
(
'paymentTypeId'
),
paymentType
:
orderInfo
(
'paymentType'
),
//支付方式
...
...
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
View file @
6156ed1
...
...
@@ -112,6 +112,7 @@
<ul
class=
"pay-mode"
>
{
{#
paymentWay
}
}
{
{#if
isSupport
}
}
<li
class=
"{{#if recommend}}default{{/if}}"
data-pay-type=
"{{paymentType}}"
data-pay-id=
"{{id}}"
>
<span
class=
"iconfont"
>
{
{#if
recommend
}
}
...
...
@@ -122,6 +123,7 @@
</span>
{
{name
}
}
</li>
{
{/if
}
}
{
{/
paymentWay
}
}
</ul>
{
{/
orderEnsure
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
6156ed1
...
...
@@ -436,6 +436,7 @@ class CartModel
$onePay
[
'id'
]
=
$pay
[
'payment_id'
];
$onePay
[
'paymentType'
]
=
$pay
[
'payment_type'
];
$onePay
[
'name'
]
=
$pay
[
'payment_type_name'
];
$onePay
[
'isSupport'
]
=
$pay
[
'is_support'
]
===
'Y'
;
// $onePay['default'] = ($pay['default'] === 'Y');
if
(
$onePay
[
'paymentType'
]
==
1
)
{
$onePay
[
'recommend'
]
=
true
;
...
...
@@ -453,24 +454,6 @@ class CartModel
$result
[
'cartPayData'
]
=
isset
(
$orderCompute
[
'promotion_formula_list'
])
?
$orderCompute
[
'promotion_formula_list'
]
:
$payReturn
[
'shopping_cart_data'
][
'promotion_formula_list'
];
$price
=
isset
(
$orderCompute
[
'last_order_amount'
])
?
$orderCompute
[
'last_order_amount'
]
:
$payReturn
[
'shopping_cart_data'
][
'last_order_amount'
];
$result
[
'price'
]
=
Helpers
::
transPrice
(
$price
);
/*$sumPrice = isset($orderCompute['order_amount']) ? $orderCompute['order_amount'] : $payReturn['shopping_cart_data']['order_amount'];
$freight = '¥0';
if (isset($orderCompute['promotion_formula_list'][1]['promotion_amount'])) {
$freight = $orderCompute['promotion_formula_list'][1]['promotion_amount'];
} elseif(isset($payReturn['shopping_cart_data']['promotion_formula_list'][1]['promotion_amount'])) {
$freight = $payReturn['shopping_cart_data']['promotion_formula_list'][1]['promotion_amount'];
}
$couponPrice = isset($orderCompute['coupon_amount']) ? $orderCompute['coupon_amount'] : false;
$salePrice = isset($orderCompute['discount_amount']) ? $orderCompute['discount_amount'] : $payReturn['shopping_cart_data']['discount_amount'];
$price = isset($orderCompute['last_order_amount']) ? $orderCompute['last_order_amount'] : $payReturn['shopping_cart_data']['last_order_amount'];
$result['sumPrice'] = Helpers::transPrice($sumPrice);
$result['salePrice'] = Helpers::transPrice($salePrice);
$result['price'] = Helpers::transPrice($price);
$result['freight'] = $freight;
$result['couponPrice'] = $couponPrice;*/
}
// 发票有关数据
...
...
Please
register
or
login
to post a comment