Jump to content

Custom Module to Display and Update Orders


Recommended Posts

Dear developers, 

I have 5 main order statuses that I am currently using for my site. I am creating a custom module to display and update all the orders in one page, with segregation of statuses. This will assist me to have an overview of orders to service.

The necessary module skeleton/tab has been created with a tpl file that will show the necessary data. I have created other modules with usage of hooks that has its own params to retrieve data from database. Tpl file has been styled accordingly.

As the latest module I am creating does not use any hook, may I know how can I retrieve necessary data besides using SQL queries?

I will be adding checkboxes to update the orders displayed for quick update. Do I need to extend/override the functionality of the existing features? (Similar to order page)

//sample code

 public function displayTestMessage()
    {
        //to retrieve data for display and update purposes
    }

public function initContent()
    {
        //header template creation
        parent::initContent();
        $tpl = $this->createTemplate($this->template)->fetch();
        $this->setTemplate($this->template);

        $tsForm = $this->displayTestMessage();
        $this->context->smarty->assign(array(
            'testing' => $tsForm
        ));
    }

Thank you for your time.

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...