Thread: Sort Drop Down

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24
  1. #11
    Join Date
    Mar 2011
    Location
    California
    Posts
    90
    Plugin Contributions
    0

    Default Re: Sort Drop Down

    One more question - please.

    How do I delete "Manufacturer" from the drop down list?

  2. #12
    Join Date
    Mar 2011
    Location
    California
    Posts
    90
    Plugin Contributions
    0

    Default Re: Sort Drop Down

    OK - I responded before I looked at the drop down clearly. I am excited that it is there - but, I would like only these options to show:
    Model
    Product Name
    Price Low to High
    Price High to Low

    Is there a way to add "Model"

    and delete
    Most Popular
    Manufacturer
    Newest
    Oldest

    Thanks again,
    Lynn

  3. #13
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Sort Drop Down

    Glad it works and was easy!

    Give me a few to play with code & I will post changes.

    Ray

  4. #14
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Sort Drop Down

    For starters lets delete the options you don't want:

    in the mod you downloaded find the following file:
    \includes\modules\YOUR_TEMPLATE_NAME\product_listing_alpha_sorter.php

    In that file find the lines:
    Code:
    $letters_list[] = array('id' => '1', 'text' => 'Most Popular');
    $letters_list[] = array('id' => '2', 'text' => 'Price: Low to High');
    $letters_list[] = array('id' => '3', 'text' => 'Price: High to Low');
    $letters_list[] = array('id' => '4', 'text' => 'Title');
    $letters_list[] = array('id' => '5', 'text' => 'Manufacturer');
    $letters_list[] = array('id' => '6', 'text' => 'Newest');
    $letters_list[] = array('id' => '7', 'text' => 'Oldest');
    Rename
    Code:
    $letters_list[] = array('id' => '4', 'text' => 'Title');
    to
    Code:
    $letters_list[] = array('id' => '4', 'text' => 'Products Name');
    &

    Delete
    Code:
    $letters_list[] = array('id' => '1', 'text' => 'Most Popular');
    $letters_list[] = array('id' => '5', 'text' => 'Manufacturer');
    $letters_list[] = array('id' => '6', 'text' => 'Newest');
    $letters_list[] = array('id' => '7', 'text' => 'Oldest');
    Part 1

  5. #15
    Join Date
    Mar 2011
    Location
    California
    Posts
    90
    Plugin Contributions
    0

    Default Re: Sort Drop Down

    Sorry, I did not get to you sooner. I'm back now and ready to get this working. The Part 1 worked perfectly

  6. #16
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Sort Drop Down

    O.k. good

    In ADMIN > CONFIGURATION > PRODUCT LISTING

    Display Product Model: set the sort order to 9, looks like it is last on you site, just make sure it is not the same as #'s used above: 2,3,4

    Now open:
    \includes\index_filters\YOUR_TEMPLATE_NAME\default_filter.php file

    find:
    Code:
    case 'PRODUCT_LIST_MODEL':
     //$listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    break;
    change to:
    Code:
    case 'PRODUCT_LIST_MODEL':
    $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    break;
    now in the:
    \includes\modules\YOUR_TEMPLATE_NAME\product_listing_alpha_sorter.php file

    ADD:
    Code:
    $letters_list[] = array('id' => '9', 'text' => 'Model');
    change the 9 to the # you assigned to the sort order in ADMIN.

    Should work, Hope this helped!

    Part 2

  7. #17
    Join Date
    Mar 2011
    Location
    California
    Posts
    90
    Plugin Contributions
    0

    Default Re: Sort Drop Down

    You are brilliant!

    Thank you for all the help provided.

    Lynn

  8. #18
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Sort Drop Down

    NP, Glad I could help!

    BTW, if you want the drop-down to appear like you stated in post #12

    Model
    Product Name
    Price Low to High
    Price High to Low

    in:\includes\modules\YOUR_TEMPLATE_NAME\product_listing_alpha_sorter.php

    change this:
    Code:
    $letters_list[] = array('id' => '2', 'text' => 'Price: Low to High');
    $letters_list[] = array('id' => '3', 'text' => 'Price: High to Low');
    $letters_list[] = array('id' => '4', 'text' => 'Products Name');
    $letters_list[] = array('id' => '9', 'text' => 'Model');
    to this:
    Code:
    $letters_list[] = array('id' => '9', 'text' => 'Model');
    $letters_list[] = array('id' => '4', 'text' => 'Products Name');
    $letters_list[] = array('id' => '2', 'text' => 'Price: Low to High');
    $letters_list[] = array('id' => '3', 'text' => 'Price: High to Low');

  9. #19
    Join Date
    Mar 2011
    Location
    California
    Posts
    90
    Plugin Contributions
    0

    Default Re: Sort Drop Down

    Yes, I did prefer to have it listed in that order.

    Thank you! I feel like I have learned a lot from you

  10. #20
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Sort Drop Down

    Glad I could help with this!

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v153 Manufacturer sort in default sort drop down
    By vacuumwarlock in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Nov 2014, 02:58 PM
  2. v139h Sort By: Filter/Drop Down
    By traytray in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Nov 2012, 04:25 AM
  3. Replies: 3
    Last Post: 19 Apr 2010, 06:22 PM
  4. sort by drop down list
    By ronron in forum General Questions
    Replies: 2
    Last Post: 5 May 2009, 04:57 PM

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