1

后端登录后,订单列表应自动加载。

我已经为它扩展了正确的块:

//{block name="backend/index/controller/main"}
//{$smarty.block.parent}
Ext.define('Shopware.apps.Index.controller.MDMain', {
    override: 'Shopware.apps.Index.controller.Main',
    init: function() {
        this.callParent(arguments);
            Shopware.app.Application.addSubApplication({
                name: 'Shopware.apps.Order',
                localizedName: "Order Title",
                params: {
                }
            });
            }
});
//{/block}

它正在工作,但它打开了两次。

订阅看起来像:

    $this->subscribeEvent(
        'Enlight_Controller_Action_PostDispatch_Backend_Index',
        'BackendOrderPostDispatchIndex'
    );


public function BackendOrderPostDispatchIndex(Enlight_Event_EventArgs $args){
    if ($request->getActionName() === 'load') {
       $view->extendsTemplate('backend/mdbackend/index/controller/main.js');
    }
}
4

0 回答 0