Пример #1
0
 /**
  * @param $order_id
  * @return \Illuminate\View\View
  */
 public function commande($order_id)
 {
     $order = J2storeOrder::find($order_id);
     $orderInfo = J2storeOrderInfo::find($order_id);
     $orderItems = J2storeOrderItem::where('order_id', $order_id)->get();
     $attrib = J2storeOrderItem::where('order_id', $order_id)->having('orderitem_attribute_names', '!=', '{}')->select('orderitem_id', 'orderitem_attribute_names')->get();
     //        dd($attrib->toArray());
     $timezone = 1;
     return view('pages.commandes.details', compact('order', 'orderInfo', 'orderItems', 'reduc', 'attrib', 'timezone'));
 }
Пример #2
0
 /**
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $timezone = 1;
     $order = J2storeOrder::all();
     $orderInfo = J2storeOrderInfo::join('u16w2_j2store_orders', function ($q) {
         $q->on('u16w2_j2store_orderinfo.order_id', '=', 'u16w2_j2store_orders.order_id');
     })->orderBy('created_date', 'desc')->get();
     $orderItem = J2storeOrderItem::all();
     $wait = $order->where('order_state_id', '1')->count();
     $confirm = $order->where('order_state_id', '2')->count();
     $stop = $order->where('order_state_id', '3')->count();
     $road = $order->where('order_state_id', '4')->count();
     return view('pages.commandes.histo', compact('orderInfo', 'order', 'orderItem', 'wait', 'confirm', 'stop', 'road', 'timezone'));
 }