Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Problems (/forumdisplay.php?f=68)
-   -   Need little help on price filter widget (/showthread.php?t=7837)

johngibb123 October 3rd, 2012 06:30 PM

Need little help on price filter widget
 
hi,

actual code in price filter wdiget:
Quote:

<ul>
<li><a href="[server.url type='fullpage' query='price=-50']">Less than $50</a></li>
<li><a href="[server.url type='fullpage' query='price=50-100']">$50 ~ $100</a></li>
<li><a href="[server.url type='fullpage' query='price=100-500']">$100 ~ $500</a></li>
<li><a href="[server.url type='fullpage' query='price=500-1000']">$500 ~ $1000</a></li>
<li><a href="[server.url type='fullpage' query='price=1000-2000']">$1000 ~ $2000</a></li>
<li><a href="[server.url type='fullpage' query='price=2000-']">More than $2000</a></li>
<ul>

Iam gonna keep JQUery Slider instead of above code...Iam gonna keep some form under slider, below is that form code:

Quote:

<form method="get" style="margin-top:10px">

<input type="text" size="4" id="minprice" value=""> - <input type="text" size="4" id="maxprice" value="">
<input type="hidden" name="price" id="pricefilter">

<input type="submit" value="GO" id="pricego" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" aria-disabled="false">
</form>

SO, all I need is how do I make that form code work for price filter widget..?

Eric October 3rd, 2012 06:34 PM

Hi,

I'm also not sure how to get the slider to send a $_GET parameter to the URL.

Eric

johngibb123 October 3rd, 2012 07:09 PM

Quote:

Originally Posted by Eric (Post 36031)
Hi,

I'm also not sure how to get the slider to send a $_GET parameter to the URL.

Eric


Ohh :confused: any idea, how this guy used that slider using above form code.. pls have a look (from his source code)


Eric October 3rd, 2012 07:10 PM

Hi

I don't know but I know he's offering his services for hire. ;)

/showthread.php?t=7650

Eric

johngibb123 October 3rd, 2012 07:15 PM

Quote:

Originally Posted by Eric (Post 36037)
Hi

I don't know but I know he's offering his services for hire. ;)

/showthread.php?t=7650

Eric


You're such a gr8 coder, if you dont know means how..? :eek: you definitely get an answer only if u do little try...

and that guy asking some $xxx just for widget codes.. and thats why iam struggling myself..

if you could just try this, i can get slider as well.. pls try again,.

Eric October 3rd, 2012 07:21 PM

Hi

This is beyond the scope of the support we can provide.

Additionally, the price filter on bag saver is not even working for me. I wouldn't copy that behavior. ;)

Eric

johngibb123 October 3rd, 2012 07:34 PM

Quote:

Originally Posted by Eric (Post 36039)
Hi

This is beyond the scope of the support we can provide.

Additionally, the price filter on bag saver is not even working for me. I wouldn't copy that behavior. ;)

Eric


your replies surrprisng me.. Is that really tough to implement..? and you always say this "beyond the support...." iam not asking something that I can found easily outside, instead iam asking mainly on 'Integration issues'

BTW, cant we use something like 'action attibute' to form ? something like below:

Quote:

<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>

(or)


Quote:

<form method="post" action="<?php echo $PHP_SELF;?>">

Just giving an idea....i guess you already knew this, but just trying from my side...

Eric October 3rd, 2012 08:09 PM

Hi

Sure, you can do the form and leave off the action attribute. You don't need or want it in this case.

However, you still need to tweak the form to send 2 input fields (minprice and maxprice) to the URL as 1 field (price).

That will require modifying the HTML and possibly the jQuery used to manipulate the data.

Eric

johngibb123 October 4th, 2012 06:31 AM

Quote:

Originally Posted by Eric (Post 36042)
Hi

Sure, you can do the form and leave off the action attribute. You don't need or want it in this case.

However, you still need to tweak the form to send 2 input fields (minprice and maxprice) to the URL as 1 field (price).

That will require modifying the HTML and possibly the jQuery used to manipulate the data.

Eric



Eric,

Somehow I have placed JQuery slider for one of my price filters, pls check below:

As far as I know, everything is done, values are getting, BUT unable to submit due to lack of knowledge of php , jquery stuff...

