Hallo,
ich bin dabei, ein Plugin für den Export und Import von Bestellungen mit automatischer Änderung des Bestellstatus und Emailversand bei Export und automatischen hinzufügen einer Trackingnummer und Emailversand beim Import.
Folgende Ordner- und Dateistruktur habe ich bisher angelegt:
Folgende Codes habe ich bisher geschrieben:
BigBellyWawi/BigBellyWawi.php
BigBellyWawi/plugin.xml
BigBelly Wawi
BigBelly Wawi
1.0.0
(c) Yves Hönicke
MIT
Yves Hönicke
Erstveröffentlichung
First release
BigBellyWawi//Controllers/Backend/BigBellyWawi.php
BigBellyWawi//Models/BigBellyWawi.php
BigBellyWawi//Resources/menu.xml
BigBellyWawi
BigBellyBank Wawi
BigBellyBank Wawi
BigBellyWawi
index
sprite-metronome
Customer
BigBellyWawi//Resources/services.xml
BigBellyWawi//Resources/views/backend/big_belly_wawi/app.js
Ext.define('Shopware.apps.BigBellyWawi', {
extend: 'Enlight.app.SubApplication',
name:'Shopware.apps.BigBellyWawi',
loadPath: '{url action=load}',
bulkLoad: true,
controllers: ['Main'],
views:['main.Window','main.Settings'],
models: ['BigBellyWawi'],
launch: function() {
return this.getController('Main').mainWindow;
}
});
BigBellyWawi//Resources/views/backend/big_belly_wawi/controller/main.js
Ext.define('Shopware.apps.BigBellyWawi.controller.Main', {
extend: 'Enlight.app.Controller',
init: function() {
var me = this;
me.mainWindow = me.getView('main.Window').create({ }).show();
}
});
BigBellyWawi//Resources/views/backend/big_belly_wawi/model/bigbellywawi.js
Ext.define('Shopware.apps.BigBellyWawi.model.BigBellyWawi', {
extend: 'Shopware.data.Model',
configure: function() {
return {
controller: 'BigBellyWawi',
detail: 'Shopware.apps.BigBellyWawi.view.detail.Container'
};
}
});
BigBellyWawi//Resources/views/backend/big_belly_wawi/view/detail/container.js
Ext.define('Shopware.apps.BigBellyWawi.view.detail.Container', {
extend: 'Shopware.model.Container',
padding: 20,
configure: function() {
return {
};
}
});
BigBellyWawi//Resources/views/backend/big_belly_wawi/view/detail/window.js
Ext.define('Shopware.apps.BigBellyWawi.view.detail.Window', {
extend: 'Shopware.window.Detail',
title : 'BigBelly Wawi',
height: 420,
width: 900
});
BigBellyWawi//Subscribers/Wawi.php
pluginDirectory = $pluginDirectory;
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents()
{
return [
'Enlight_Controller_Action_PostDispatch_Backend_Order' => 'onBackendOrderPostDispatch'
];
}
public function onBackendOrderPostDispatch(\Enlight_Event_EventArgs $arguments)
{
$controller = $args->getSubject();
$view = $controller->View();
$request = $controller->Request();
$view->addTemplateDir($this->pluginDirectory . '/Resources/views');
if ($request->getActionName() == 'index') {
$view->extendsTemplate('backend/big_belly_wawi/app.js');
}
if ($request->getActionName() == 'load') {
$view->extendsTemplate('backend/big_belly_wawi/view/detail/window.js');
}
}
}
Der Menüpunkt wird angezeigt. Wenn ich nun das Ganze aufrufen will, erhalte ich folgende Fehlermeldung:
Ups! Ein Fehler ist aufgetreten!
Die nachfolgenden Hinweise sollten Ihnen weiterhelfen.
Unable to load template snippet ‘backend/big_belly_wawi/app.js’ in engine/Library/Smarty/sysplugins/smarty_internal_templatebase.php on line 127
Stack trace:
#0 engine/Library/Enlight/View/Default.php(300): Smarty\_Internal\_TemplateBase-\>fetch()
#1 engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(216): Enlight\_View\_Default-\>render(Object(Enlight\_Template\_Default))
...
Wo liegt genau der Fehler?