MX Site Search Forum :: Multiple Parameter (again)

This thread was displayed: 315 times


Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.

For more information about the affected products visit: www.interaktonline.com/Support/

View Threaded Show descending
veeco
09-05-2006 14:44:35 GMT +2

Hello, i just bought MX Site Search, and i want to know 'temporary' solution to be able to use multiple dynamic parameter on the search result.  (which function to set/use)

I think it would be great if there's option to add additional field...

Thank you

Back | Reply | Quote | Top
Ionut MOICIANU
09-08-2006 15:38:20 GMT +2

Hello Viktor,

Unfortunatelly, we don't have a work-around for this feature. I am sorry.

Regards,
Ionut

Reply | Quote | Top
Letju
09-21-2006 02:23:01 GMT +2

 I was strugling to figure out a way to show a thumbnail image in my search results, then it hit me. Here is my work-a-round as it were:

Create your search with the "Title" field using the unique id for the item in the search table. In my case it is my item_id.

Create a element that uses the title to pull the item_id like the following, then create a recordset that finds the item you recieve for the results by finding the "item_id". This MUST be in the repeat region for the result, in the sample text, I put it in the same markup so it is easy to read. Then for your results put the fields you want to display in the results table.

< ? php do { */
$item_id = $row_rsSearchParts['title_cah'];

The query: "SELECT * FROM inventory WHERE inventory.item_id = '$item_id'";
?>


Sorry I could not post all the code, it tries to run it. If you can help me quote it, then I can post it better. If you need help with this or my tip just sucks to follow, please post and I will try and help.

OK,

There are some points that I may have forgot to mention to make the TIP work smooth. The tables you are searching, actually its a good tip for table structure, must have 2 identifiers. The first is the PRIMARY being say "id" and that is an auto incremented integer. The second is a UNIQUE item. This is the KEY to making the search work, and I feel it is best to have a structure like that anyways. The MX Search plugin will not allow you to select the PRIMARY item as a title lets say, but if you have a second unique item, that is just as good as the PRIMARY key. For my table, it is for a parts catalog. I have the table auto assigning the id, but have the part number as the UNIQUE "item_id". That "item_id" can relate to other tables in the database, for say sales history, etc. 

Now back to the results. You want to put the title as the UNIQUE item, and then test the results. You should get, like in my case, the "item_id" or whatever you called the field, as the title. This means you now can make more querys based on the info passed to title. The rest is simple. You want to look at the code, and see where the repeat region for the search results is. You will be doing all your work INSIDE that area. That way EACH time the query gives a new result, your additional querys and functions are run. So now you want to make a function that calls the title result so you can use it. Like this:

$item_id = $row_rsSearchParts['title_cah'];

Now you NEED this to be inside the php tags after the "php do { */" part. You can start new php tags or just put the code into the one at the start of the search results repeat region. Next add a recordset, this one is using the UNIQUE info passed as the title and now being called what you called it in the function above, in my case I called it "$item_id" as it is easier to problem solve if stuff is labelled what it is. :) So your query or possible mutilple queries can say something like " SELECT * FROM parts WHERE item_id = '$item_id' AND display = 'Yes' ORDER BY price ASC " for example. Test it to make sure the code is correct. You will not get results, just no errors is what we are looking for. Then click ok. Done right, wrong. The recordset is automatically added after the last query, which is usually above the < head > tag. Select the whole query block and move it to the code we added above. It MUST be after the added function otherwise it will not have the info to fill the query from the title results. This all stays in the php tags in the repeat region. You now can use that recordset or more if you need mutiple sources of information to create you search results. Layout is up to you, just has to stay in that repeat region. 

If you are still stuck, you can email me directly with your code, and I will take a look for you. It is pretty simple once you understan

View full message
Reply | Quote | Top
Fred at ExelWebs.com
07-01-2010 22:07:00 GMT +2

Here is my take on the issue.

It is based on some of the posts in this and other forums

http://www.interaktonline.info/article/57-Customise-the-search-results-for-MX-Site-Search.html

Reply | Quote | Top
MX Site Search 1.8.0
© Adobe Systems Romania. All rights reserved.