close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Dynamic Menus

Thread began 7/10/2010 8:27 pm by nathan | Last modified 7/13/2010 5:32 pm by Eric Mittman | 2231 views | 8 replies |

nathan

Dynamic Menus

Okay...so far I am doing okay. I managed to set up my menus dynamically. I have four (4) different categories of menu choices. I managed to get them to dynamically pick out the subcategories of menus. However, I am having issues while clicking on the subcategories. I am using data assist and have the tables set up.

What do I need to do to show the products that are under a subcategory. I want the customer to click on subcategory menu and see a list of products listed under that subcategory. I am not sure what to do here. Right now, when I click a subcategory menu, I keep getting the same search results (when I use the search page). In other words, no matter what subcategory I choose, it shows the most recent search results. Here is what I am linking the menu to (dynamically): /product_results.php?productsubcategoryID=[productsubcategoryID]

That is wrong I am sure.

I have created data assist pages for searching products (product_results.php, product_details.php & product_search.php). Do I need to create a data assist page that lists out the products? I am clueless here. Does eCart come into play here?

I am trying to do everything dynamically, since client has a lot of products to list.

Sign in to reply to this post

Eric Mittman

I think that your approach is correct, however if you are getting the same results everytime then it would indicate that you are not triggering a new set of results on the results page. How do you have your DataAssist Search server behavior set up on your results page currently? Look at the trigger, rather than being set to something like the posted submit button it should be triggered on your URL parameter, productsubcategoryID. This would look like this in the code:

php:
$_GET['productsubcategoryID']



So long as you have the trigger set like this and have the search criteria properly set to look at the subcategory column where the subcategoryID is equal to the $_GET['productsubcategoryID'] value it should return the results for that matching sub category. If you have any further trouble with this post back with a copy of your results page in question in a zip archive and include an example link that I can check on it with.

Sign in to reply to this post

nathan

Still a little clueless

I am not sure where to look on the product_results.php page in server behavior area. I can get into the server behavior area and I see DataAssist Search(WADAproduct). I look at the trigger and it shows: isset($_GET["Search_x"]) && $_GET["Search_x"]

I am new with the database stuff, so this is a little foreign to me. In addition, what results page do you need? Do you need the one that shows up when I try to click on the subcategory I am trying to get into? What do you mean example of link?

Sorry for the newb questions, but you guys are really helping me.

Sign in to reply to this post

Eric Mittman

It sounds like you are getting into the correct server behavior on the results page. Since the trigger is set to Search_x this means that you will only trigger a new search when there is a parameter of Search_x in the URL when you visit this results page.

Since you are passing only the subcategory in the link to this page you are not triggering a new search and will instead get the results from the last time the search server behavior was triggered.

To get it working correctly you will need to add the Search_x parameter to your links that have the subcategory. What I meant by an example link is one that you are using that is taking you to the results page with the old search results present. The URL should have the subcategory id in it, if you add in the Search_x parameter it should trigger a new search based on the values you are passing in from the URL.

If you have any further trouble with this please post back with the results page in question that has the DataAssist Search server behavior on it in a zip archive.

Sign in to reply to this post

nathan

Still trying the dynamic menus

Eric...

I appreciate your assistance, but I am still lost. I have attached a .zip file of the products_results.php code, as well as HelperPHP.php that was part of the products_results.php page.

An example URL that pops when I try to select a subcategory on index.php page is as follows: product_Results.php?productsubcategoryID=1

The site is on my computer with testing server "localhost"

Also, where do I add the Search_X parameter to trigger the new search?

Again, I am learning this mySQL, php stuff on the fly here.

Thanks for your help. I do appreciate it.

Attached Files
product_Results.zip
Sign in to reply to this post

nathan

Maybe I got it working

Eric,

I saw this posting: showthread.php?t=2446&highlight=set+search+trigger

I think that it may have helped. Here is what I did:

I did a search with my search page to look in a certain subcategory. The results page URL was as follows:

product_Results.php?S_productname=&S_productsubcategoryID=1&Search.x=65&Search.y=3&Search=Search

In the CSS Menu Writer "Edit contents" I placed the following in the link box: /product_Results.php?S_productsubcategoryID=[productsubcategoryID]&Search.x=54&Search.y=12&Search=Search

And IT WORKS!!!

Question...will those Search.x=54 and Search.y=12 gonna mess anything up? Is there a generic character to put in those or will it matter?

Sign in to reply to this post

nathan

Short lived victory

Alright, when I thought I conquered...but I am wrong.

I attempted to set up the dynamic menu with the second category...and it didn't like it. I am using the same subcategory setup, but with different subcategories that are listed with the second category but I am getting an error message. See the attached PDF file for that error.

I also attached a .zip with the menu.php that the error is referring to.

Am I not allowed to set up a dynamic menu with a 2nd category and pulling products out subcategories.

If this is possible, how do I filter out a certain range of productsubcategoryIDs (ie. 5-17)

This dynamic menu mess is holding up the progress of my client's website.

Thanks for your continued help and support. It is appreciated.

Attached Files
Home Page.pdf
menu.zip
Sign in to reply to this post

nathan

Eric,

Got some updates for you

Originally Said By: nathan
  In the CSS Menu Writer "Edit contents" I placed the following in the link box: /product_Results.php?S_productsubcategoryID=[productsubcategoryID]&Search.x=54&Search.y=12&Search=Search

And IT WORKS!!!

Question...will those Search.x=54 and Search.y=12 gonna mess anything up? Is there a generic character to put in those or will it matter?  



Reference to above thread: On the Search.x=54 and Search.y=12, I changed the values to 1. Is that okay? It seems to work and I get the results I want.

Originally Said By: nathan
  Alright, when I thought I conquered...but I am wrong.

I attempted to set up the dynamic menu with the second category...and it didn't like it. I am using the same subcategory setup, but with different subcategories that are listed with the second category but I am getting an error message. See the attached PDF file for that error.

I also attached a .zip with the menu.php that the error is referring to.

Am I not allowed to set up a dynamic menu with a 2nd category and pulling products out subcategories.

If this is possible, how do I filter out a certain range of productsubcategoryIDs (ie. 5-17)

This dynamic menu mess is holding up the progress of my client's website.

Thanks for your continued help and support. It is appreciated.  



Reference to the above quote: I may have solved my problem. Instead of using Menu Writer to create a dynamic menu for the second category, I went into menu.php and copied & pasted the code from the GPS category and placed it into the Avionics category. I also changed the "WHERE productsubcategoryID<=4" to "WHERE productsubcategoryID>=5 AND productsubcategoryID<=17". It all seems to work.

Please look at previous posts to see if I am on the right track. Everything is working on my testing server (localhost on my PC). There shouldn't be any problems transferring to hosting server at later time with the stuff I am doing here, right? (as long as I keep saving everything...lol).

Again, thanks for your assistance. I am sure I will have more questions later.

Sign in to reply to this post

Eric Mittman

In regards to the values that you are using for the search.x and search.y it should not matter. Normally these values come from the button that was pressed, when you use an image to submit a form the coordinates of where you clicked on the image are passed with the name of the image and .x or .y. So you are just simulating a click of the search button by having this in the link.

As for editing the menu file directly this is definitely the way to go for adding in the parameters for the links. So long as you are getting to the results page with the correct results displaying for the category and sub category it seems that you have it worked out.

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