shop discount
This commit is contained in:
parent
43ef81c3b1
commit
7e447c7f5f
@ -141,11 +141,12 @@ class ShopController extends BaseAuthedController {
|
||||
$need_price = $price_array[$token_pos];
|
||||
$discount = $discount_array[$token_pos];
|
||||
|
||||
$discount_begin = $row['discount_begin'];
|
||||
$discount_end = $row['discount_end'];
|
||||
$discount_begin = strtotime($row['discount_begin'].' UTC');
|
||||
$discount_end = strtotime($row['discount_end'].' UTC');
|
||||
$nowTime = $this->_getNowTime();
|
||||
|
||||
|
||||
if ($nowTime>=$discount_begin && $nowTime<$discount_end) {
|
||||
|
||||
$need_price = ceil($need_price * ($discount / 100.0));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user