Hei,
ich habe ein eigenes Einkaufswelt Element geschrieben und hab nun folgendes Problem:
Ich versteh leider nicht warum das Problem auftritt, vielleicht könnt ihr mir da ja helfen!
Ich hab das Tutorial (Custom shopping world elements) als Vorlage verwendet und entsprechend angepasst.
Plugin Struktur:
Ich bin in einem andern Forum darauf gestoßen, dass es an ExtJS liegen könnte und weniger an meinem Plugin…
Hier ist der Aufbau meiner Dateien:
EmotionElementInstaller.php:
emotionComponentInstaller = $emotionComponentInstaller;
$this->pluginName = $pluginName;
}
public function install()
{
$carticleElement = $this->emotionComponentInstaller->createOrUpdate(
$this->pluginName,
'CustomArticleElement',
[
'name' => 'Custom Artikel',
'xtype' => 'emotion-components-carticle',
'template' => 'emotion_carticle',
'cls' => 'emotion-carticle-element',
'description' => 'Anzeigefeld mit ausgewähltem Artikel.'
]
);
$carticleElement->createDisplayField([
'name' => 'info',
'fieldLabel' => 'Info:',
'defaultValue' => 'Lorem Ipsum.'
]);
$carticleElement->createTextField([
'name' => 'headline',
'fieldLabel' => 'Überschrift:',
'defaultValue' => 'Unsere Partner',
'supportText' => 'Lorem Ipsum'
]);
}
}
custom_article.js
//
//{block name="backend/emotion/view/detail/elements/base"}
//{$smarty.block.parent}
Ext.define('Shopware.apps.Emotion.view.detail.elements.CustomArticle', {
extend: 'Shopware.apps.Emotion.view.detail.elements.Base',
alias: 'widget.detail-element-emotion-components-carticle',
componentCls: 'emotion—custom-article',
//TODO: Change Icon
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNU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4McEkth1kj+2ojCPhp7OKE5DlAIkKfqXo8Yg+0M3xtj0CnRcuCMxNF1xAggLBTP6QLepkWI4h9/dEbTRq5cvyFUZWCfEYljQo9eDlNTHKttZm6BE6xLYyxWqE1NX/9wbSPJ8mEMVAg9kNBVozUMDBdqGRufMDT/evtNdoTHIhQYPPRVWNh95kGjNRAy9agBQB1/9tJfQ3dESIgGRpHcLeZRCVbPHReMSgllx6PJKRF39Ki9s4e6+waFoRt1GOYLaIM++A3zpFG14UQ//fq75njbz+3UOzAkwCiHNQIIIm8VcQheAeac1GBUbemcUEcfTNAvHV2h8hQ5quXby3R35AHl5mRtBwyyfwMqAHC4j7YzKC7yA43YJJqoYahIBTBaqHGBAyYA5GRnGjLg4HXcJEmfM5AbereOMzw4uFW5EVwMjEDn8/lFYYaQoK6vo6me94Ihn91UPdhsDvXcE7FW6y1PIFASTeQbCVgOBUOjNxFInyUz6vJ4T6AajXZztfsD/ipWW/9e3clYir0+v78Sucvo3R4ZtIoN8+L/DYal8wk3x1EY7OTvxwe8QL3yK2W31+dB1Mz8eG63/4eQWiqUH1YdO8DSoXyLW8W1aJO38wftksJlSO7MNcxPoz4LqzrtSoBFadmFUMI8vB30/wkwANX0n3B5XHA1AAAAAElFTkSuQmCC',
});
//{/block}
custom-article.js:
//{block name="emotion_components/backend/custom_article"}
Ext.define('Shopware.apps.Emotion.view.components.CustomArticle', {
extend: 'Shopware.apps.Emotion.view.components.Base',
alias: 'widget.emotion-components-carticle',
});
//{/block}
Muss ich an dem xtype was anpassen?
Danke schonmal :)