You could customize the file:
/your_secret_admin/specials.php
and add the code in RED:
Code:
$action = (isset($_GET['action']) ? $_GET['action'] : '');
if (!isset($_GET['reset_specials_sort_order'])) {
$reset_specials_sort_order = $_SESSION['specials_sort_order'];
}
if (zen_not_null($action)) {
Code:
switch ($action) {
case 'set_specials_sort_order':
$_SESSION['specials_sort_order'] = $_GET['reset_specials_sort_order'];
$action='';
zen_redirect(zen_href_link(FILENAME_SPECIALS, (isset($_GET['page']) && $_GET['page'] > 0 ? 'page=' . $_GET['page'] . '&' : '') . 'sID=' . $_GET['sID'] . (isset($_GET['search']) && trim($_GET['search']) != '' ? '&search=' . $_GET['search'] : '')));
break;
case 'setflag':
if (isset($_POST['flag']) && ($_POST['flag'] == 1 || $_POST['flag'] == 0))
Code:
?>
</td>
<td>
<?php
// add Sort Order here
// $_SESSION['specials_sort_order']
// toggle switch for display sort order
// order of display
$specials_sort_order_array = array(array('id' => '0', 'text' => TEXT_SORT_PRODUCTS_ID),
array('id' => '1', 'text' => TEXT_SORT_MODEL_NAME),
array('id' => '2', 'text' => TEXT_SORT_NAME)
);
echo TEXT_SORT_SPECIALS_TITLE_INFO . zen_draw_form('set_specials_sort_order_form', FILENAME_SPECIALS, '', 'get') . ' ' . zen_draw_pull_down_menu('reset_specials_sort_order', $specials_sort_order_array, $reset_specials_sort_order, 'onChange="this.form.submit();"') . zen_hide_session_id() .
($_GET['page'] != '' ? zen_draw_hidden_field('page', $_GET['page']) : '') .
($_GET['sID'] != '' ? zen_draw_hidden_field('sID', $_GET['sID']) : '') .
zen_draw_hidden_field('action', 'set_specials_sort_order') .
'</form>';
?>
</td>
</form></tr>
<tr>
<td colspan="3" class="main"><?php echo TEXT_STATUS_WARNING; ?></td>
</tr>
Then add the define statements to the bottom of:
/your_secret_admin/includes/languages/english/specials.php
removing the bottom closing php tag ?>
Code:
define('TEXT_INFO_MANUAL', 'Product ID to be Manually Added as a Special');
define('TEXT_SORT_SPECIALS_TITLE_INFO', 'Sort Specials by:');
define('TEXT_SORT_PRODUCTS_ID', 'Products ID#');
define('TEXT_SORT_MODEL_NAME', 'Model #, Product Name');
define('TEXT_SORT_NAME', 'Product Name');
and this should provide you with the ability to sort by:
Products ID#
Product Model, Product Name
Product name
from a dropdown list ...