Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    2
    Plugin Contributions
    0

    Default Is it possible to sort by status?

    We have just had a catalogue revamp and are in the process of entering alot of new stuff, i have disabled all the old stock for now but is it possible to get the admin side to sort by status rather than change the model numbers

    many thanks

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Is it possible to sort by status

    Yes, but you'll have to modify a couple of files:

    Edit admin/categories.php
    find this section of code at about line 625
    PHP Code:
            array('id' => '6''text'=> TEXT_SORT_PRODUCTS_PRICE_DESC)
            ); 
    change it to this
    PHP Code:
            array('id' => '6''text'=> TEXT_SORT_PRODUCTS_PRICE_DESC),
            array(
    'id' => '7''text'=> 'Products Status')
            ); 
    Now edit admin/includes/modules/category_product_listing.php
    Find this line of code at about line 92
    PHP Code:
          case (6); 
    and add this line immediately after it:
    PHP Code:
          case (7); 
    Now find this section of code at about line 211
    PHP Code:
          case (6);
            
    $order_by " order by p.products_price_sorter DESC, pd.products_name";
            break; 
    and add this immediately after it:
    PHP Code:
          case (7);
            
    $order_by " order by p.products_status, pd.products_name";
            break; 
    (the pd.products_name shown in the code above can be replaced with p.products_model if you want the secondary sort to be by model number)
    Neville
    An assumption is what you arrive at when you get tired of thinking...

 

 

Similar Threads

  1. Custom sort order of our 22 status bins
    By sbbemn in forum Basic Configuration
    Replies: 1
    Last Post: 1 Sep 2011, 03:20 PM
  2. Sort Order Status
    By styledata in forum Customization from the Admin
    Replies: 4
    Last Post: 3 Aug 2006, 01:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg