Benenne Artikel im Shop und in den Listen nach ihrem Inhalt statt nach der Kennung
Die Produktseite zeigte im Leistungsumfang die Kennung, obwohl die Redaktion den Namen aus dem Inhalt übernimmt. ProductOptions und PublicationReadiness lösen den Namen jetzt wie die Redaktion auf: eigener Name, sonst Name des Inhalts, zuletzt Kennung. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d49b178ebd
commit
4520dba2f0
3 files changed
+38
-8
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace App\Domain\Commerce;
|
||||
|
||||
use App\Domain\Catalog\Composition;
|
||||
use App\Domain\Catalog\EditorialProfileReader;
|
||||
use App\Domain\Catalog\LicenseArticle;
|
||||
use App\Domain\Catalog\Offer;
|
||||
use App\Domain\Catalog\OfferService;
|
||||
@@ -109,6 +110,9 @@ public function articleTitle(?LicenseArticle $article): string
|
||||
return '–';
|
||||
}
|
||||
|
||||
return (string) ($article->display_title ?: $article->working_title ?: $article->code);
|
||||
// Wie in der Redaktion: eigener Name, sonst der Name des Inhalts, zuletzt die Kennung.
|
||||
$name = app(EditorialProfileReader::class)->read($article, 'detail')->value('display_title');
|
||||
|
||||
return (string) (filled($name) ? $name : ($article->working_title ?: $article->code));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user