To add back-in-stock to Shopware collection page, you need to use custom triggers and modify theme code. Below we will guide you through the setup.
Install Back In Stock
First, ensure that you've already install back-in-stock to your Shopware store.
Edit Theme
Next, you will need to edit your Shopware theme. Add the following file to override theme.
Resources/views/storefront/component/product/card/action.html.twig
Paste the following snippet to the file.
{% sw_extends '@Storefront/storefront/component/product/card/action.html.twig' %} {% block component_product_box_action_inner %} {{ parent() }} {% if product and 0 >= product.availableStock %} <!-- BackInStock Custom Trigger --> <div class="ov-bis-notify" style="margin-top: 20px; margin-bottom: 10px;"> <a href="#" class="ov-bis-trigger" style="font-size: 13px; color: #6d7390;" data-product-external-id="{{ product.id }}" data-shopware-product="{{ product|json_encode() }}" > Notify me when available </a> </div> <!-- BackInStock Custom Trigger --> {% endif %} {% endblock %}
This will add back-in-stock trigger link after action section for each product card.
Need help installing?
If you need additional help to install, you can contact us.