Thread: Sort Drop Down

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

    Default Sort Drop Down

    Hi,

    I have v 3.9h and am using Cherry Zen.

    Currently, the sort drop down box shows up only on the All Products page.

    I would like it to show up on the Sub-Category Pages, also (such as when the customer clicks on "Hearts").

    Is there a way to do this?

    Thank you,
    Lynn
    machineembroideryandmore.com/zencart

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

    Default Re: Sort Drop Down Asking Again Please

    I did not receive any answers and still would like to see if I can get this working. Currently, customers can only sort products when they are in the All Products Area on my website.

    I would like them to be able to sort products when they are in other areas - such as the Categories and Sub-Categories Areas. This would be similar to having the search button showing up on all pages. Can the Sort Drop Down button show up on all pages?

    Thank you,
    Lynn
    machineembroideryandmore.com/zencart

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

    Default Re: Sort Drop Down

    Not sure if this is the dropdown but in

    ADMIN > CONFIGURATION > PRODUCT LISTING

    Include Product Listing Alpha Sorter Dropdown
    also
    Display Category/Manufacturer Filter (0=off; 1=on)


    Hope this helps!

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

    Default Re: Sort Drop Down

    Thanks for your response. I tried it and it did not work. The sort feature shows up on All Products and Featured Products, but not in the Categories.

    If it can't show up on the page, can I get it to show up in the top banner next to the search button? Or as a side box?

    Help!!
    Lynn
    machineembroideryandmore.com/zencart

  5. #5
    Join Date
    Mar 2005
    Posts
    70
    Plugin Contributions
    0

    Default Re: Sort Drop Down

    I Had the same problem, needed a sorter dropdown after scouring the forums got some good hints but no code, heres what i did, you will definatly have to change sort options and play with your settings, this is set to work on advanced search, manufacturers, and catagory listing.

    add this code to the very top of product_listing.php under
    // Column Layout Support (Grid Layout) upgraded for v1.3.0 compatibility DrByte 04/04/2006
    //

    ?><?php

    if ($current_page_base == 'advanced_search_result') {; ?>

    <div style="font-size:11px">Sort by:
    <form name="Jump" action="">
    <select name="Menu" onchange="location=document.Jump.Menu.options[document.Jump.Menu.selectedIndex].value;" value="GO">
    <option value="">Your Choices</option>
    <option value=<?php echo '"index.php?main_page=advanced_search_result&search_in_description=0&keyword= ' . $keywords . '">' ?>Product Name </option>
    <option value=<?php echo '"index.php?main_page=advanced_search_result&search_in_description=1&keyword= ' . $keywords . '">' ?>Product Name - Desc</option>
    <option value=<?php echo '"index.php?main_page=advanced_search_result&search_in_description=1&keyword= ' . $keywords . '&inc_subcat=0&page=1&sort=3a">' ?>Price - Low to High</option>
    <option value=<?php echo '"index.php?main_page=advanced_search_result&search_in_description=1&keyword= ' . $keywords . '&inc_subcat=0&page=1&sort=3d">' ?>Price - High to Low</option>
    </select>
    </form>
    <div>



    <?php } else if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) { ; ?>

    <div style="font-size:11px">Sort by:
    <form name="Jump" action="">
    <select name="Menu" onchange="location=document.Jump.Menu.options[document.Jump.Menu.selectedIndex].value;" value="GO">
    <option value="">Your Choices</option>
    <option value=<?php echo '"index.php?main_page=index&manufacturers_id=' . $_GET['manufacturers_id'] . '&page=1&sort=2d&filter_id=' . $_GET['filter_id'] . '">' ?>Product Name </option>
    <option value=<?php echo '"index.php?main_page=index&manufacturers_id=' . $_GET['manufacturers_id'] . '&page=1&sort=2a&filter_id=' . $_GET['filter_id'] . '">' ?>Product Name - Desc</option>
    <option value=<?php echo '"index.php?main_page=index&manufacturers_id=' . $_GET['manufacturers_id'] . '&page=1&sort=3a&filter_id=' . $_GET['filter_id'] . '">' ?>Price - Low to High</option>
    <option value=<?php echo '"index.php?main_page=index&manufacturers_id=' . $_GET['manufacturers_id'] . '&page=1&sort=3d&filter_id=' . $_GET['filter_id'] . '">' ?>Price - High to Low</option>
    </select>
    </form>
    <div>

    <? echo $_GET['manufacturers_id'];?>



    <?

    }else {; ?>

    <div style="font-size:11px">Sort by:
    <form name="Jump" action="">
    <select name="Menu" onchange="location=document.Jump.Menu.options[document.Jump.Menu.selectedIndex].value;" value="GO">
    <option value="">Your Choices</option>
    <option value=<?php echo '"index.php?main_page=index&cPath=' . $cPath . '&page=1&sort=2d&filter_id=' . $_GET['filter_id'] . '">' ?>Product Name </option>
    <option value=<?php echo '"index.php?main_page=index&cPath=' . $cPath . '&page=1&sort=2a&filter_id=' . $_GET['filter_id'] . '">' ?>Product Name - Desc</option>
    <option value=<?php echo '"index.php?main_page=index&cPath=' . $cPath . '&page=1&sort=3a&filter_id=' . $_GET['filter_id'] . '">' ?>Price - Low to High</option>
    <option value=<?php echo '"index.php?main_page=index&cPath=' . $cPath . '&page=1&sort=3d&filter_id=' . $_GET['filter_id'] . '">' ?>Price - High to Low</option>
    </select>
    </form>
    <div>

    <?
    };

    ?>

    Never be afraid to try something new, remember that amateurs built the ark, professionals built the Titanic

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

    Default Re: Sort Drop Down

    Thank you. I copied the code in the spot you directed me to but my Products disappeared. Am I doing something wrong? Can I just copy the code from this link and paste it into the php file? I'm really a novice at this. I used WordPad - is that OK?
    Last edited by sewingzfun; 14 Apr 2011 at 02:35 AM. Reason: mispelling

  7. #7
    Join Date
    Mar 2005
    Posts
    70
    Plugin Contributions
    0

    Default Re: Sort Drop Down

    If all your produts disappeared, then likely you missed one of the <?php or ?> tags, ran into it a few times while putting together, especially pay attention to the ?> at the very top

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

    Default Re: Sort Drop Down

    The products did not disappear this time - that's good. However, I did not see a sort drop down box and when I tried to do a search, it gave me a bunch of code.

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

    Default Re: Sort Drop Down

    Seems like allot of coding:

    ADMIN > CONFIGURATION > PRODUCT LISTING
    Display Category/Manufacturer Filter (0=off; 1=on) will display that categories manufacturers

    This mod converts the alpha sorter

    ADMIN > CONFIGURATION > PRODUCT LISTING
    Include Product Listing Alpha Sorter Dropdown
    to a drop-down that displays as:

    Most Popular
    Price: Low to High
    Price: High to Low
    Title
    Manufacturer
    Newest
    Oldest

    If the alpha sorter is not appearing you could check your /includes/templates/CUSTOM_TEMPLATE/template/tpl_index_product_list.php file to make sure it is calling it.

    Would look something like:
    Code:
    <?php
      $check_for_alpha = $listing_sql;
      $check_for_alpha = $db->Execute($check_for_alpha);
    
      if ($do_filter_list || ($check_for_alpha->RecordCount() > 0 && PRODUCT_LIST_ALPHA_SORTER == 'true')) {
      $form = zen_draw_form('filter', zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW . '</label>';
    ?>
    or you could copy that code from /includes/templates/template_default/template/tpl_index_product_list.php

    If coding is the way you want to go I would look at this thread.

    Hope this helps!

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

    Default Re: Sort Drop Down

    That worked perfectly and it was easy! Thank you so much

 

 
Page 1 of 3 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