Post by k.gabi » Sat Aug 11, 2018 11:41 pm

Hello,

I'm sorry, but I speak a little English.

OC version: 3.0.2.0

I know add (when install) and delete (when uninstall) events with my extension, but my menus function is not working. Why?

~/admin/controller/extension/payment/hardpay.php

Code: Select all

<?php

    class ControllerExtensionPaymentHardPay extends Controller {

        private $error = array ();
        
        public function install () {

            $this -> load -> model ( 'setting/event' );
            $this -> model_setting_event -> addEvent ( 'hardpay', 'admin/view/common/column_left/before', 'extension/payment/HardPay/menus' );

        }

        public function uninstall () {

            $this -> load -> model ( 'setting/event' );
            $this -> model_setting_event -> deleteEventByCode ( 'hardpay' );

        }

        public function menus ( $eventRoute, &$data ) {

            $data [ 'menus' ] [] = array (

                'id' => 'menu-hardpay',
                'icon' => 'fa fa-shopping-cart fa-fw',
                'name' => 'HardPay',
                'href' => $this -> url -> link ( 'extension/payment/HardPay', 'token=' . $this -> session -> data [ 'token' ], TRUE ),
                'children' => array ()

            );

        }

    }
Please help me. I would like only a one new button in left (~/admin/controller/common/column_left.php): Dashboard, etc. Why not work? Thanks.

Newbie

Posts

Joined
Wed Aug 08, 2018 9:04 am
Who is online

Users browsing this forum: No registered users and 10 guests