Jump to content

Edit History

zenerry

zenerry

4 hours ago, Knowband Plugins said:

Can you please try this one.


$selected_cat = Product::getProductCategoriesFull($id_product, $id_lang);
$root = Category::getRootCategory();
$tree = new HelperTreeCategories('kbmp-categories-tree');
$tree->setRootCategory($root->id)
    ->setInputName('kbmp_allowed_categories')
    ->setUseCheckBox(true)
    ->setUseSearch(false)
    ->setSelectedCategories((array) $selected_cat );
return $tree->render();

 

You're really really great man.

It works but it brings out this errors, do you know what are they?

Notice en línea 138 en archivo C:\\xampp\\htdocs\\PS\\classes\\helper\\HelperTreeCategories.php
[8] Array to string conversion

Notice en línea 138 en archivo C:\\xampp\\htdocs\\PS\\classes\\helper\\HelperTreeCategories.php
[8] Array to string conversion

Notice en línea 138 en archivo C:\\xampp\\htdocs\\PS\\classes\\helper\\HelperTreeCategories.php
[8] Array to string conversion

Warning en línea 142 en archivo C:\\xampp\\htdocs\\PS\\classes\\helper\\HelperTreeCategories.php
[2] Illegal offset type

 

 

Now, I only need to capture the selected value.
Could you give me any tip?

 

Thanks for your time.

zenerry

zenerry

2 hours ago, Knowband Plugins said:

Can you please try this one.


$selected_cat = Product::getProductCategoriesFull($id_product, $id_lang);
$root = Category::getRootCategory();
$tree = new HelperTreeCategories('kbmp-categories-tree');
$tree->setRootCategory($root->id)
    ->setInputName('kbmp_allowed_categories')
    ->setUseCheckBox(true)
    ->setUseSearch(false)
    ->setSelectedCategories((array) $selected_cat );
return $tree->render();

 

You're really really great man.

It works!

 

Now, I only need to capture the selected value.
Could you give me any tip?

 

Thanks for your time.

×
×
  • Create New...