Hi,
I'm not sure what you mean by "We need a fully functional tree as when we edit products in backend.". Are you talking about a category selector like the "categories" setting when you edit a product ?
If it's this, you can use code like this:
$this->nameboxType = hikashop_get('type.namebox');
echo $this->nameboxType->display(
'data[product][categories]', // this is the name of the input which you'll be able to access in the $_POST
$categories, // this is the value already selected
hikashopNameboxType::NAMEBOX_MULTIPLE,
'category',
array(
'delete' => true,
'brand' => false,
'sort' => true,
'default_text' => '<em>'.JText::_('HIKA_NONE').'</em>',
'tooltip' => true,
)
);
Or are you talking about the category explorer on the left side of the products listing ?
Displaying the explorer can be done with code like this:
$tree = hikashop_get('type.categorysub');
echo $tree->displayTree('product_listing', 0, array('product','vendor'), true, true, $currentCategoryId, $urlWhereToRedirect);
where $currentCategoryId is the id of the current category and $urlWhereToRedirect contains the URL where you want the explorer to go when a category is selected. It will add to it the parameter &filter_id=xxx where xxx is the id of the category selected.