Skip to content

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”
FilePurpose
storefront/p2lab/widget/estimated-delivery.html.twigThe widget container. Iterates over the active components (message / clock / steps) and includes each one.
storefront/p2lab/widget/component/message.html.twigThe message component
storefront/p2lab/widget/component/clock.html.twigThe clock component (default and compact layouts, default and boxes variants)
storefront/p2lab/widget/component/steps.html.twigThe steps component
storefront/p2lab/widget/media.html.twigHelper for rendering icon media
storefront/block/cms-block-p2lab-cms-estimated-delivery.html.twigThe CMS block wrapper

The plugin ships theme extensions for these pages:

FileStorefront page
storefront/page/product-detail/buy-widget.html.twigProduct detail buy widget
storefront/page/checkout/cart/index.html.twigCart
storefront/page/checkout/confirm/index.html.twigCheckout confirm
storefront/page/checkout/address/index.html.twigCheckout address (register inline)

Each page extension respects the Placement position drop-down for its tab — if you pick disabled, the extension renders nothing.

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.

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.

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.