Category not working as intended

15 posts by 2 authors in: Forums > CMS Builder
Last Post: February 3, 2009   (RSS)

Re: [misery217] Category not working as intended

By Dave - February 2, 2009

The trick is to break it down page by page and figure out what you want each page to do. Then knock off the items (or requirements) one by one.

My guess is you want that next page to show all the records that are children of the selected record number (which is in the url). Your code probably will look like this:

$parentNum = getNumberFromEndOfUrl();
...
"where" => " parentNum = '$parentNum' ",

You need to put the parentNum = part a little higher above the getRecords() call though.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

By misery217 - February 2, 2009

wow Dave, i appreciate your patience on this. So after further inspection, here's what should be happening.

On the main categories page:
http://209.62.14.161/products/furnlistList.php
Should list the categories, as mentioned before.

Now, when clicking on a category, it should, in theory, go go another "furnlistList.php" page to list the subset of categories in each. However, it is at present going directly to the "furnlistDetail.php" page, whether there is a product in there or not. (Very confusing!!!)

So, when there is an actual product in the Main Category page, clicking on it will bring up the Details page as expected (not wanted from this main list, but what have you.

Normally, if you clicked on a category with no products in it, you would go to the obligatory "No Record Found" entry, but this isn't happening... The furnlistDetail.php page is being listed as if there is a product there, when nothing even exists!!

For the record, I took the Square Table Product out and re-inserted it to no avail....

This is just that seems to just miss the intention...

Re: [misery217] Category not working as intended

By misery217 - February 2, 2009

Yes, it's killing me.

there are no "sub-categories" being created, regardless of what i try in the Admin.... I've been a huge fan right up until this moment...

Re: [misery217] Category not working as intended

By Dave - February 3, 2009

Hi misery217,

If you figure out how you want it to work (how many pages, what each page should display, etc) I can point you in the right direction.

Another option would be to get some consulting time and have one of our guys either do it directly or train you on it. The program doesn't create this layout of pages that you need automatically so it takes some extra work to figure it all out.

One thing to check would be that you're not filtering with 'where' => " depth = 0 ", on your subcategory pages because that would only show root categories.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com