Page 1 of 11 123 ... LastLast
Results 1 to 10 of 101
  1. #1
    Join Date
    Nov 2006
    Location
    London, UK
    Posts
    132
    Plugin Contributions
    0

    Default Sort by price with column display....

    I am displaying my items in columns, and I want to create a drop-down box so the user can sort by price etc.

    So far I have the following code in tpl_index_product_list.php:

    <form name="sorter" action="http://www.dreamofrussia.com/index.php?main_page=index&cPath=7" method="get"><select name="sorter" onchange="this.form.submit();">
    <OPTION SELECTED value="">Sort by...
    <OPTION value="&sortby=4a">Price
    <OPTION value="&sortby=3a">Artist Name
    <OPTION value="&sortby=2a">Size
    </SELECT>
    </FORM>

    How can I make it so that the sorter will work for any category, ie. dynamically choose which category?

    Thanks in advance.

  2. #2
    Join Date
    Dec 2005
    Posts
    34
    Plugin Contributions
    0

    Default Re: Sort by price with column display....

    Also looking for this solution but not by using pop-up menu. All I need is two links in a product listing header: "Price asc" and "Price desc". Anyone knows how I can accomplish this?

    Adam

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Sort by price with column display....

    Change the + and - to asc and desc in the Configuration ... Product Listing ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Dec 2005
    Posts
    34
    Plugin Contributions
    0

    Default Re: Sort by price with column display....

    Quote Originally Posted by Ajeh View Post
    Change the + and - to asc and desc in the Configuration ... Product Listing ...
    Yes Ajeh, but in a columanar display there is no clickable "-" or "+" like was in row listing (row listing has a sorter on "Model", "Item Name" and "price -(+)".

    Adam

  5. #5
    Join Date
    Nov 2006
    Location
    London, UK
    Posts
    132
    Plugin Contributions
    0

    Default Re: Sort by price with column display....

    Manada, thanks for raising this again. This is probably the feature I want more than any other for my inline store - the option to sort by price under column view... and I'm sure other zenners would like it too. I have tried to make my own workaround, but no success yet...

    Any pointers Ajeh?

    Cheers

  6. #6
    Join Date
    Dec 2005
    Posts
    34
    Plugin Contributions
    0

    Default Re: Sort by price with column display....

    OK, i just look on this problem closely. I think we could go around like this:

    At the beggining of tpl_modules_product_listing.php I entered as follow:

    For ascending sorting link

    Code:
    echo '<a href="' . zen_href_link(FILENAME_DEFAULT , "cPath=$cPath") . "&sort=2a" . '">' . "Sort By Price (Asc)" . '</a><br>';
    For descending sort. link;

    Code:
    echo '<a href="' . zen_href_link(FILENAME_DEFAULT , "cPath=$cPath") . "&sort=2d" . '">' . "Sort By Price (Asc)" . '</a><br>';
    I know , its a little bit "off-zen" but it works.

    Adam

  7. #7
    Join Date
    Jan 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: Sort by price with column display....

    Hi ! I was also trying to add a combo in this page to sort on the various columns. But without success... Probably because I have never developed with php before tonight :/

    I tried to include "tpl_modules_listing_display_order" as done in the header_php of the product_all page:

    require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));

    But it does not even display the combo...

    As I would like to avoid learning php (and everything about ZenCart) in one night... just to add this combo in one page. Someone can help me ?

    Should I include more than just the "require(...)" ???

    O.

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Sort by price with column display....

    If you want to sort by price can't you just set the sort order on the Product Listing to your Price column?

    Click on the title above it and it will tell you the sort setting in the URL ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Sort by price with column display....

    I believe the point is that that function doesn't exist in the column grid view. Would finding the sort number before installing the grid mod be relevant after the mod is installed?

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Sort by price with column display....

    I don't use that add-on so perhaps someone who does can better answer this for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 11 123 ... LastLast

Similar Threads

  1. Change Display price with attribute LARGEST price not lowest
    By bubbadan in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Feb 2020, 05:37 AM
  2. Problems with Sort by Price
    By JohnBoyCR in forum General Questions
    Replies: 32
    Last Post: 29 Nov 2010, 02:59 AM
  3. Column layout grid view - add sort by price
    By mattys in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 Sep 2010, 11:41 AM
  4. how to sort products listings with price
    By pavka in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Apr 2008, 08:11 PM
  5. Category view: changing product display column width - image, description, price?
    By azenuser in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 Feb 2007, 10:31 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
Zen-Cart, Internet Selling Services, Klamath Falls, OR