testemich Promotion
This commit is contained in:
parent
38e7fd504a
commit
a0f4eda6ea
83 changed files with 1690 additions and 504 deletions
|
|
@ -251,4 +251,33 @@ class ShoppingUser extends Model
|
|||
}
|
||||
return "free";
|
||||
}
|
||||
|
||||
public function getOrderPaymentFor() {
|
||||
|
||||
switch($this->is_from){
|
||||
case 'wizard':
|
||||
return 1;
|
||||
case 'membership':
|
||||
return 2;
|
||||
case 'user_order':
|
||||
if($this->is_for === 'cr'){
|
||||
return 3;
|
||||
}
|
||||
if($this->is_for === 'mp'){
|
||||
return 4;
|
||||
}
|
||||
if($this->is_for === 'me'){
|
||||
return 5;
|
||||
}
|
||||
if($this->is_for === 'ot'){
|
||||
return 6;
|
||||
}
|
||||
return 0;
|
||||
case 'shopping':
|
||||
return $this->is_for === 'pr' ? 7 : 8; //7 Promotion
|
||||
case 'extern':
|
||||
return 10;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue