Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New module example: adding a section/widget to the order page #102

Open
Mark-H opened this issue May 20, 2020 · 0 comments
Open

New module example: adding a section/widget to the order page #102

Mark-H opened this issue May 20, 2020 · 0 comments

Comments

@Mark-H
Copy link
Member

Mark-H commented May 20, 2020

        $dispatcher->addListener(\Commerce::EVENT_DASHBOARD_PAGE_BEFORE_GENERATE, [$this, 'insertOnOrder']);

...

        $page = $event->getPage();
        if ($page->key === 'order') {
            $requests = new SimpleSection($this->commerce, [
                'title' => 'Payment Requests'
            ]);
            $requests->priority = 20; // position related to core sections 
            $requests->addWidget((new Grid($this->commerce))->setUp());

            $page->addSection($requests);
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant