Zen Cart Logo
Forums / General Questions / Specials and Features Admin page product selection

Specials and Features Admin page product selection

Views: 624

Results 1 to 4 of 4
17 Jan 2015, 7:54 PM
#1
bam3312 avatar

bam3312

New Zenner

Join Date:
Oct 2012
Posts:
25
Plugin Contributions:
0

Specials and Features Admin page product selection

Is there a way to add the model number in the list of products when trying to select what products I want on specials?

Right now it just shows the product description and is a real pain since I could have several products with the same description but different model numbers.

Thx in advance

17 Jan 2015, 11:44 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Specials and Features Admin page product selection

Both already show the Model in both the drop down and the listing ... what are you seeing? Could you post a snapshot?

24 Jan 2015, 5:25 PM
#3
bam3312 avatar

bam3312

New Zenner

Join Date:
Oct 2012
Posts:
25
Plugin Contributions:
0

Re: Specials and Features Admin page product selection

I do see that but I guess it is sorting based on product description. I have a number of products that have very similar descriptions and there are thousands of products. I would prefer to be able to quickly sort by model number. A screen shot is attached.

Thanks in advance

Attachment 14901

29 Jan 2015, 4:25 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Specials and Features Admin page product selection

You could customize the file:
/your_secret_admin/specials.php

and add the code in RED:

  $action = (isset($_GET['action']) ? $_GET['action'] : '');
[B]  if (!isset($_GET['reset_specials_sort_order'])) {
    $reset_specials_sort_order = $_SESSION['specials_sort_order'];
  }
[/B]
  if (zen_not_null($action)) {
    switch ($action) {
[B]      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;
[/B]      case 'setflag':
        if (isset($_POST['flag']) && ($_POST['flag'] == 1 || $_POST['flag'] == 0))
?>
            </td>
[B]            <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>
[/B]          </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 ?>

define('TEXT_INFO_MANUAL', 'Product ID to be Manually Added as a Special');

[B]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');
[/B]

and this should provide you with the ability to sort by:
Products ID#
Product Model, Product Name
Product name

from a dropdown list ...