Added Preorder attributes and checkboxes in list
This commit is contained in:
@@ -51,6 +51,7 @@ class PreorderModel {
|
||||
public $shipping_address;
|
||||
public $addon_services;
|
||||
public $addon_data;
|
||||
public $attributes;
|
||||
public $submit_type;
|
||||
public $submit_request;
|
||||
|
||||
@@ -442,6 +443,22 @@ class PreorderModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("attributes", $filter)) {
|
||||
$attributes = FronkDB::singleton()->escape($filter['attributes']);
|
||||
if(is_array($attributes) && count($attributes)) {
|
||||
if(array_key_exists("bep_specified", $attributes)) {
|
||||
if($attributes['bep_specified']) {
|
||||
$where .= " AND JSON_EXTRACT(attributes, \"$.bep_specified\") = 1";
|
||||
}
|
||||
}
|
||||
if(array_key_exists("inhouse_cabling_supplied", $attributes)) {
|
||||
if($attributes['inhouse_cabling_supplied']) {
|
||||
$where .= " AND JSON_EXTRACT(attributes, \"$.inhouse_cabling_supplied\") = 1";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// custom where clause
|
||||
if(array_key_exists("add-where", $filter)) {
|
||||
$where .= " ".$filter['add-where'];
|
||||
|
||||
Reference in New Issue
Block a user