shop add discount
This commit is contained in:
parent
71cdfdf48a
commit
43ef81c3b1
@ -137,13 +137,18 @@ class ShopController extends BaseAuthedController {
|
||||
|
||||
$price_array = splitStr1($row['price']);
|
||||
$discount_array = splitStr1($row['discount']);
|
||||
$discount_begin = $row['discount_begin'];
|
||||
$discount_end = $row['discount_end'];
|
||||
$nowTime = $this->_getNowTime();
|
||||
|
||||
$need_price = $price_array[$token_pos];
|
||||
$discount = $discount_array[$token_pos];
|
||||
|
||||
$discount_begin = $row['discount_begin'];
|
||||
$discount_end = $row['discount_end'];
|
||||
$nowTime = $this->_getNowTime();
|
||||
|
||||
if ($nowTime>=$discount_begin && $nowTime<$discount_end) {
|
||||
$need_price = ceil($need_price * ($discount / 100.0));
|
||||
}
|
||||
|
||||
$costItemId = $this->getCostItemIdByTokenType($token_type);
|
||||
|
||||
switch($token_type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user