Registierung Korrekturen

This commit is contained in:
Kevin Adametz 2020-04-29 20:06:51 +02:00
parent 8e4bb0c2f6
commit d8b5206031
70 changed files with 1192 additions and 569 deletions

View file

@ -154,7 +154,9 @@ class Product extends Model
'' => '-',
'show_upgrade' => 'Kann gepdatet werden',
'show_order' => 'Wird immer als Option angezeigt',
'upgrade' => 'Produktupgrade zur Upgrade to ID',
'upgrade' => 'Produktupgrade zur Produkt ID',
'upgrade_member' => 'Beraterupgrade zur Karriere ID',
];
public $unitTypes = [
0 => '',
@ -178,6 +180,8 @@ class Product extends Model
0 => 'payment_for_account',
1 => 'payment_for_shop',
2 => 'payment_for_shop_upgrade',
4 => 'payment_for_lead_upgrade',
];
public function sluggable()
@ -258,11 +262,11 @@ class Product extends Model
$unit = $this->attributes['unit'];
//ml g
if($unit === 1 || $unit === 2){
return Util::formatNumber($price) . ' € 100/'.$this->getUnitType();
return Util::formatNumber($price) . ' € / 100 '.$this->getUnitType();
}
//l kg
if($unit === 3 || $unit === 4){
return Util::formatNumber($price) . ' € 1/'.$this->getUnitType();
return Util::formatNumber($price) . ' € / 1 '.$this->getUnitType();
}
}
return "";

View file

@ -123,11 +123,13 @@ class UserAccount extends Model
'm_account', 'm_salutation', 'm_first_name', 'm_last_name', 'm_notes', 'company', 'salutation', 'first_name', 'last_name', 'address', 'address_2', 'zipcode', 'city', 'country_id', 'pre_phone_id', 'phone', 'pre_mobil_id', 'mobil',
'tax_number', 'tax_identification_number', 'taxable_sales', 'same_as_billing',
'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_country_id', 'shipping_pre_phone_id', 'shipping_phone',
'birthday', 'website', 'facebook', 'facebook_fanpage', 'instagram'
'birthday', 'website', 'facebook', 'facebook_fanpage', 'instagram', 'notice'
];
protected $casts = [
'payment_data' => 'array',
'notice' => 'array',
];
use SoftDeletes;
@ -202,7 +204,15 @@ class UserAccount extends Model
return "";
}
public function setNotice($key, $value){
$notice = $this->notice;
$notice[$key] = $value;
$this->notice = $notice;
$this->save();
}
public function getNotice($key){
return isset($this->notice[$key]) ? $this->notice[$key] : false;
}
}

View file

@ -112,9 +112,9 @@ class UserShop extends Model
return Carbon::parse($this->attributes['active_date'])->format("d.m.Y");
}
public function getSubdomain()
public function getSubdomain($session=true)
{
if(\Session::has('user_shop_domain')){
if($session && \Session::has('user_shop_domain')){
return \Session::get('user_shop_domain');
}
return config('app.protocol').$this->attributes['slug'].".".config('app.domain').config('app.tld_care');