Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Searching by Price

 

 


WEVOLUTIONS
User

Nov 12, 2008, 4:15 PM

Post #1 of 5 (463 views)
Shortcut
Searching by Price Can't Post

I am trying price_min and price_max to search my price listings but it is not working.

Note: I have a "$" in my price on the listings eg. $75,000.00 so will this cause the search to not function properly?

And if this is the case, what can be done to modify a price search with alpha numeric values?


Perchpole
User

Nov 12, 2008, 5:04 PM

Post #2 of 5 (460 views)
Shortcut
Re: [WEVOLUTIONS] Searching by Price [In reply to] Can't Post

My advice would be to avoid using any non-alpha-numeric characters. You can then "render" the "$" in HTML next to your CMSB output...


Code
 The price of this property is $<?php echo $record['price'] ?>


...sort of thing.

That way your search need only consider real numbers - not numbers and symbols. I've produced a 100+ product catalogue using this method and it works a treat.

:0)

Perchpole


sagentic
User


Nov 12, 2008, 8:56 PM

Post #3 of 5 (453 views)
Shortcut
Re: [WEVOLUTIONS] Searching by Price [In reply to] Can't Post

The values need to be all numeric, like this:

<option value="100000">$100,000</option>

You can definitely have a $ in your listings, but I would put in your html code where it shows up automatically instead of putting it in as a value.

Automatically place dollar signs, commas, and decimals with:

$<?php echo number_format($record['price'] ,2) ?>


The ",2" tells it to give two decimal places

The "number_format" tells it to treat it like a number to include comma separators.

Notice the "$" before the echo statement - that's just embedded into the code so it shows up automatically for every price.

On the backend, we just allow the user to enter in numbers.

So they would enter in 3456 (or 3456.00)

And what would be displayed is $3,456.00

If you plan on sorting by numbers, then use this:

'orderBy' => 'price+0 DESC',


That help?

Kenny


(This post was edited by sagentic on Nov 12, 2008, 8:59 PM)


WEVOLUTIONS
User

Nov 14, 2008, 11:16 AM

Post #4 of 5 (439 views)
Shortcut
Re: [sagentic] Searching by Price [In reply to] Can't Post

Thank you guys for that information. I will have to do some adjustments to my prices on the site.

Can you confirm whether a comma in the price will affect the search from working? Eg. 75,000


Dave
Staff / Moderator


Nov 14, 2008, 4:06 PM

Post #5 of 5 (431 views)
Shortcut
Re: [WEVOLUTIONS] Searching by Price [In reply to] Can't Post

Hi WEVOLUTIONS,

Yes, it will. You need all numeric values in the database. You can have the automatically formatted to display like that on the website though.

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4