custom/plugins/ProcAvailableStock/src/Resources/views/storefront/component/buy-widget/buy-widget.html.twig line 1

Open in your IDE?
  1. {%  sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %}
  2. {% block buy_widget_data %}
  3.     {% block buy_widget_data_rich_snippet_url %}
  4.         <meta itemprop="url"
  5.               content="{{ seoUrl('frontend.detail.page', { productId: product.id }) }}"/>
  6.     {% endblock %}
  7.     {% block buy_widget_data_rich_snippet_price_range %}
  8.         {% if product.calculatedPrices|length > 1 %}
  9.             {% set lowestPrice = false %}
  10.             {% set highestPrice = false %}
  11.             {% for price in product.calculatedPrices %}
  12.                 {% if not lowestPrice or price.unitPrice < lowestPrice %}
  13.                     {% set lowestPrice = price.unitPrice %}
  14.                 {% endif %}
  15.                 {% if not highestPrice or price.unitPrice > highestPrice %}
  16.                     {% set highestPrice = price.unitPrice %}
  17.                 {% endif %}
  18.             {% endfor %}
  19.             <meta itemprop="lowPrice" content="{{ lowestPrice }}"/>
  20.             <meta itemprop="highPrice" content="{{ highestPrice }}"/>
  21.             <meta itemprop="offerCount" content="{{ product.calculatedPrices|length }}"/>
  22.         {% endif %}
  23.     {% endblock %}
  24.     {% block buy_widget_data_rich_snippet_price_currency %}
  25.         <meta itemprop="priceCurrency"
  26.               content="{{ context.currency.translated.shortName }}"/>
  27.     {% endblock %}
  28. {# Anfang geänderter Block #}
  29.     {% block buy_widget_price %}
  30.         {{ parent() }}
  31.     {% endblock %}
  32. {# Ende geänderter Block #}
  33. {# Anfang geänderter Block #}
  34.     {% block buy_widget_tax %}
  35.         {{ parent() }}
  36.     {% endblock %}
  37. {# Ende geänderter Block #}
  38. {# Anfang hinzugefügter Block #}
  39.     {# Block wird ins ProcOrderSimulate Plugin verschoben #}
  40. {#    {% block buy_widget_delivery_costs %}#}
  41. {#        {% set freeShippingThreshold = context.shippingMethod.extensions.deliveryInformations['freeShippingThreshold'] %}#}
  42. {#        <div class="product-detail-delivery-costs-container">#}
  43. {#            <p class="product-detail-delivery-costs">#}
  44. {#                {% block buy_widget_delivery_costs_link %}#}
  45. {#                    <a class="product-detail-delivery-costs-link"#}
  46. {#                       href="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"#}
  47. {#                       title="{{ "proc.detail.deliveryCosts"|trans({'%freeShipping%': freeShippingThreshold})|sw_sanitize }}"#}
  48. {#                       {{ dataBsToggleAttr }}="modal"#}
  49. {#                       data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}">#}
  50. {#                           {{ "proc.detail.deliveryCosts"|trans({'%freeShipping%': freeShippingThreshold})|sw_sanitize }}#}
  51. {#                    </a>#}
  52. {#                {% endblock %}#}
  53. {#            </p>#}
  54. {#        </div>#}
  55. {#    {% endblock %}#}
  56. {# Ende hinzugefügter Block #}
  57.     {% set remoteClickOptions = {
  58.         selector: "#review-tab-" ~ product.id,
  59.         scrollToElement: true
  60.     } %}
  61.     {% set reviewTabHref = "#review-tab-" ~ product.id ~ "-pane" %}
  62.     {% block buy_widget_reviews %}
  63.         {% if product.ratingAverage > 0 and totalReviews > 0 and config('core.listing.showReview') %}
  64.             <div class="product-detail-reviews">
  65.                 {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  66.                     points: product.ratingAverage,
  67.                     style: 'text-primary'
  68.                 } %}
  69.                 <a {{ dataBsToggleAttr }}="tab"
  70.                    class="product-detail-reviews-link"
  71.                    data-offcanvas-tabs="true"
  72.                    data-remote-click="true"
  73.                    data-remote-click-options='{{ remoteClickOptions|json_encode }}'
  74.                    href="{{ reviewTabHref }}"
  75.                    aria-controls="review-tab-pane">
  76.                     {{ totalReviews }}
  77.                     {{ "detail.reviewLinkText"|trans({'%count%': totalReviews})|sw_sanitize }}
  78.                 </a>
  79.             </div>
  80.         {% endif %}
  81.     {% endblock %}
  82.     {% block buy_widget_delivery_informations %}
  83.         <div class="product-detail-delivery-information">
  84.             {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  85.         </div>
  86.     {% endblock %}
  87. {% endblock %}