Needs review
Project:
Ubercart advanced catalog
Version:
6.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2011 at 23:43 UTC
Updated:
18 Dec 2014 at 15:43 UTC
Jump to comment: Most recent
Comments
Comment #1
3cwebdev commentedIf you were using the 2.x version I could guide as to how I accomplished creating a price range filter (requires hacking the module).
Comment #2
Spider84 commentedYes I am using 2.0 version. I have made a mistake when creating this issue. Can you share this code for me? I will be very gratefull to you, I need this feature very much.
Thank you.
Comment #3
3cwebdev commentedThe concept that I used to make price range filters on my site is below. Please adapt it to suit your site.
In uc_advanced_catalog.filters.inc add the following code to uc_advanced_catalog_catalog_filters() before return $fields;. This adds the filter to the display. You can adjust the pricing accordingly. Part of this code finds the lowest and highest prices in the current category and removes price ranges that are under and over these so that some unneeded ranges won't be displayed.
Then in uc_advanced_catalog.pages.inc, and the following code to uc_advanced_catalog_products() right after this snippet
This part adds the query to provide that actual price filter functionality.
I hope this makes sense. I couldn't make a patch because I have many other hacks in the module as well.
Comment #4
3cwebdev commentedThe following snipped should take care of empty catalog pages the occur when set set filters and then go to a different category page.
In uc_advanced_catalog.pages.inc, in function uc_advanced_catalog_browse() after the line that says:
Comment #5
mogtofu33 commentedHi,
Perhaps you could simply create a vocabulary to handle price range. Taxonomy will need to be selected on each product edit form, but it will make it very easy to manage.
Regards.
Mog.
Comment #6
MakeOnlineShop commentedHello,
Do you know any other way to show only some items which price is below 19.90 without hacking the module ?
Thank you.