Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2008
    Posts
    4
    Plugin Contributions
    0

    Default Filter Results By, Options

    Hello,

    I was searching the forum with no real answers to my questions.

    My ZenCart installation displays Filter Results By (A,B,C,D.. and so on). I want to remove this, or at least add an option to sort by price high to low, low to high.

    Now, before you say you can just press "Price" to sort the category, I know.

    However, I need something obvious like a sort by drop down.

    Thanks for any help.

  2. #2
    Join Date
    Aug 2008
    Posts
    1
    Plugin Contributions
    0

    Default Re: Filter Results By, Options

    I am with you on this, I have been looking for something like this for ages now, can somebody possibly shed some light?
    I'll go and get a coffee and wait for a suitable answer

  3. #3
    Join Date
    Dec 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Filter Results By, Options

    Well, I figured out a ghetto way to do this, and it works fine for me.

    Explanation below
    In my zencart installation, when I press the word "Price" to sort the items, it just adds the following code to the current URL

    Code:
    &page=1&sort=3a
    My installation is in rows, as apposed to column, with my prices being the the 3rd row, so I'm assuming you would change sort="the # of your price row" then a for ascending and d for descending.

    Then I edited my template's tpl_modules_product_listing.php file as follows

    I add the following code to near the top, just under PHP copyright/ author info.

    Code:
    <?php
    function curPageURL() {
     $pageURL = 'http';
     if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
     $pageURL .= "://";
     if ($_SERVER["SERVER_PORT"] != "80") {
      $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
     } else {
      $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
     }
     return $pageURL;
    }
    ?>
    Then I added the following code right after <div id="productsListingTopNumber" class="navSplitPagesResult back">
    Code:
    Sort by Price:
    <a href="<?php echo curPageURL();?>&page=1&sort=3a">Low to High</a> | 
     <a href="<?php echo curPageURL();?>&page=1&sort=3d">High to Low</a><br /><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?>
    By playing around with the above code, I'm sure you could make a drop down, and just disable the alpha filter to remove the filter by: option.

    Anywho, I attached an image of the final results

    And now I'm going to go clean up some cat vomit off my carpet! HURRAY!
    Attached Images Attached Images  

  4. #4
    Join Date
    Jan 2009
    Posts
    2,124
    Plugin Contributions
    0

    Default Re: Filter Results By, Options

    Quote Originally Posted by Stew-Dee-Oh View Post
    Anywho, I attached an image of the final results

    And now I'm going to go clean up some cat vomit off my carpet! HURRAY!
    I've been trying to do this for ages but can't figure out how you get your image to enlarge in a funky new window like that and then to make the background dark and shaded out. It's brill, how do you do it??

  5. #5
    Join Date
    Jun 2003
    Posts
    33,823
    Plugin Contributions
    0

    Default Re: Filter Results By, Options

    I've been trying to do this for ages but can't figure out how you get your image to enlarge in a funky new window like that and then to make the background dark and shaded out. It's brill, how do you do it??
    Your question is totally off topic for this thread.

    A search for lightbox should help.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  6. #6
    Join Date
    Jan 2009
    Posts
    2,124
    Plugin Contributions
    0

    Default Re: Filter Results By, Options

    My apologies for being off topic, please delete my comments if possible.

    Thanks for the pointer though, I've never heard of lightbox but now I know what to look for.

    Many thanks.

  7. #7

    Default Re: Filter Results By, Options

    How do you actually turn off the filter by box so it doesnt appear?
    I refuse to tip-toe through life only to arrive safely at death's door!

    www.thetoyparlour.com

 

 

Similar Threads

  1. How do I add a Filter Results By subcategory dropdown menu to product list results?
    By molywerks in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Mar 2008, 08:53 PM
  2. Filter Results By:
    By jrstaatsiii in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Jan 2008, 12:34 AM
  3. Filter results
    By datoshway in forum General Questions
    Replies: 9
    Last Post: 14 Jun 2007, 08:16 PM
  4. Filter Results By?
    By HelpMeSell in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 25 Apr 2007, 06:52 AM
  5. Filter Results by:
    By hendersonse in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 25 Feb 2007, 03:42 PM

Bookmarks

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