commit 08-2025
This commit is contained in:
parent
9ae662f63e
commit
480fdc65ed
404 changed files with 65310 additions and 2600431 deletions
|
|
@ -317,4 +317,23 @@ class ShoppingUser extends Model
|
|||
public function getAllOrdersByMember(){
|
||||
return ShoppingUserService::getAllOrdersByMember($this);
|
||||
}
|
||||
|
||||
public function getDeliveryCountry($get_country = false){
|
||||
if($this->same_as_billing == 1){
|
||||
if($this->billing_country_id){
|
||||
if($get_country){
|
||||
return $this->billing_country;
|
||||
}
|
||||
return $this->billing_country->getLocated();
|
||||
}
|
||||
}else{
|
||||
if($this->shipping_country_id){
|
||||
if($get_country){
|
||||
return $this->shipping_country;
|
||||
}
|
||||
return $this->shipping_country->getLocated();
|
||||
}
|
||||
}
|
||||
return 'not set';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue