API User Like
This commit is contained in:
parent
80e6540f73
commit
cc5c147c27
9 changed files with 46 additions and 26 deletions
|
|
@ -59,7 +59,6 @@ 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->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
|
||||
if(Yard::instance('shopping')->getUserTaxFree()){
|
||||
Yard::setTax($cartItem->rowId, 0);
|
||||
|
|
|
|||
|
|
@ -50,8 +50,7 @@ class CheckoutController extends Controller
|
|||
$is_for = isset($shopping_data['is_for']) ? $shopping_data['is_for'] : false;
|
||||
$homeparty_id = isset($shopping_data['homeparty_id']) ? $shopping_data['homeparty_id'] : null;
|
||||
$shopping_user = null;
|
||||
|
||||
|
||||
|
||||
/*if(!$this->getPayments('shopping_user_id') && Util::getAuthUser()){//$is_from !== 'shopping' && ){ //
|
||||
|
||||
$shopping_user = $this->shoppingUserAuthData($is_from, $is_for, $shopping_data);
|
||||
|
|
@ -84,6 +83,7 @@ class CheckoutController extends Controller
|
|||
$shopping_user = ShoppingUser::findOrFail($this->getPayments('shopping_user_id'));
|
||||
$shopping_user->billing_state = Shop::getCountryShippingCountryId($shopping_user->billing_country_id);
|
||||
$shopping_user->shipping_state = Shop::getCountryShippingCountryId($shopping_user->shipping_country_id);
|
||||
$shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; //reinvert
|
||||
}
|
||||
if($shopping_user->same_as_billing === NULL){
|
||||
$shopping_user->same_as_billing = false;
|
||||
|
|
@ -446,7 +446,6 @@ class CheckoutController extends Controller
|
|||
|
||||
$data['same_as_billing'] = isset($data['same_as_billing']) ? false : true; //reinvert
|
||||
$data['accepted_data_checkbox'] = isset($data['accepted_data_checkbox']) ? true : false;
|
||||
|
||||
$shopping_user = false;
|
||||
if($this->getPayments('shopping_user_id')){
|
||||
$shopping_user = ShoppingUser::find($this->getPayments('shopping_user_id'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue