Hi
How to display a category tree in system.xml and from weseckbox and after "save" have a table of selected categories?
Actually, I mean the category tree where I select and deselect categories in the checkbox.
@liteblue wrote:Hi
How to display a category tree in system.xml and from weseckbox and after "save" have a table of selected categories?
What is the problem? Just add condition : IF currentCategory dosn't have childs THEN use parent id of currentCategory as currentCategoryId
This is not the problem. I do not know how to have in system.xml just like here, but that they should be categories
I am a beginner in Magento programming and I don't know how to deal with it
I managed to do just like in the picture. But unfortunately it saves only one value for me
<field id="ep_category" translate="label" type="checkboxes" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> <label>Wybierz katetegorie</label> <source_model>Test\Ep\Model\Config\Source\Category</source_model> <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model> </field>