photo

Billie Raven

shared this question
6 years ago

Employees Involved

photo

PIV Support

Admin

Statistics

5
Comments
212
Views

Relates to

Share

Tags

1
votes

Search does not clear

Visitor to site chooses "Search Listings":

shows results (not very accurately, shows homes when land is selected) but...

my QUESTION is, once someone has searched, then goes back to "View All Listings" all it shows is the previous searched results,

no way to "CLEAR" search critera?

If I log out, refresh browser, visit site, click on View All Listings, all I see are those previous search results.

Add Comment

Comments (5)

photo Employee
1

You did not disclose the version of OR you are using. You always need to do that when requesting support here.

You would clear search criteria by revisiting the search page, and entering whatever new criteria you wish.

The search results page (a.k.a. view all listings) will always display what is set via the GET variables in its URL. These variables are either hardcoded in a link or set whenever you use the OR search page form. When you save and then revisit a specific search results page link you are also preserving the GET variables set in its URL.

This behaviour is not unique to OR and is exactly how any dynamically generated page that accepts form GET vars as input would operate.

If your search results are not being restricted to one property class, then whatever method you are using to arrive at that search result is either not passing a pclass[]=X GET variable, it is passing it without a value for X, or it is providing 2 pclass GET vars, one for homes and one for land:

e.g.:

&pclass[]=1&pclass[]=2

photo
1

I apologize.

OR version 3.2.5

I will try to understand what you said.

I want the ability to come to the site, click on View All Listings and see all listings.

If I return to the search page and select all criteria in attempt to get back to seeing all listings, I get 0 results because of course there are no listings which share all those criteria.

I will think about what you said about hardcoded links.. I would love to make that View all listings a hardcoded link that would actually lead to viewing all listings.

Thanks, as always, for your help.

photo Employee
1

You must have some sort of a custom search page because the default OR search page respects the property class selected (or passed) when you invoke it, and allows you to select a property class "all" being the default.

  1. http://yourdomain.com/index.php?action=searchpage

Otherwise you can hardcode a link to the search results page without passing any filtering GET vars which will return all listings:

  1. http://yourdomain.com/index.php?action=searchresults
  2. or
  3. {baseurl}/index.php?action=searchresults

If you want all listings for a specific class, pass it the pclass GET var:

  1. http://yourdomain.com/index.php?action=searchresults&pclass[]=X
  2. or
  3. {baseurl}/index.php?action=searchresults&pclass[]=X
(where X is the numeric ID# of the class desired)

For proper HTML validation, you would want to replace '&' with '&' in any hardcoded links you create.

photo
1

Lots of great information for me to digest.

Truly appreciative.. I'll keep you posted <- wow, just what you wanted..lol

photo
1

PIV Support wrote:

You must have some sort of a custom search page because the default OR search page respects the property class selected (or passed) when you invoke it, and allows you to select a property class "all" being the default.

  1. http://yourdomain.com/index.php?action=searchpage

Otherwise you can hardcode a link to the search results page without passing any filtering GET vars which will return all listings:

  1. http://yourdomain.com/index.php?action=searchresults
  2. or
  3. {baseurl}/index.php?action=searchresults

If you want all listings for a specific class, pass it the pclass GET var:

  1. http://yourdomain.com/index.php?action=searchresults&pclass[]=X
  2. or
  3. {baseurl}/index.php?action=searchresults&pclass[]=X
(where X is the numeric ID# of the class desired)

For proper HTML validation, you would want to replace '&' with '&amp;' in any hardcoded links you create.

I can't seem to post .. I broke forum

I'll try again. I have exactly the hardcode as you have above, no custom search page, but before I ever searched, I could click on View All Listings and see... all listings, without the search criteria above. I cannot get back to that display which I had used a custom style sheet for cosmetics which was beautiful but now gone forever so it seems.

thanks as always.

Leave Comment

photo

Attach files...

The file must be a jpg, gif, png, bmp, ico, pdf, doc, rtf, txt, zip or rar no more than 20M