diff options
| author | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-04 16:14:50 +0200 |
|---|---|---|
| committer | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-04 16:21:21 +0200 |
| commit | 40e3d1614cea93b734d568f4eebf20eb8954fa9b (patch) | |
| tree | b1c5f2a7c33105bd09d683d781d53e7f81769587 /views/mods/mod_productview/productview.phtml | |
| parent | c24b6746c27a7e81a9819ef523dec8f64a90f9a6 (diff) | |
Produktbewertungen: Sterne und Bewertungen im Shop
Sterne mit Schnitt unter dem Produktnamen und in den Kacheln, Liste mit Hinweis zur Echtheit unter dem Produkt, Link zum Bewerten im Kundenkonto. Ohne das Modul bleibt die Anzeige wie bisher.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'views/mods/mod_productview/productview.phtml')
| -rw-r--r-- | views/mods/mod_productview/productview.phtml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/views/mods/mod_productview/productview.phtml b/views/mods/mod_productview/productview.phtml index 0319b84..12cbeef 100644 --- a/views/mods/mod_productview/productview.phtml +++ b/views/mods/mod_productview/productview.phtml @@ -83,9 +83,11 @@ <p class="wpsg-pv__detailname"><?php echo esc_html($detailname); ?></p> <?php } ?> - <?php $rating = floatval($oProduct->getRating()); if ($rating > 0) { ?> + <?php if ($this->hasMod('wpsg_mod_reviews')) { /* Mit dem Modul Produktbewertungen nur freigegebene Bewertungen, sonst die Sterne am Produkt (doc/bewertungen.md, Entscheidung 1) */ ?> + <?php echo $this->callMod('wpsg_mod_reviews', 'renderSummary', [$product_id, 'wpsg-pv__rating']); ?> + <?php } else { $rating = floatval($oProduct->getRating()); if ($rating > 0) { ?> <p class="wpsg-pv__rating" title="<?php echo esc_attr(wpsg_translate(__('#1# von 5 Sternen', 'wpsg'), wpsg_ff($rating, '', true))); ?>"><span aria-hidden="true"><?php echo str_repeat('★', intval(round($rating))).str_repeat('☆', 5 - intval(round($rating))); ?></span><span class="screen-reader-text"><?php echo esc_html(wpsg_translate(__('#1# von 5 Sternen', 'wpsg'), wpsg_ff($rating, '', true))); ?></span></p> - <?php } ?> + <?php } } ?> <?php if ($oProduct->canDisplayPrice()) { $price = $oProduct->getPrice(); $oldPrice = $oProduct->getOldPrice(); ?> <p class="wpsg-pv__price"> |
