Overhauled Address linking
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
class Order extends mfBaseModel {
|
||||
private $owner;
|
||||
private $billingaddress;
|
||||
private $techcontact;
|
||||
private $products;
|
||||
private $customer_type;
|
||||
private $contracts;
|
||||
@@ -251,6 +252,17 @@ class Order extends mfBaseModel {
|
||||
return $this->billingaddress;
|
||||
}
|
||||
|
||||
if($name == "techcontact") {
|
||||
$this->techcontact = mfValuecache::singleton()->get("mfObjectmodel-Address-".$this->techcontact_id);
|
||||
if($this->techcontact === null) {
|
||||
$this->techcontact = new Address($this->techcontact_id);
|
||||
if($this->techcontact->id) {
|
||||
mfValuecache::singleton()->set("mfObjectmodel-Address-".$this->techcontact_id, $this->techcontact);
|
||||
}
|
||||
}
|
||||
return $this->techcontact;
|
||||
}
|
||||
|
||||
if($name == "products") {
|
||||
$this->products = OrderProductModel::search(["order_id" => $this->id]);
|
||||
//var_dump($this->products);exit;
|
||||
|
||||
Reference in New Issue
Block a user