[image] problem with build a simple category

10 posts by 2 authors in: Forums > CMS Builder
Last Post: January 16, 2009   (RSS)

By esupport - January 9, 2009 - edited: January 9, 2009


Dear sir
We have problem with Category. Here is our category structure:

[img]http://www.esupport.tw/_pj/tfh/our_catetory.jpg[/img]

¡DWe hope when we click Top category image into sub category. when click sub category image. It would next to product detail.
But we have problem in our category. When we click Top category , There are only "<?php echo $selectedCategory['name'] ?>" and "<?php echo $selectedCategory['content'] ?>" in every record. We hope every Top category image we click. All sub category image is in the page.

Here is our way:
We tried to build the Top category to be a simple .html page and give each image link for "productList.php" to be subcategory and "productDetail.php" to be product detail. But we have Main category before Top category and there are 3 or 4 level in our customer website. so that is not good way for this.

Hope someone who know how to do it.
and wish CMS Builder can do it.
Thank you very much from my all.
Have a nice working day!

-JH
-Jax H.
Attachments:

our_catetory.jpg 116K

Re: [JH] [image] problem with build a simple category

Dear sir

is there any one who can reply me?
I hope that is normal category here. but that is a problem for us..

Really hope the CMS Builder expert who can solve the problem.
Thanks a lot from my all!

-JH
-Jax H.

Re: [JH] [image] problem with build a simple category

By Dave - January 13, 2009

Hi JH,

I responded via email as well:

Do you have an url for the pages you have working so far?

Basically, in the body of the second page (which lists a1, a2, etc) you want to loop over the category records again, and only show records who have a parent of $selectedCategory['num']. In that way you'll be listing the child record of the selected category.

Something like this:
<?php foreach ($categoryRecords as $record): ?>
<?php if ($record['parent'] != $selectedCategory['num']) { continue; } ?>
...
<?php endforeach ?>


Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] [image] problem with build a simple category

Hi Dave

Thanks for your kindly reply.

I send my link for you via email.

Please kindly check it.
Thanks a lot!

-JH
-Jax H.

Re: [Dave] [image] problem with build a simple category

hi Dave

Thanks for your help. Here are two part I tried
1)
I tried to add 'loadUploads' => true[/#ff0000], in my "viewer_functions.php"
All the recode show "Array"

2)
I tried to add the code you told me below:


[font "·s²Ó©úÅé"]<?php foreach ($categoryRecords as $record): ?>


[font "·s²Ó©úÅé"] <?php if ($record['parent'] != $selectedCategory['num']) { continue; } ?>

[font "·s²Ó©úÅé"]...

[font "·s²Ó©úÅé"]<?php endforeach ?>
I got error message is "Undefined index: parent..." Do you know what's problem there?

Maybe here is on upload function in now. because of our customer required and the time is tight.
I really need to make a category below:
[img]http://www.esupport.tw/_pj/tfh/our_catetory.jpg[/img]

Here is my question :
3) If I want to create a category like this, is it possible to do with CMS Builder right now? or do you have any useful suggestion in doing the work?
4) If you are still processing the new category function. Is it possible finish within a week?

I feel sorry to bother you so much.
but I really need your useful suggestion for the work.
Really hope the work run smoothly
Thank you very much!

- JH
-Jax H.

Re: [JH] [image] problem with build a simple category

By Dave - January 15, 2009

Hi JH,

Try this instead:
<?php if ($record['parentNum'] != $selectedCategory['num']) { continue; } ?>

What you want to do is possible, but is going to take a little custom coding to filter out all but the records you want.

You either need to give yourself time to figure it out or the budget to have consulting do it.

My advice is break it down step by step. First create some mockup data in the database to match what you have in the screenshots. Then create 3 viewers, one for each of your screens shown. Then focus on them one at a time.

For the first one you need to only show the top level categories, so you might want to filter out so of the menu items by depth like this:

<?php if ($record['depth'] > 0) { continue; } ?>

This format that you have is a bit for complex to create.

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

Re: [Dave] [image] problem with build a simple category

hi Dave

I am not a professional programer.
That is a little bit harder for me to do it.
Hope the problem is simple.

I just send my requiry to Ross.
I hope you and your team can help me that.

Thanks a lot!

-JH
-Jax H.

Re: [JH] [image] problem with build a simple category

By Dave - January 16, 2009

I hope so too, we'll make a look and get back to you via email.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] [image] problem with build a simple category

hi Dave

I just send my inquiry to consulting@interactivetools.com

Please kindly check it and thanks for you kindly reply.

Thanks a lot!

-JH
-Jax H.