Hallo.
Für ein Kundenprojekt wollen/müssen wir das Custom Products Plugin um Abhängigkeiten zur Aussteuerung der Optionen erweitern. Hierfür habe ich bereits die Maske der Optionswerte um 2 Felder erweitert. Leider hänge ich nun beim Speichern der neuen Werte. Er findet meinen ExtJs Store nicht bzw. ich bekommen in der Console einen 404 für meinen Store angezeigt:
/backend/bstExtendCustomProducts/store/Value?file=app&no-cache=1548501334+1+1
Folgende Fehlerbeschreibung:
Ext.define('Shopware.apps.Index', {
extend:'Enlight.app.SubApplication',
bulkLoad: true,
loadPath: '/backend/Index/load',
controllers:[
'Main',
'Widgets',
'ErrorReporter',
'ThemeCacheWarmUp'
],
requires: [
'Shopware.container.Viewport'
],
views: [
'Main',
'Menu',
'Footer',
'Search',
'widgets.Window',
'widgets.Sales',
'widgets.Upload',
'widgets.Visitors',
'widgets.Orders',
'widgets.Notice',
'widgets.Merchant',
'widgets.News',
'widgets.Base',
'merchant.Window',
'themeCache.ThemeCacheWarmUp',
'widgets.bi.Base'
],
models: [
'Widget',
'WidgetSettings',
'Turnover',
'Batch',
'Customers',
'Visitors',
'Orders',
'News',
'Merchant',
'MerchantMail',
'ThemeCacheWarmUp'
],
stores: [
'Widget',
'WidgetSettings',
'ThemeCacheWarmUp'
]
});
Mein Store findet sich hier: custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag_custom_products\bst_extend_custom_products\store\value.js
Hier mein ExtJS Sourcen:
custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag_custom_products\bst_extend_custom_products\app.js
// {block name="backend/swag_custom_products/app"}
// {$smarty.block.parent}
// {include file="backend/swag_custom_products/bst_extend_custom_products/store/value.js"}
// {/block}
custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag_custom_products\bst_extend_custom_products\view\values\window.js:
// {namespace name="backend/bst_extend_custom_products/value/window"}
//{block name="backend/swag_custom_products/value/window"}
//{$smarty.block.parent}
Ext.define('Shopware.apps.bstExtendCustomProducts.view.detail.Window', {
override: 'Shopware.apps.SwagCustomProducts.view.values.Window',
bstSnippets: {
identifierFieldLabel: '{s name="fields/identifier/label"}Identifier{/s}',
dependFieldLabel: '{s name="fields/depend/label"}Depend{/s}',
},
/**
* @returns { *[] }
*/
createItems: function () {
var me = this,
items = me.callParent(arguments);
me.identifierField = me.createTextField('identifier', me.bstSnippets.identifierFieldLabel, true, false);
me.identifierField.on('change', Ext.bind(me.onFieldChange, me));
items.push(me.identifierField);
me.dependField = me.createTextField('depend', me.bstSnippets.dependFieldLabel, true, false);
me.dependField.on('change', Ext.bind(me.onFieldChange, me));
items.push(me.dependField);
return items;
},
/**
* Event listener method which will be fired when the user clicks the "save" button.
*
* Validates the form. If it fails to validate, it marks the image picker, when used, otherwise it will save the record to the store.
*/
saveButtonHandler: function () {
var me = this;
if (!me.formPanel.getForm().isValid()) {
if (!me.useImagePicker) {
return;
}
me.isImageSelectionInvalid();
return;
}
if (!me.isRecordInStore(me.record, me.valueGrid.getStore())) {
me.valueGrid.getStore().add(me.record);
}
var store = Ext.create('Shopware.apps.bstExtendCustomProducts.store.Value');
store.getProxy().extraParams.valueId = me.record.get('id');
me.destroy();
}
});
//{/block}
custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag_custom_products\bst_extend_custom_products\store\value.js
// {block name="backend/bst_extend_custom_products/store/value"}
Ext.define('Shopware.apps.bstExtendCustomProducts.store.Value', {
/**
* extends from the standard ExtJs store class
*/
extend: 'Shopware.store.Listing',
/**
* the model which belongs to the store
*/
model: 'Shopware.apps.bstExtendCustomProducts.model.Value',
configure: function () {
return {
controller: 'BstExtendCustomProducts'
};
}
});
// {/block}
custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag_custom_products\bst_extend_custom_products\model\value.js
// {block name="backend/bst_extend_custom_products/model/value"}
Ext.define('Shopware.apps.bstExtendCustomProducts.model.Value', {
extend: 'Ext.data.Model',
fields: [
{ name: 'identifier', type: 'string', defaultValue: null, useNull: true },
{ name: 'depend', type: 'string', defaultValue: null, useNull: true }
]
});
// {/block}
Wiso dieser 404er? Was übersehe ich bzw. was mach ich falsch? Ich danke euch schon mal im Voraus
Beste Grüße
Mike