close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Improve current search capability

Thread began 1/02/2013 8:15 am by FrankJay | Last modified 1/07/2013 12:44 pm by Jason Byrnes | 1948 views | 7 replies |

FrankJay

Improve current search capability

Greetings,
I have built admin pages using data bridge and included search functionality on the products results page.

I would like to include some functionality to the search form to improve the user experience. The form currently has four search fields, namely: bicycle brand, bicycle category, bicycle subcategory and bicycle name options.

I would like to apply some form of filtering as follows. Should the user select a specific bicycle brand, then the remainder of the search fields should list only the relevant records and specific records.

I have no idea how to accomplish this and would appreciate a step-by-step process and workflow how to achieve this functionality.

Find attached the search page.

Much appreciated and thanks in advance.

Best regards
Frank

Attached Files
kpc_bicycles_search.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the brand, category, and subcategory tables would need to have some way of relating to each other.


you could then use Dynamic Dropdowns which is a part of Data Bridge to filter the other select lists on the page based on the selected brand.

how are your tables defined?

How are you relating a specific brand to a category? or subcategory?

Sign in to reply to this post

FrankJay

Database tales

Hi Jason
I have three tables as follows:

kpc_brand
id
name
image
description

kpc_category
catID
brandID
catName

kpc_sub_category
subCatID
parentBrandID
parentCatID
subCatName

Can I use the generated search page or would I need to create a new search page to achieve this functionality.

How would I invoke the dynamic dropdowns in data bridge and what would be the process to achieve the results I desire?

Are there any tutorials that I can familiarise my self with?

Thank you

Sign in to reply to this post

Jason ByrnesWebAssist

create 3 recordsets:


rsBrands:
SELECT id, name FROM kpc_brand

rsCategories:
SELECT catID, brandID, catName FROM kpc_category

rsSubCategories:
SELECT subCatID, parentBrandID, subCatName FROM

set the Brands select list to be dynamic, and to use the id column for the value, and the name column for the label.

in the server behaviors panel, click the plus button, and select WebAssist -> Dynamic Drop Downs -> Create Dynamic Array.

for the recordset, selct rsCategories. Set the parent ID to the brandID column, the Child ID to the catID column and the Child Name to the catName column.

repeat this again, this time select the rsSubCategories recordset. set the parent ID to the parentBrandID column, child id to the subCatID column and child name to the subCatName column.


in design view, select the brand list. In the behaviors panel (note: not server behaviors) click the plus button and select WebAssist -> WA Dynamic Dropdowns -> Populate list from array. Select the rsCategories array. for the parent list, selct the brands list, and the child list, select the categories list.

repeat this step and this time use the rsSubCategories array, and set the child list to the sub categories select list.


NOTE: your original search page passed the brand, category and subcategory names. this new search page will p[ass the ID's instead. Your results page will need to be changed to make use of the ID values instead of relying on the names.

Sign in to reply to this post

FrankJay

Moving Forward

Thank you Jason,

Your detailed step-by-step process will certainly put me in the right direction to move forward. Highly appreciated.

Just to clarify and make sure I understand correctly. I will first make backups of my current search and results pages. I presume then that on the existing search page I will follow and implement your process.

Is this correct?

I will provide feedback on the outcome of the implementation.

Best regards
Frank

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that is correct.

Sign in to reply to this post

FrankJay

Results of implementation

I've created the three recordset's and for rsBands I also selected name as I needed this column for the label.

The search page is working fine when I click on a brand, it only displays the relevant categories. However, the subcategories displays all records for that specific brand and not the subcategory records based on the category selected.

Is it possible after the brand has been selected as well as the selected category that these subcategories displayed will only be related to the category selected?

Will this new search form be updated automatically on the results page?


With reference to the results page changes, should I substitute ['Name'] with ['id'] for the brand name option values; and ['CatName'] with ['CatID'] for the category name option values; and ['SCatName'] with ['SubCatID'] for the sub-category name option values?

Should I also change in the bicycles results section change as follows:
FROM
<td class="WADAResultsTableCell"><?php echo($row_WADAkpc_bicycles['BicycleBrandName']); ?></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAkpc_bicycles['BicycleCatName']); ?></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAkpc_bicycles['BicycleSubCatName']); ?></td>

TO
<td class="WADAResultsTableCell"><?php echo($row_WADAkpc_bicycles['BicycleBrandID']); ?></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAkpc_bicycles['BicycleCatID']); ?></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAkpc_bicycles['BicycleSubCatID']); ?></td>

Appreciate your help Jason

Attached Files
search-results-changes.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...