testemich Promotion
This commit is contained in:
parent
38e7fd504a
commit
a0f4eda6ea
83 changed files with 1690 additions and 504 deletions
|
|
@ -157,23 +157,49 @@ class ShoppingOrder extends Model
|
|||
1 => 'in Bearbeitung',
|
||||
2 => 'versendet',
|
||||
3 => 'abgeschlossen',
|
||||
4 => 'Abholung',
|
||||
10 => 'storniert'
|
||||
];
|
||||
|
||||
public static $paymentForTypes = [
|
||||
0 => '',
|
||||
1 => 'wizzard',
|
||||
2 => 'user_order me',
|
||||
3 => 'user_order ot',
|
||||
4 => 'Promotion',
|
||||
10 => ''
|
||||
1 => 'Registrierung',
|
||||
2 => 'Mitgliedschaft',
|
||||
3 => 'Guthabenaufladung', //guthaben
|
||||
4 => 'VP.Bestellung Abholung',
|
||||
5 => 'VP.Bestellung Lieferung',
|
||||
6 => 'VP.Kundenbestellung',
|
||||
7 => 'Promotion',
|
||||
8 => 'Shop',
|
||||
9 => '-',
|
||||
10 => 'extern',
|
||||
11 => ''
|
||||
];
|
||||
|
||||
public static $paymentForColors = [
|
||||
|
||||
0 => 'default',
|
||||
1 => 'warning',
|
||||
2 => 'warning',
|
||||
3 => 'secondary',
|
||||
4 => 'secondary',
|
||||
5 => 'secondary',
|
||||
6 => 'info',
|
||||
7 => 'dark',
|
||||
8 => 'info',
|
||||
9 => 'default',
|
||||
10 => 'info',
|
||||
11 => 'default'
|
||||
|
||||
];
|
||||
|
||||
|
||||
public static $apiShippedTypes = [
|
||||
0 => 'open', //(Fullfilment durch Händler)',
|
||||
1 => 'process', //(Fullfilment durch MIVITA: nicht Versand)
|
||||
2 => 'sent', //(Fullfilment durch MIVITA: Versand erfolgt)'
|
||||
3 => 'close', //(Fullfilment durch MIVITA: Versand erfolgt)',
|
||||
4 => 'pick_up', //(Fullfilment durch MIVITA: Versand erfolgt)',
|
||||
10 => 'cancel'
|
||||
];
|
||||
|
||||
|
|
@ -182,6 +208,7 @@ class ShoppingOrder extends Model
|
|||
1 => 'info',
|
||||
2 => 'success',
|
||||
3 => 'secondary',
|
||||
4 => 'success',
|
||||
10 => 'danger',
|
||||
];
|
||||
|
||||
|
|
@ -272,6 +299,13 @@ class ShoppingOrder extends Model
|
|||
return isset(self::$shippedColors[$this->shipped]) ? self::$shippedColors[$this->shipped] : "default";
|
||||
}
|
||||
|
||||
public function getPaymentForType(){
|
||||
return isset(self::$paymentForTypes[$this->payment_for]) ? self::$paymentForTypes[$this->payment_for] : "";
|
||||
}
|
||||
public function getPaymentForColor(){
|
||||
return isset(self::$paymentForColors[$this->payment_for]) ? self::$paymentForColors[$this->payment_for] : "";
|
||||
}
|
||||
|
||||
public function getFormattedTotal()
|
||||
{
|
||||
return formatNumber($this->attributes['total']);
|
||||
|
|
@ -319,8 +353,6 @@ class ShoppingOrder extends Model
|
|||
{
|
||||
return formatNumber($this->attributes['payment_credit']);
|
||||
}
|
||||
|
||||
|
||||
public function getFormattedTotalShipping()
|
||||
{
|
||||
return formatNumber($this->attributes['total_shipping']);
|
||||
|
|
@ -333,10 +365,14 @@ class ShoppingOrder extends Model
|
|||
$count += $shopping_order_item->qty;
|
||||
}
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
public function isPickUp(){
|
||||
return $this->shipping_option === 'pick_up' ? true : false;
|
||||
}
|
||||
|
||||
|
||||
public function isTax(){
|
||||
return $this->tax > 0 ? true : false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue