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
e00410747c3a67afc224341ecc2a3d05a64ba2dc
1 parent
f428d0c8
修复商品结算页商品价格错误的bug(更改价格计算方式)
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
View file @
e004107
...
...
@@ -74,7 +74,7 @@
{
{>
me/order/good
}
}
{
{/each
}
}
</section>
<div
class=
"goods-num"
>共
{
{num
}
}件商品
合计<span>
{
{goodsPrice
}
}</span></div>
<div
class=
"goods-num"
>共
{
{num
}
}件商品
合计<span>
¥
{
{goodsPrice
}
}</span></div>
<section
class=
"block"
>
<ul
class=
"sale-invoice"
>
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
e004107
...
...
@@ -453,6 +453,8 @@ class CartModel
// 订单商品
if
(
isset
(
$payReturn
[
'goods_list'
]))
{
$oneGoods
=
array
();
$goodsPrice
=
0
;
foreach
(
$payReturn
[
'goods_list'
]
as
$single
)
{
$oneGoods
=
array
();
$oneGoods
[
'id'
]
=
$single
[
'product_sku'
];
// TODO 未确定用哪个
...
...
@@ -460,8 +462,8 @@ class CartModel
$oneGoods
[
'name'
]
=
$single
[
'product_name'
];
$oneGoods
[
'color'
]
=
$single
[
'color_name'
];
$oneGoods
[
'size'
]
=
$single
[
'size_name'
];
$oneGoods
[
'price'
]
=
Helpers
::
transPrice
(
$single
[
'last_price'
]);
$oneGoods
[
'count'
]
=
$single
[
'buy_number'
];
$oneGoods
[
'price'
]
=
Helpers
::
transPrice
(
$single
[
'last_price'
]);
//gift=>是否赠品,advanceBuy=>是否加价购;
if
(
$single
[
'goods_type'
]
==
'gift'
&&
!
isset
(
$single
[
'isAdvanceBuy'
]))
{
...
...
@@ -472,8 +474,14 @@ class CartModel
$oneGoods
[
'price'
]
=
Helpers
::
transPrice
(
$single
[
'sale_price'
]);
}
// 累加商品金额
$goodsPrice
+=
$single
[
'subtotal'
];
$result
[
'goods'
][]
=
$oneGoods
;
}
// 商品金额
$result
[
'goodsPrice'
]
=
Helpers
::
transPrice
(
$goodsPrice
);
}
// 支付方式
...
...
@@ -514,7 +522,7 @@ class CartModel
// 订单商品数
$result
[
'num'
]
=
$payReturn
[
'shopping_cart_data'
][
'selected_goods_count'
];
// 商品金额
$result
[
'goodsPrice'
]
=
$payReturn
[
'shopping_cart_data'
][
'str_order_amount'
];
//
$result['goodsPrice'] = $payReturn['shopping_cart_data']['str_order_amount'];
}
// 发票有关数据
...
...
Please
register
or
login
to post a comment