Hi guys, i am trying to make the category selection in the search page choose a category>subcategory like in item-post.
this code makes it select only the main category:
function osc_categories_select_sahara($name = 'sCategory', $category = null, $default_str = null) {
if($default_str == null) $default_str = __('All Categories');
if(is_array($category)) $category['pk_i_id'] = $category[0];
CategoryForm::category_select(Category::newInstance()->findRootCategories (), $category, $default_str, $name);
}
can anyone help me modify it to select a subcategory after main category like in item-post and allow the user to leave the subcategory blank if only interested in main category?