Ich stehe z.Z. vor dem selben Problem.
Shopware V 6.4.18.0
Ich stehe z.Z. vor dem selben Problem.
Folgendes konnte ich aber schon herausfinden.
Anlegen eines addServiceProviderDecorator in der main.js.
Diese habe ich laut SW Doku „Add custom data to the search“ eingebunden.
const { Application } = Shopware;
Application.addServiceProviderDecorator(
'searchTypeService',
(searchTypeService) => {
searchTypeService.upsertType('my_test', {
entityName: 'my_test',
entityService: 'myTestService',
placeholderSnippet: 'snippet.general.menuItemLabel',
listingRoute: 'service.list'
});
return searchTypeService;
}
Das zugehörige Snippet
Snippet: de_DE.json
{
"snippet": {
"general": {
"menuItemLabel": "Test",
"menuItemColor": "#189eff",
"menuIconName": "avatar"
}
}
}
In der sw-search-bar/index.js unter
„vendor\shopware\administration\Resources\app\administration\src\app\component\structure\sw-search-bar“ bin ich dann fündig geworden woher die Color „#AEC4DA“ stammt.
getEntityIconColor(entityName) {
const module = this.moduleFactory.getModuleByEntityName(entityName);
if (!module) {
return '#AEC4DA';
}
return module.manifest.color || '#AEC4DA';
},
getEntityIcon(entityName) {
const module = this.moduleFactory.getModuleByEntityName(entityName);
const defaultColor = '#AEC4DA';
if (!module) {
return defaultColor;
}
return module.manifest.icon || defaultColor;
},
Aus diesem Grund habe ich in der main.js folgende Ergänzungen eingefügt:
entityIconColor: 'snippet.general.menuItemColor',
entityIconName: 'snippet.general.menuIconName',
Leider ohne Erfolg.
Noch nicht herausgefunden habe ich woher der Anfang des tags „icons-“ kommt.
Ich hoffe sehr das mir jemand bei meinem Problem helfen kann.