custom/plugins/TrustedShops/src/Resources/views/storefront/page/product-detail/buy-widget.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  2. {% block page_product_detail_reviews %}
  3.     {{ parent() }}
  4.     {% if shopware.config.TrustedShops.config.tsId and shopware.config.TrustedShops.config.tsProductReviewsActive and shopware.config.TrustedShops.config.tsProductRatingStarsDetailsActive %}
  5.         {# Trusted Shops Product Stars - Start #}
  6.         <div class="product-detail-trustedshops-reviews" id="ts_product_widget_position" style="clear: both; margin-bottom: 1rem;"></div>
  7.         {% if shopware.config.TrustedShops.config.tsProductRatingStarsExpertMode %}
  8.             {% set ratingStarsCode = shopware.config.TrustedShops.config.tsExpertProductRatingStarsCode %}
  9.             {% set ratingStarsCode = ratingStarsCode|replace({'%tsid%': shopware.config.TrustedShops.config.tsId}) %}
  10.             {% set ratingStarsCode = ratingStarsCode|replace({'%sku%': page.product.productNumber}) %}
  11.             {{ ratingStarsCode|raw }}
  12.         {% else %}
  13.             <script type="text/javascript" src="//widgets.trustedshops.com/reviews/tsSticker/tsProductStickerSummary.js"></script>
  14.             <script type="text/javascript">
  15.                 (function() {
  16.                     var summaryBadge = new productStickerSummary();
  17.                     summaryBadge.showSummary(
  18.                         {
  19.                             'tsId': "{{ shopware.config.TrustedShops.config.tsId|escape('js') }}",
  20.                             'sku': '{{ page.product.productNumber|escape('js') }}',
  21.                             'element': '#ts_product_widget_position',
  22.                             'starColor' : '{{ shopware.config.TrustedShops.config.tsProductRatingStarsStarColor|escape('js') }}',
  23.                             'starSize' : '{{ shopware.config.TrustedShops.config.tsProductRatingStarsStarSize|escape('js') }}px',
  24.                             'fontSize' : '{{ shopware.config.TrustedShops.config.tsProductRatingStarsFontSize|escape('js') }}px',
  25.                             'showRating' : 'true' ,
  26.                             {% if shopware.config.TrustedShops.config.tsProductRatingStarsHideEmptyRatings %}
  27.                             'enablePlaceholder': 'false',
  28.                             {% else %}
  29.                             'enablePlaceholder': 'true',
  30.                             {% endif %}
  31.                             'scrollToReviews' : 'false'
  32.                         }
  33.                     );
  34.                 })();
  35.             </script>
  36.         {% endif %}
  37.         {# Trusted Shops Product Stars - End #}
  38.     {% endif %}
  39. {% endblock %}