Support Forums

Search on Showlisitngs.tpl

This is a discussion on Search on Showlisitngs.tpl within the Technical Support forums, part of the Technical Support Forums category; Hi, I'm trying to place the search on showlisings.tpl, I found this post in the forum http://www.68classifieds.com/forums/...ry-search.html . selectedCat( 1 ...


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

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 08-15-2009, 02:13 PM   #1
Customer
 
Join Date: Jun 2009
Posts: 127
Rep Power: 11
pipelin is on a distinguished road
Default Search on Showlisitngs.tpl

Hi,

I'm trying to place the search on showlisings.tpl, I found this post in the forum Preselected Category for Search.

selectedCat(1); //where 1 is the category pre selected.
function selectedCat(type){
$("#response").show()
$.ajax({
url: 'ajax.php',
data: 'action=extra_listing_fields&do=search§ion=' + type,
type: 'post',
success: function (msg) {
$("#response").html(msg);
}
});
}

Because the showlistings show the list from the category selected I want to change the 1 to variable category selected by the user.

For example if the user selected category house, I want the variable where is house stored to get the extra fields.

Someone know which is the variable?

Last edited by pipelin; 08-15-2009 at 02:19 PM.
pipelin is offline  
Old 08-16-2009, 04:52 AM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,229
Rep Power: 80
seymourjames is a jewel in the rough
Default

Are you saying you want to have a full search on the showlistings page? Like this example where a search has already been carried out which happened to be empty.

Search Results

You however always want it to show on every show listing page whether it is a search or a category listing?
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 08-16-2009, 09:58 AM   #3
Customer
 
Join Date: Jun 2009
Posts: 127
Rep Power: 11
pipelin is on a distinguished road
Default

I use other_search.tpl with a little modify and yes this is for category listing. For example if the user select the category Apartments for rent, be able to refine his search in different ways. Because I assume there are hundreds of apartments into the category. The Refine Search could be like the attachment.
Attached Images
File Type: png ScreenShot002.png (15.7 KB, 9 views)

Last edited by pipelin; 08-16-2009 at 10:26 AM.
pipelin is offline  
Old 08-16-2009, 01:17 PM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,229
Rep Power: 80
seymourjames is a jewel in the rough
Default

I understand except what other _search.tpl? I think you are misreading this other post. I am unaware that this will give you what you want on your showlisting page.

At the end of the day you are going to need the code from search.php in one form or another. Preferably one which is embedded within a module of some type that can be placed into your showlisting file.

It seems to me you basically needed our old global search module which we no longer offer or support with just the category primed that you are in. The problem however is that the showlistings.tpl file is used not just for categories but for displaying the results from searches, toplistings, latest listings, etc. You would therefore need this type of module and a test to know that you are in a category and not showing any other type of search results.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 08-16-2009, 01:30 PM   #5
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,256
Rep Power: 67
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

I don't know what your "other_search.tpl" actually is, however what I do is simply modify the drop down select field for the categories to automatically capture the category IF you are in one and it will preselect it. Otherwise if you are on a page from search results that isn't category specific it will simply default back to "Search all"

PHP Code:
<select name="type" id="type">
    <
option size="50" value=''>{$smarty.const.LANG_SEARCH_ALLCAT}</option>
        {foreach 
from=$getcats item=cat}
            <
option size="50" {if $cat.parent_id == 0}class="parent" {/if}value="{$cat.id}"{if $smarty.get.cat==$cat.slugSELECTED{/if}>{$cat.name}</option>
        {/foreach}
</
select
The key is the additional smarty if statement: {if $smarty.get.cat==$cat.slug} SELECTED{/if}

(Credit to Eric for helping me with this code)
__________________
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  
Old 08-16-2009, 06:20 PM   #6
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,229
Rep Power: 80
seymourjames is a jewel in the rough
Default

Thanks Mike. I am looking to dig the module up and will use that for capturing the category.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Engine Promotion and Search Engine Optimisation Services. martini55 Site Marketing 2 08-22-2009 02:22 PM
Modification: Display Search String on Search Results Page jonahcoyote Modules / Plugins / Modifications 22 07-26-2008 06:08 AM


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


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