Commit 017a7775 by Francisco Salazar

enviar venta en shipping

parent e540e943
...@@ -164,6 +164,7 @@ public function shipping() ...@@ -164,6 +164,7 @@ public function shipping()
$client = new Client(); $client = new Client();
$addres = new Addres(); $addres = new Addres();
$sale = new Sale();
if(count(\Session::get('cart')) <= 0) {return redirect()->route('cart.show');} if(count(\Session::get('cart')) <= 0) {return redirect()->route('cart.show');}
if(\Session::has('client')) { if(\Session::has('client')) {
...@@ -171,6 +172,10 @@ public function shipping() ...@@ -171,6 +172,10 @@ public function shipping()
$addres = $client->shipping; $addres = $client->shipping;
} }
if(\Session::has('sale')){
$sale = Sale::find(\Session::get('sale')->id);
}
$cart = \Session::get('cart'); $cart = \Session::get('cart');
$total = $this->total(); $total = $this->total();
$shipping = Shipping::select( $shipping = Shipping::select(
...@@ -179,6 +184,7 @@ public function shipping() ...@@ -179,6 +184,7 @@ public function shipping()
return view('shop-public::cart.shipping') return view('shop-public::cart.shipping')
->with("sale", $sale)
->with('cart', $cart) ->with('cart', $cart)
->with('total', $total) ->with('total', $total)
->with('client', $client) ->with('client', $client)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment