shipping costs

This commit is contained in:
Kevin Adametz 2019-01-07 00:15:41 +01:00
parent d4f6a774d0
commit 22a2b4710a
20 changed files with 797 additions and 457 deletions

View file

@ -5,6 +5,7 @@ namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use App\Models\Product;
use App\Models\ShippingCountry;
use Util;
use Yard;
use Input;
@ -57,6 +58,15 @@ class CardController extends Controller
}
public function showCard(){
if(Input::get('selected_country')){
$selected_country = Input::get('selected_country');
}else{
$ShippingCountry = ShippingCountry::where('country_id', 1)->first();
$selected_country = $ShippingCountry->id;
}
Yard::instance('shopping')->setShippingCountry($selected_country);
$data = [
'user_shop' => Util::getUserShop(),
];
@ -76,7 +86,14 @@ class CardController extends Controller
return back();
}
public function checkoutCard(){
public function checkoutCard(){#
if(Input::get('selected_country')){
$selected_country = Input::get('selected_country');
}else{
$ShippingCountry = ShippingCountry::where('country_id', 1)->first();
$selected_country = $ShippingCountry->id;
}
Yard::instance('shopping')->setShippingCountry($selected_country);
$data = [
'user_shop' => Util::getUserShop(),
];