Здравейте,
Пак с тоз Laravel ще ви занимавам...
В базата данни при поръчка се запазва order_id, user_id и поле data, което съдържа това:
Как мога да взема само цената - price и да я сетна тук
Ето тук:
$amount = $order['price'];
С другите няма проблем тъй като те са си в отделни колони...
Пак с тоз Laravel ще ви занимавам...
В базата данни при поръчка се запазва order_id, user_id и поле data, което съдържа това:
Код:
{"12":
{
"title":"Test Product 2",
"description":"The perfect way to explain a visual platform is to make a product page that demonstrates the abilities of that visual platform. The entire page lets users see all of Wistia's features and how they'd fit into their day-to-day.",
"quantity":1,
"image":
"\/uploads\/AYUM0ro6TKux6KBnCa10.jpg",
"price":"1120.00"
},
"shipping":
{
"quantity":1,
"image":"\/img\/noimage.png",
"description":"",
"title":
"Normal Delivery",
"price":0
}
}
Как мога да взема само цената - price и да я сетна тук
Код:
public function paymentView( $orderId, $userId ) {
$order = Session::all();
$order = Order::where('order_id', $orderId)->first();
if (!$order) {
App::abort(404);
}
$userID = $order['user_id'];
$userFormat = "SESSION";
$orderID = $order['order_id'];
$amount = $order['price'];
Ето тук:
$amount = $order['price'];
С другите няма проблем тъй като те са си в отделни колони...