08 2024
This commit is contained in:
parent
04d677d37a
commit
bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions
|
|
@ -33,7 +33,10 @@ class CardController extends Controller
|
|||
if($product->images->count()){
|
||||
$image = $product->images->first()->slug;
|
||||
}
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), false, false, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping]);
|
||||
$cartItem = Yard::instance('shopping')
|
||||
->add($product->id, $product->getLang('name'), $quantity,
|
||||
$product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), false, false,
|
||||
['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping]);
|
||||
if(Yard::instance('shopping')->getUserTaxFree()){
|
||||
Yard::setTax($cartItem->rowId, 0);
|
||||
}else{
|
||||
|
|
@ -59,7 +62,10 @@ class CardController extends Controller
|
|||
$image = $product->images->first()->slug;
|
||||
}
|
||||
$quantity = Request::get('quantity') ? Request::get('quantity') : 1;
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), false, false, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping]);
|
||||
$cartItem = Yard::instance('shopping')
|
||||
->add($product->id, $product->getLang('name'), $quantity,
|
||||
$product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), false, false,
|
||||
['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping]);
|
||||
if(Yard::instance('shopping')->getUserTaxFree()){
|
||||
Yard::setTax($cartItem->rowId, 0);
|
||||
}else{
|
||||
|
|
@ -117,17 +123,18 @@ class CardController extends Controller
|
|||
$data['is_from'] = 'shopping';
|
||||
$data['user_price_infos'] = Yard::instance('shopping')->getUserPriceInfos();
|
||||
|
||||
|
||||
ShoppingInstance::create([
|
||||
'identifier' => $identifier,
|
||||
'user_shop_id' => $user_shop->id,
|
||||
'payment' => 1,
|
||||
'payment' => 1, //Customer Shop Payment
|
||||
'subdomain' => url('/'),
|
||||
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||
'language' => \App::getLocale(),
|
||||
'shopping_data' => $data,
|
||||
'back' => url()->previous(),
|
||||
|
||||
]);
|
||||
|
||||
Yard::instance('shopping')->store($identifier);
|
||||
//add to DB
|
||||
$path = route('checkout.checkout_card', ['identifier'=>$identifier]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue