| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Creating Price Range Links | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi All,
I've created a set of "price range links" that use static search URL's to display all products between 0-$200, $201-$500, etc. The links function perfectly, but I'm trying to get them to have an 'active' class applied to them when you are on the appropriate page. I've attempted to access the 'price_min' and 'price_max' elements of the 'search_prefilled' array, but with no luck. Here's my code: HTML Code:
If anyone has any ideas on how to get active classes to correctly appear for this type of link let me know. Thanks!
__________________
nick hoag looking forward to the future http://thefutureforward.com xcart versions 4.2.x, 4.3.x, 4.4.x |
|||||||
#2
|
|||||||
|
|||||||
![]() What files should this code be added to? I want the price range to show up on the left side of light and lucid 3 column theme.
Great idea and thanks for the code. |
|||||||
#3
|
|||||||
|
|||||||
![]() Hi Snowrev,
Not sure what version you're using (might want to put it in your signature), but for 4.4 you'll probably want to put the code somewhere in common_files/customer/left_bar.tpl I tend to use the 2-column layout so I'm not 100% on that. Try using the webmaster mode under tools to find the .tpl file that you are editing.
__________________
nick hoag looking forward to the future http://thefutureforward.com xcart versions 4.2.x, 4.3.x, 4.4.x |
|||||||
#4
|
|||||||
|
|||||||
![]() Thank you.. I will try now and put the code there. Will this display all products on the site based on the price range?
|
|||||||
#5
|
|||||||
|
|||||||
![]() Yes,
It will display all products across the site within those ranges. You would need to add "&categoryid=2" to the query string in order to search a specific category at that price range, where "2" is the category you are wanting to search through.
__________________
nick hoag looking forward to the future http://thefutureforward.com xcart versions 4.2.x, 4.3.x, 4.4.x |
|||||||
#6
|
|||||||
|
|||||||
![]() I tried the code and think its a great idea but I will need to apply it as a filter option for particular products for this site.. Let me know if you find out how to do it.. I tested the code but didnt get search results, does it automatically grab the item price? or do you have to insert the item price someone on the products detail page?
|
|||||||
#7
|
|||||||
|
|||||||
![]() Make sure you don't already have some filter options set in your search boxes. Clear them all out then try the links (x-cart remembers past search filters by default).
__________________
nick hoag looking forward to the future http://thefutureforward.com xcart versions 4.2.x, 4.3.x, 4.4.x |
|||||||
#8
|
|||||||
|
|||||||
![]() Quote:
Is there a way to add a filter by manufacturer to the search string that anyone is aware of? I tried just adding &manufacturerid but it did not do the trick. Drill by price works great though - Thanks for posting the code!
__________________
mudebate X-cart 4.11 - One page checkout, category meta tags, manufacturer meta tags, a few others X-cart 4.2, tabbed products menu |
|||||||
|
|||
X-Cart forums © 2001-2020
|