Jump to content

adding tables next to each other in back office


Recommended Posts

Well the (probably bad) thing is that I render the tables into the configuration page of the module. This is the code that I use for one of the tables. I don't know how to do that with what I have here as I think the helper class has some predefined ways of creating the table.

public function test()
    {
        $sql = 'SELECT
	ps_orders.id_order, ps_order_detail.product_name, ps_order_detail.product_quantity, product_reference, product_price
FROM
	ps_orders
	LEFT JOIN ps_order_detail ON ps_orders.id_order = ps_order_detail.id_order 
WHERE
	id_customer = 2 AND ps_order_detail.id_order = 6';

        if ($result = Db::getInstance()->executeS($sql)) {
            $this->fields_list = array(
                'product_reference' => array(
                    'title' => 'референтен номер',
                    'width' => 10,
                    'type' => 'text'
                ),
                'product_name' => array(
                    'title' => 'test name test',
                    'width' => 10,
                    'type' => 'text'
                ),
                'product_price' => array(
                    'title' => 'ед. цена',
                    'width' => 10,
                    'type' => 'price'
                ),
                'product_quantity' => array(
                    'title' => 'Първа зарядка',
                    'width' => 10,
                    'type' => ''
                ),
                'asdasd' => array(
                    'title' => 'Втора зарядка',
                    'width' => 10,
                    'type' => ''
                ),
                'ferwwer' => array(
                    'title' => 'Трета зарядка',
                    'width' => 10,
                    'type' => ''
                )


            );

            $helper = new HelperList();
            $helper->simple_header = true;
            $helper->identifier = 'product_name';
            $helper->show_toolbar = true;
            $helper->shopLinkType = '';
            $helper->token = Tools::getAdminTokenLite('AdminModules');
            $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
            return ($helper->generateList($result, $this->fields_list));
        }
    }
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...