testing search function

This commit is contained in:
Viktor Pedersen 2021-09-08 16:13:47 +02:00
parent 79c7af32b3
commit 0b6f25f2ab
2 changed files with 9 additions and 1 deletions

@ -111,12 +111,18 @@ class Product extends Entity {
}
public function matches($terms, $matchAll=false) {
print('DEBUG $terms: ');
var_dump($terms);
print('<br><br>');
$terms = $this->specify_search($terms, array('brand',
'name',
'serial',
'invoice',
'status',
'tag'));
print('DEBUG $terms post translation: ');
var_dump($terms);
print('<br><br>');
$matches = array();
foreach($terms as $field => $values) {
if(property_exists($this, $field)) {

@ -146,7 +146,9 @@ class SearchPage extends Page {
// }
// }
}
print('DEBUG $sanitizedItem: ');
var_dump($out);
print('<br><br>');
// foreach($sanitizedItems as $sanitizedItem) {
// print('DEBUG $sanitizedItem: ');
// var_dump($sanitizedItem);