#10 Promotion Modul, Kommentar 2
This commit is contained in:
parent
f0da981737
commit
c9e1545693
128 changed files with 8194 additions and 637 deletions
|
|
@ -124,6 +124,11 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @property-read int|null $product_buys_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product whereMaxBuy($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product whereMaxBuyNum($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product withUniqueSlugConstraints(\Illuminate\Database\Eloquent\Model $model, string $attribute, array $config, string $slug)
|
||||
* @property string|null $short_copy
|
||||
* @property array|null $show_on
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product whereShortCopy($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product whereShowOn($value)
|
||||
*/
|
||||
class Product extends Model
|
||||
{
|
||||
|
|
@ -144,6 +149,7 @@ class Product extends Model
|
|||
'trans_description' => 'array',
|
||||
'trans_usage' => 'array',
|
||||
'trans_ingredients' => 'array',
|
||||
'show_on' => 'array',
|
||||
'action' => 'array',
|
||||
'wp_number' => 'int',
|
||||
'single_commission' => 'bool',
|
||||
|
|
@ -163,6 +169,7 @@ class Product extends Model
|
|||
'name',
|
||||
'title',
|
||||
'copy',
|
||||
'short_copy',
|
||||
'price',
|
||||
'price_ek',
|
||||
'tax',
|
||||
|
|
@ -182,6 +189,7 @@ class Product extends Model
|
|||
'amount',
|
||||
'active',
|
||||
'show_at',
|
||||
'show_on',
|
||||
'single_commission',
|
||||
'amount_commission',
|
||||
'value_commission',
|
||||
|
|
@ -201,8 +209,6 @@ class Product extends Model
|
|||
'upgrade' => 'Produktupgrade zur Produkt ID',
|
||||
'upgrade_member' => 'Vertriebspartnerupgrade zur Karriere ID',
|
||||
//'proportional_voucher' => 'Anteiliger Gutschein Vertriebspartner',
|
||||
|
||||
|
||||
];
|
||||
public $unitTypes = [
|
||||
0 => '',
|
||||
|
|
@ -224,6 +230,17 @@ class Product extends Model
|
|||
|
||||
];
|
||||
|
||||
public $showONs = [
|
||||
1 => 'Kunden Bestellungen',
|
||||
2 => 'Vertriebspartner Bestellungen',
|
||||
3 => 'Microsite',
|
||||
4 => 'Registrierung Vertriebspartner',
|
||||
5 => 'Mitgliedschaft Vertriebspartner',
|
||||
//6 => 'Onboarding Berater',
|
||||
10 => 'zur internen Berechnung',
|
||||
];
|
||||
|
||||
|
||||
public $actions = [
|
||||
0 => 'payment_for_account',
|
||||
// 1 => 'payment_for_shop',
|
||||
|
|
@ -419,6 +436,14 @@ class Product extends Model
|
|||
return isset($this->showATs[$this->show_at]) ? $this->showATs[$this->show_at] : '-';
|
||||
}
|
||||
|
||||
public function getShowOnTypes(){
|
||||
$ret = [];
|
||||
foreach($this->show_on as $show){
|
||||
$ret[] = isset($this->showONs[$show]) ? $this->showONs[$show] : '-';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
public function setPosAttribute($value){
|
||||
$this->attributes['pos'] = is_numeric($value) ? $value : null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue