Added parent id to address
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
class AddressModel {
|
||||
public $parant_id = null;
|
||||
public $parent_id = null;
|
||||
public $company = null;
|
||||
public $firstname = null;
|
||||
public $lastname = null;
|
||||
@@ -119,6 +119,17 @@ class AddressModel {
|
||||
$where .= " AND ( $or )";
|
||||
}
|
||||
}
|
||||
//var_dump($filter);exit;
|
||||
if(array_key_exists("parent_id", $filter)) {
|
||||
|
||||
$parentid = $filter['parent_id'];
|
||||
if($parentid === null) {
|
||||
$where .= " AND parent_id IS NULL";
|
||||
} elseif(is_numeric($parentid)) {
|
||||
$where .= " AND parent_id=$parentid";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user