
Originally Posted by
DivaVocals
help me fix a long standing issue with Super Orders..
Should be long standing indeed, as the = in the array is set as == which would never work in that statement.
The <= is probably not working, either because of browser issue or some cleaner stripping html tags.
To make it work you could do this, first rewrite the array in <admin folder>/super_batch_status.php:
Code:
$ot_sign = array();
$ot_sign[] = array('id' => '1',
'text' => ' > ' . DROPDOWN_GREATER_THAN);
$ot_sign[] = array('id' => '2',
'text' => ' < ' . DROPDOWN_LESS_THAN);
$ot_sign[] = array('id' => '3',
'text' => ' = ' . DROPDOWN_EQUAL_TO);
now adjust the SQL query build to match the id's:
Code:
if (isset($_GET['order_total']) && zen_not_null($_GET['order_total'])) {
if ($_GET['ot_sign'] == 3) { $sign_operator = '='; }
elseif ($_GET['ot_sign'] == 2) { $sign_operator = '<='; }
else { $sign_operator = '>='; }
$orders_query_raw .= " AND o.order_total " . $sign_operator . " '" . (int)$_GET['order_total'] . "'";
//$orders_query_raw .= " AND o.order_total " . $_GET['ot_sign'] . " '" . (int)$_GET['order_total'] . "'";
}
finally, have a last look at these fields, as you will probably never use em while they're error free 
Jeroen
Bookmarks