Template blocks
The widget is rendered through standard Shopware Twig includes. If the page-position drop-downs don’t fit your theme, you can extend the templates from your own theme plugin / app.
Storefront templates shipped by the plugin
Section titled “Storefront templates shipped by the plugin”| File | Purpose |
|---|---|
storefront/p2lab/widget/estimated-delivery.html.twig | The widget container. Iterates over the active components (message / clock / steps) and includes each one. |
storefront/p2lab/widget/component/message.html.twig | The message component |
storefront/p2lab/widget/component/clock.html.twig | The clock component (default and compact layouts, default and boxes variants) |
storefront/p2lab/widget/component/steps.html.twig | The steps component |
storefront/p2lab/widget/media.html.twig | Helper for rendering icon media |
storefront/block/cms-block-p2lab-cms-estimated-delivery.html.twig | The CMS block wrapper |
Pages the plugin attaches to
Section titled “Pages the plugin attaches to”The plugin ships theme extensions for these pages:
| File | Storefront page |
|---|---|
storefront/page/product-detail/buy-widget.html.twig | Product detail buy widget |
storefront/page/checkout/cart/index.html.twig | Cart |
storefront/page/checkout/confirm/index.html.twig | Checkout confirm |
storefront/page/checkout/address/index.html.twig | Checkout address (register inline) |
Each page extension respects the Placement position drop-down for its tab — if you pick disabled, the extension renders nothing.
Rendering the widget manually
Section titled “Rendering the widget manually”If you need the widget in a place the plugin doesn’t already cover, include the widget template directly from your theme:
{% sw_include "@P2LabEstimatedDelivery/storefront/p2lab/widget/estimated-delivery.html.twig" with { p2labEstimatedDeliveryCmsBlock: null} %}The widget will compute itself using the same Settings / Widget / Translation configuration as the rest of the storefront. Passing a non-null CMS block enables the “inherit from product” pathway documented under Storefront → CMS block.
Overriding the rendered HTML
Section titled “Overriding the rendered HTML”Every twig block inside the widget templates uses the p2lab_estimated_delivery_… naming convention, so you can extend them with the standard Shopware override pattern. For example, to add a wrapper around the message:
{# Resources/views/storefront/p2lab/widget/component/message.html.twig #}{% sw_extends '@P2LabEstimatedDelivery/storefront/p2lab/widget/component/message.html.twig' %}
{% block p2lab_estimated_delivery_widget_message %} <div class="my-theme__delivery-banner"> {{ parent() }} </div>{% endblock %}This keeps you on the supported template path and survives plugin updates as long as the underlying block names don’t change.
CSS hooks
Section titled “CSS hooks”Every widget element has a stable BEM-style class name with the p2lab-estimated-delivery__ prefix — for example p2lab-estimated-delivery__widget-clock__compact-info or p2lab-estimated-delivery__widget-steps__list-item. Style overrides in your theme target these classes directly.