Toggle navigation
Toggle navigation
This project
Loading...
Sign in
chenchao
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
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
9160aabb64de948013dc9c0d76c4dcc37086182b
1 parent
c20c9e57
修复商品总价错误的bug
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
9160aab
...
...
@@ -769,12 +769,27 @@ class CartModel
$result
[
'advanceBuy'
]
=
Helpers
::
formatAdvanceGoods
(
$data
[
'price_gift'
],
$result
[
'advanceBuyCount'
]);
}
// 已参加的活动
if
(
!
empty
(
$data
[
'promotion_info'
]))
{
$result
[
'promotionInfo'
]
=
array
();
$info
=
array
();
foreach
(
$data
[
'promotion_info'
]
as
$val
)
{
$info
=
array
();
$info
[
'id'
]
=
$val
[
'promotion_id'
];
$info
[
'name'
]
=
$val
[
'promotion_title'
];
$result
[
'promotionInfo'
][]
=
$info
;
}
$result
[
'promotionFormula'
]
=
$data
[
'shopping_cart_data'
][
'promotion_formula'
];
}
// 结算数据
$result
[
'price'
]
=
Helpers
::
transPrice
(
$data
[
'shopping_cart_data'
][
'order_amount'
]);
$result
[
'activityPrice'
]
=
Helpers
::
transPrice
(
$data
[
'shopping_cart_data'
][
'discount_amount'
]);
$result
[
'count'
]
=
$data
[
'shopping_cart_data'
][
'selected_goods_count'
];
$result
[
'isAllSelected'
]
=
(
$data
[
'shopping_cart_data'
][
'goods_count'
]
===
$data
[
'shopping_cart_data'
][
'selected_goods_count'
])
&&
(
$data
[
'shopping_cart_data'
][
'selected_goods_count'
]
>
0
);
$result
[
'sumPrice'
]
=
Helpers
::
transPrice
(
$data
[
'shopping_cart_data'
][
'order_amount'
]);
$result
[
'sumPrice'
]
=
Helpers
::
transPrice
(
$data
[
'shopping_cart_data'
][
'
last_
order_amount'
]);
}
while
(
0
);
return
$result
;
...
...
Please
register
or
login
to post a comment