Hello all,
I am an independant programmer trying to stir up some code for creating a radio button attribute giving a choice between the list of product categories in the SQL database. CATEGORY_SELECT from SlideBox 1.4 (for 1.3.9) is the basis for this, but somehow this seems incompatible with 1.5.0.
I thought creating code like:
Code:
$cMain = (defined('CATEGORIES_START_MAIN') ? CATEGORIES_START_MAIN : '0');
$indent = ' '; // indents the category list below the "Select" line
$categories_query = "select c.parent_id, c.categories_id, cd.categories_name, c.categories_status
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where parent_id = '" . (int)$cMain . "'
and c.categories_id = cd.categories_id
and c.categories_status=1
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
order by sort_order, cd.categories_name";
$categories = $db->Execute($categories_query);
and then walk through the elements, creating radio button (or a dropdown or...) should do the trick.
It doesn't, and at this moment, after a day of trying, I can't figure out why. It works fine in 1.3.9. and there is no reason to not work in 1.5.0
Any hints ?
- Jarlee
Bookmarks