pls just make the url to submit.. (please check source code to know the slider script just before </head> tag..

Eric October 4th, 2012 09:31 AM

Hi

You need to remove the action attribute.

And you should probably change this:
HTML Code:

<input type="submit" value="GO" id="pricego">
To this:
HTML Code:

<input type="hidden" name="price"  id="pricego"><input type="submit" value="GO">
Eric

johngibb123 October 4th, 2012 11:47 AM

ok iam using below code now:

Quote:

<form method="get">

<div id="slider-range"></div>

$<input type="text" size="4" id="minprice"> - $<input type="text" size="4" id="maxprice" >

<input type="hidden" name="price" id="pricego"><input type="submit" value="GO">

</form>

d) Does method ="get" is a MUST?


after when I selected some values and then clciked "GO" button, Now iam getting URL as :


I have some queries:


a) Now products are displaying as per the range selected (check above url), BUT I wanna display products from low to high as soon as anyone selects Price Filter, so how can I achieve this..?

b) How its automatically got appended
Quote:

?price=
(i didnt understood this..)

c) How can I display "$" symbol in url..? I mean like this:
Quote:

?price=$268-$300
e) How can I clear "Price Filter" .. ?

Eric October 4th, 2012 12:29 PM

Hi

a. Add this to the form:
HTML Code:

<input type="hidden" name="sort" value="price" />
c. You can't. If you do the filter will break.

d. Same as clearing other filters mentioned in the "filters" thread.

Eric

johngibb123 October 4th, 2012 03:11 PM

Quote:

Originally Posted by Eric (Post 36070)
Hi

a. Add this to the form:
HTML Code:

<input type="hidden" name="sort" value="price" />
c. You can't. If you do the filter will break.

d. Same as clearing other filters mentioned in the "filters" thread.

Eric



Thanks Eric! :)

why my GO button doesnt look like button and textfieds do not look like textfields?

Eric October 4th, 2012 03:14 PM

Quote:

Originally Posted by johngibb123 (Post 36096)
Thanks Eric! :)

why my GO button doesnt look like button and textfieds do not look like textfields?

That's because of this line in your theme's css file:
Code:

input, textarea { padding: 5px; border-color: #ccc #efefef #efefef #ccc; border-width:1px; border-style:solid; margin-bottom:10px;}

johngibb123 October 4th, 2012 03:29 PM

Quote:

Originally Posted by Eric (Post 36097)
That's because of this line in your theme's css file:
Code:

input, textarea { padding: 5px; border-color: #ccc #efefef #efefef #ccc; border-width:1px; border-style:solid; margin-bottom:10px;}

ohh :eek: Should I remove that..? will there be any prob if i remove that? and BTW, in which css file it is..? (it seems i have many css files)

Eric October 4th, 2012 03:31 PM

Or add a CSS ID to your <input> elements and style them specifically.

johngibb123 October 4th, 2012 04:14 PM

Quote:

Originally Posted by Eric (Post 36101)
Or add a CSS ID to your <input> elements and style them specifically.

Whenever try to clear the price filter, it just removing price, BUT not sort .. (since I newly added sort to price filter.. how can i remove both at once while clearing price filter..?


BTW, whatever we add code inside 'module template', where that code will be..? I mean in which file.?

Eric October 4th, 2012 04:34 PM

HTML Code:

<a href="[server.url type='fullpage' query='-sort&-price']">[X] Remove sort and price</a>

johngibb123 October 4th, 2012 05:44 PM

Quote:

Originally Posted by Eric (Post 36106)
HTML Code:

<a href="[server.url type='fullpage' query='-sort&-price']">[X] Remove sort and price</a>

Thanks!

BUG:first select Brand filter and then select price filter, then brand filter will go away...
solution pls...

johngibb123 October 4th, 2012 06:20 PM

one more thing:

how to change colors for price filter widget name?

I just added in custom.css as:

Quote:

#allFilterNamesBlue {
color: #4A03FD;
}

and then appended this ID for "Custom CSS ID " under view --> view properties


What i did wrong..? I wanna change widget name colors..


b) Why my "FILTER BY BRAND" is just below "Categories"... ?


All times are GMT -5. The time now is 01:00 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.