Filtering getCategories using a checkbox = 1 or Yes

5 posts by 3 authors in: Forums > CMS Builder
Last Post: March 31, 2016   (RSS)

By Toledoh - March 24, 2016

Hey Zicky.

Rather than equal to something, have you tried something like the following - which in my way of thinking says... if record is not blank.

<?php if ($categoryRecord['vegetarian_menu_item'] ):?>

BTW.  I'm interested in what you're building.  I've got a project in the to-do pile that's a menu builder for a restaurant.  Let me know if it's something you can discuss. tim at toledoh dot com dot au.

Cheers,
Tim (toledoh.com.au)

By Damon - March 31, 2016

Hi Zicky,

Just following to see if you and Tim were able to come up with something.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Zicky - March 31, 2016

Yea - the solution was so simple.

All the code was good - the problem was me. I forgot to check the top-tier parent categories as vegetarian, because they include vegetarian meal items.

Since the second tier children require the parent to exist as vegetarian - well the children did not appear. Setting the parent top tier to vegetarian displayed all the second tier vegetarian menu items, because they are dependent of the parent per the line of code below.

<?php if ($categoryRecord['parentNum'] == $parent): ?>

Stupid me  : )

By Zicky - March 31, 2016

Tim,

Once I finished getting the menu built I'll pass on what I have worked up.