From dbdceadb5eba5d175837014091c0ce2111a12699 Mon Sep 17 00:00:00 2001 From: Erik Thuning <boooink@gmail.com> Date: Wed, 15 Sep 2021 16:34:25 +0200 Subject: [PATCH] Added the ability to search on product status --- include/Product.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/Product.php b/include/Product.php index 13b9322..9a4798c 100644 --- a/include/Product.php +++ b/include/Product.php @@ -120,7 +120,8 @@ class Product extends Entity { $fields = array('brand' => 'get_brand', 'name' => 'get_name', 'invoice' => 'get_invoice', - 'serial' => 'get_serial'); + 'serial' => 'get_serial', + 'status' => 'get_status'); foreach($terms as $term) { $key = $term->get_key(); @@ -130,6 +131,7 @@ class Product extends Entity { case 'name': case 'invoice': case 'serial': + case 'status': // If $key is a standard field, check against its value $getter = $fields[$key]; $value = $this->$getter();