Jump to content

category tree in module


jiro

Recommended Posts

Hello,

 

I want to adapt one of modules from presta 1.5 to presta 1.6 but I have a problem with category tree in it. There should be a possibility to check some categories and modules should remember those checks... but in my case it doesnt do that. I can check all but after saving all checks disappear.

 

There is a code of categories from this module:

 

 

    if (Tools::isSubmit('submit')) {
            if (Tools::getValue('categoryBox') && count(Tools::getValue('categoryBox')))
                Configuration::updateValue('POROWNYWARKI_CATEGORIES', implode(',', Tools::getValue('categoryBox')));
            else
                Configuration::updateValue('POROWNYWARKI_CATEGORIES', '');

 

 

$selectedCat = explode(',', Configuration::get('POROWNYWARKI_CATEGORIES'));
        $helper = new HelperTreeCategories('categories-treeview');
        $helper->setUseCheckBox(true);
 

                  <table border="0" cellspacing="3" cellpadding="4">
                                <tr>
                                        <td class="title">Wybierz kategorie:</td>
                                        <td>' . $helper->render(null, $selectedCat) . '</td>
                                </tr>

 

I would be really greatfull for help.

Edited by jiro (see edit history)
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...