Free Shipping, Business Levels correction, Products Buying, Fonts

This commit is contained in:
Kevin Adametz 2023-01-25 12:37:29 +01:00
parent 3f2fbd6d5b
commit 0341c9c189
197 changed files with 9161 additions and 329 deletions

View file

@ -12,6 +12,7 @@ class Shop
public static $user_country;
public static $shipping_country;
public static $user_tax_free;
public static $shipping_free;
public static $user_reverse_charge = false;
public static function userOrders() {
@ -51,7 +52,6 @@ class Shop
}
}
public static function getShippingCountryCountryId($shipping_country_id){
$shippingCountry = ShippingCountry::find($shipping_country_id);
if($shippingCountry && $shippingCountry->country){
@ -111,19 +111,21 @@ class Shop
//Lieferadresse im Drittland?
self::$user_tax_free = $country->supply_country ? true : false;
$ShippingCountry = ShippingCountry::whereCountryId($country->id)->first();
self::$shipping_free = $ShippingCountry->shipping->free;
self::$shipping_country = $ShippingCountry;
self::$user_country = $country;
Yard::instance('shopping')->setShippingCountryWithPrice($ShippingCountry->id);
Yard::instance('shopping')->setUserPriceInfos(Shop::getYardInfo());
Yard::instance('shopping')->setUserPriceInfos(Shop::getShopYardInfo());
}
public static function getYardInfo(){
public static function getShopYardInfo(){
return [
'user_tax_free' => self::$user_tax_free,
'shipping_free' => self::$shipping_free,
'user_reverse_charge' => self::$user_reverse_charge,
'user_country_id' => self::$user_country->id,
'shipping_country_id' => self::$shipping_country->id,