Promotion Frontend dynamic
This commit is contained in:
parent
c9e1545693
commit
1cc8e025a1
29 changed files with 551 additions and 163 deletions
|
|
@ -47,7 +47,12 @@ class ShippingPrice extends Model
|
|||
protected $table = 'shipping_prices';
|
||||
|
||||
protected $fillable = [
|
||||
'shipping_id', 'price', 'price_comp', 'num_comp', 'tax_rate', 'factor', 'total_from', 'total_to', 'weight_from', 'weight_to',
|
||||
'shipping_id', 'price', 'price_comp', 'num_comp', 'tax_rate', 'factor', 'total_from', 'total_to', 'weight_from', 'weight_to', 'shipping_for',
|
||||
];
|
||||
|
||||
public static $shippingForTypes = [
|
||||
1 => 'Berater Bestellungen',
|
||||
2 => 'Shop Bestellungen',
|
||||
];
|
||||
|
||||
public function shipping()
|
||||
|
|
@ -55,6 +60,9 @@ class ShippingPrice extends Model
|
|||
return $this->belongsTo('App\Models\Shipping', 'shipping_id');
|
||||
}
|
||||
|
||||
public function getShippingForType(){
|
||||
return isset(self::$shippingForTypes[$this->shipping_for]) ? self::$shippingForTypes[$this->shipping_for] : "";
|
||||
}
|
||||
|
||||
public function setPriceAttribute($value)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue