示例#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
 /**
  * Show the application dashboard to the user.
  *
  */
 public function index()
 {
     $timestamp = time() + date("Z");
     $timezone = 1;
     //		dd(date('d/m/Y H:i:s',$timestamp+3600*($timezone+date("I"))));
     $order = J2storeOrder::all();
     $total = floatval(J2storeOrder::isValid()->sum('order_total'));
     $orderInfo = J2storeOrderInfo::all();
     return view('home', compact('orderInfo', 'order', 'total', 'timezone'));
 }
示例#3
0
 /**
  * Show the application dashboard to the user.
  *
  */
 public function index()
 {
     $timezone = 1;
     $order = J2storeOrder::all();
     $total = floatval(J2storeOrder::isValid()->sum('order_total'));
     $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();
     return view('home', compact('orderInfo', 'order', 'total', 'timezone'));
 }
示例#4
0
 /**
  * @return \Illuminate\View\View
  */
 public function waitCom()
 {
     $order = J2storeOrder::all()->where('order_state_id', 1);
     $orderInfo = J2storeOrderInfo::all();
     return view('pages.commandes.index', compact('orderInfo', 'order'));
 }