Jump to content

Alternative to use tools::getValue with object


Recommended Posts

Hello,

I am new with web development bu I succeed to devlop some small modules. 

My question is the usage of object in tpl files like for example the HelperTreeCategories. This code in getContent function work and display the category tree in the form :

$categories = new HelperTreeCategories('categories-tree', $this->l('Check the category to display the link'));
  $categories->setUseCheckBox(1);
  $this->context->smarty->assign('categories', $categories);
 
Now I have to retrieve the selected categories with this code in processConfiguration function :
 
$categories = Tools::getValue('categories');
   var_dump($categories);
   echo('<script>alert("ceci");</script>');


The result after submit is false. This normal because $categories is not a string but is there a way to get the values of the categories object submitted ?
 
Thanks for helping me.
Jean
 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...