Payone, Shop, wizard
This commit is contained in:
parent
446bc4561b
commit
044a6bf253
28 changed files with 996 additions and 814 deletions
|
|
@ -35,6 +35,8 @@ class CardController extends Controller
|
|||
$image = $product->images->first()->slug;
|
||||
}
|
||||
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product_slug, 'weight' => $product->weight]);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
|
||||
\Session()->flash('show-card-after-add', true);
|
||||
}
|
||||
|
||||
|
|
@ -54,6 +56,8 @@ class CardController extends Controller
|
|||
}
|
||||
$quantity = Input::get('quantity') ? Input::get('quantity') : 1;
|
||||
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
|
||||
\Session()->flash('show-card-after-add', true);
|
||||
}
|
||||
return back();
|
||||
|
|
@ -66,8 +70,7 @@ class CardController extends Controller
|
|||
if(Input::get('selected_country')){
|
||||
Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country'));
|
||||
}else{
|
||||
// $ShippingCountry = ShippingCountry::where('country_id', 1)->first();
|
||||
// $selected_country = $ShippingCountry->id;
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
}
|
||||
$data = [
|
||||
'user_shop' => Util::getUserShop(),
|
||||
|
|
@ -81,6 +84,7 @@ class CardController extends Controller
|
|||
if(isset($data['quantity'])){
|
||||
foreach ($data['quantity'] as $rowId => $qty){
|
||||
Yard::instance('shopping')->update($rowId, $qty);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
}
|
||||
}else{
|
||||
$this->deleteCard();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue