Domanda

I am making a payment gateway and It could happen that depending on the shop manager, taxes maybe already included in the price, or not. So, when included, the tax field would be 0 and I need to get the price value without the tax. I came up with the idea of making a categories tree in the module back office where the shop manager may specify each category tax, so if it's included in the price, I can calculate it looking what category the product belongs to.

My problem, I do not know how to display the categories tree in the back office. How can I do it?

È stato utile?

Soluzione

You can use the renderCategoryTree method of the Helper class (classes/helper/Helper.php):

$helper = new Helper();
$categoryTree = $helper->renderCategoryTree();

Take a look at modules/blocklayered/blocklayered.php for an example.

Altri suggerimenti

I am using HelperTreeCategories helper.

        $categories = new HelperTreeCategories('associated-categories-tree', 'Выберите категории');
    $categories->setUseCheckBox(1)
                ->setUseSearch(1);
            $categories->render(); // To show categires select with checkboxes as on product category association page
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top