|
|
@@ -547,10 +547,14 @@ class StoreOrder extends BaseModel
|
|
|
$total_num = 0;
|
|
|
$total_price = 0;
|
|
|
$deduction_price = 0;
|
|
|
- @file_put_contents('quanju.txt', "-测试1\r\n", 8);
|
|
|
+ @file_put_contents('quanju.txt', json_encode($v)."-测试1\r\n", 8);
|
|
|
|
|
|
$cartInfo = StoreCart::where('id', 'in', $v)->select();
|
|
|
+ @file_put_contents('quanju.txt', json_encode($cartInfo)."-测试5\r\n", 8);
|
|
|
+
|
|
|
foreach ($cartInfo as $cart) {
|
|
|
+ @file_put_contents('quanju.txt', json_encode($cart['product_id'])."-测试3\r\n", 8);
|
|
|
+
|
|
|
$price = StoreProduct::where('id', $cart['product_id'])->value('price');
|
|
|
$product_price = bcmul($price, $cart['cart_num'], 2);
|
|
|
$total_price = bcadd($total_price, $product_price, 2); //商品总价
|