diff options
| author | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-01 14:22:19 +0200 |
|---|---|---|
| committer | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-01 14:22:19 +0200 |
| commit | 4b8385250c3e7c80ea37600bb07c1741fc221b59 (patch) | |
| tree | 4f3e6278eb39726682090c02a11d5653a25cbb94 | |
| parent | 4e2875793d5e724363737e6ca40db87b8d43f0b5 (diff) | |
Produktvorlagen: Produktname nicht doppelt
Die Unterüberschrift erscheint nur, wenn der Produktname (Detail) gefüllt ist und abweicht, wie schon in Vorlage 2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | views/produkttemplates/standard.phtml | 4 | ||||
| -rw-r--r-- | views/produkttemplates/standard3.phtml | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml index ea1087a..4cb73d7 100644 --- a/views/produkttemplates/standard.phtml +++ b/views/produkttemplates/standard.phtml @@ -25,7 +25,9 @@ <?php if (!$this->titleDisplayed) { ?>
<h1 class="wpsg_producttitle"><?php echo $oProduct->getProductName(); ?></h1>
- <h2 class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
+ <?php if (($this->view['data']['detailname']??'') !== '' && $oProduct->getProductName() !== $this->view['data']['detailname']) { ?>
+ <h2 class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
+ <?php } ?>
<?php } ?>
<?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
diff --git a/views/produkttemplates/standard3.phtml b/views/produkttemplates/standard3.phtml index 788b21c..af0206e 100644 --- a/views/produkttemplates/standard3.phtml +++ b/views/produkttemplates/standard3.phtml @@ -62,7 +62,9 @@ <?php if (!$this->titleDisplayed) { ?>
<h1 itemprop="name" class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h1>
- <h2 itemprop="detailname" class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
+ <?php if (($this->view['data']['detailname']??'') !== '' && $this->getProductName($this->view['data']['id']) !== $this->view['data']['detailname']) { ?>
+ <h2 itemprop="detailname" class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
+ <?php } ?>
<?php } ?>
<?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
|
