close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Products button to show ALL Categories

Thread began 7/22/2015 4:32 pm by Charles | Last modified 8/24/2015 1:45 pm by Ray Borduin | 560 views | 13 replies |

Charles

Products button to show ALL Categories

I have the 'Products' dropdown menu and products_results and products_detail working fine - see http://outofchaos.net/gsc/www/index.html
However if you just click the 'Products' button itself and not one of the dropdown options, it yields a dead result, I'd like it to link to a page that showed all categories something like http://outofchaos.net/gsc/www/products_results.php?Category_ID=?ALL? but I'm not sure what the syntax is that would yield the ?ALL? Could you suggest what it should be? Thank you

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of the results page you are using. I'd have to take a look at how it works to suggest how to get an ALL link implemented.

Sign in to reply to this post

Charles

Here's a link and file is attached: http://outofchaos.net/gsc/www/products_results.php?Category_ID=32
Thank you!

Attached Files
products_results.php
Sign in to reply to this post

Ray BorduinWebAssist

Remove the where clause from the query and add the Category_ID column search to the DataAssist Search server behavior. The DataAssist Search will automatically ignore columns that aren't in the filter.

So line 114 becomes:
$query_WADAproducts = "SELECT category.Category, ID, Small_pic_Name, Product_Name, Product_Name, Description, Color FROM products INNER JOIN category ON category.Category_ID = products.Category_ID ORDER BY Product_Name ASC";

and then you add this to line 23:
$WADbSearch1->addComparisonFromEdit("products.Category_ID","Category_ID","AND","=",0);

Then a link to a category could be: product_results.php?Search=1&Cateogry_ID=3

and a link to show all categories would just be: product_results.php?Search=1

Sign in to reply to this post

Charles

Almost. I found not to get an error, I had to adjust your suggestion for line 144 to $query_WADAproducts = sprintf("SELECT category.Category, ID, Small_pic_Name, Product_Name, Product_Name, Description, Color FROM products INNER JOIN category ON category.Category_ID = products.Category_ID ORDER BY Product_Name ASC" - I think you were mississing the 'sprinf'
I added the line 23
Not sure I understood how much of the Where clause to remove? I removed from line 11 - $WADbSearch1_DefaultWhere = "";
File is attacheed with the above changes
So now I am getting all products/all categories for all products_results.php??? pages - not filtering by category in the dropdown.
What am I missing? Please advise or perhaps correct the attached file.
Thank You!

Attached Files
products_results8-6changes.php
Sign in to reply to this post

Ray BorduinWebAssist

Do you have a url where I can reproduce the problem? I need to see if it is an issue with the search or results page and seeing it in action may help.

Sign in to reply to this post

Charles

See PM

Sign in to reply to this post

Ray BorduinWebAssist

You have to add "&Search=1" to the URL. Then it will know to do the search and it seems to work.

Sign in to reply to this post

Charles

I can see that when I add "&Search=1" to the URL manually in the address bar, that it does yield a correct Category-filtered result, but I'm not sure where in the code of products_results.php to insert it so it automatically generates that correct URL. Tried a few places, but didn't work. Could you point me to where it should go? Reattaching file. Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like the menu links come from:
CSSMenuWriter/cssmw3/menu.php

you would add the url parameter to the links in that file.

Sign in to reply to this post
loading

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...