Support Forums

Search By Date

This is a discussion on Search By Date within the Technical Support forums, part of the Technical Support Forums category; v4.2.1 Developer default template Dear Friends ! , I need to create an extra field for a date, and want ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

Reply
 
Thread Tools Display Modes
Old 01-10-2011, 01:40 PM   #1
Customer
 
Join Date: Apr 2006
Posts: 4
Rep Power: 0
julyrod is on a distinguished road
Default Search By Date

v4.2.1 Developer

default template


Dear Friends ! , I need to create an extra field for a date, and want it to be searchable. I did a test, but the search was always empty.

Can you please explain, how does a date works ( when doing a search )

Thanks !
julyrod is offline   Reply With Quote
Old 01-10-2011, 02:35 PM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,366
Rep Power: 135
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

when you create an extra field you need to make sure its set as searchable. If thats done then it will only appear on the search page once a category is selected.

The reason it works that way is because extra fields can belong to only certain categories and it doesnt make sense to display an extra field for a category that doesnt have them.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 01-10-2011, 03:53 PM   #3
Customer
 
Join Date: Apr 2006
Posts: 4
Rep Power: 0
julyrod is on a distinguished road
Default

Correct !,

"when you create an extra field you need to make sure its set as searchable. done !
If thats done then it will only appear on the search page once a category is selected." Yes !

The date search field appears on the search page after selecting the specific category.

Its format is " like a " date range..

when we input the exact date we used on the ad, and press search..

The system does not find results. That is our doubt.

Thanks in advance.
julyrod is offline   Reply With Quote
Old 01-10-2011, 04:50 PM   #4
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,163
Rep Power: 64
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by julyrod
Correct !,

"when you create an extra field you need to make sure its set as searchable. done !
If thats done then it will only appear on the search page once a category is selected." Yes !

The date search field appears on the search page after selecting the specific category.

Its format is " like a " date range..

when we input the exact date we used on the ad, and press search..

The system does not find results. That is our doubt.

Thanks in advance.
Have you modified your search template file (or the ajax.php), because that is not the default way to search on a date field. Normally, if you select a category with a searchable date field, you get two input date fields, from <date field> to <date field> and when you click on the date field (focus), it pops up the javascript date calendar to select the date.

It is done this way to ensure the input is correct as dates are tricky when stored. If they aren't input in the exact same format as they are stored, you will never get a match. (e.g. 2011-01-07 does not equal 1-7-2011) In addition, although a date may be displayed as 01-07-2011, it might not be stored that way in the db, because it may have been formatted to display in a different way.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 01-10-2011, 04:56 PM   #5
curmudgeon
 
Join Date: Mar 2006
Posts: 5,366
Rep Power: 135
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

When you create an "extra field" of type date THAT is the field you will be searching on NOT the date the ad was placed.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 01-27-2011, 08:41 PM   #6
Customer
 
Join Date: Apr 2006
Posts: 4
Rep Power: 0
julyrod is on a distinguished road
Default

Hi !,

In the demo website > animals & pets, there is a date field: the alligator's date of birth (dob)

I went to the administration with demo/demo, and made this field searchable.

Then in the front end, tried to look for it with the search option... and got no results..

Last edited by julyrod; 01-30-2011 at 09:42 PM.
julyrod is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra date field not coming up in search slappy5150 Technical Support 1 11-26-2009 06:52 AM
Date format in search results goose Technical Support 2 09-10-2007 06:04 PM


All times are GMT -4. The time now is 05:48 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0