I run Shopware 6 locally and using the development template. I needed to remove the product number from the product detail page. So, I override the twig template „buy-widget.html.twig“:
{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
{% block page_product_detail_ordernumber_container %}
{% endblock %}
Works as expected - if I have not change the layout template for the product, but using the Shopware default.
If I change the layout to a custom layout (like a plain copy of the default layout) the product number is back?!
Checking with the Symfony Profiler, I can see that it’s now another twig template (from a folder „component/…“ responsible for displaying the product number.
Question: Am I correct to assume that I should extend the twig template from this component folder if I’m using a custom layout? I have not find anything in the docs about these „small“ details. And if one need to be sure that a custom theme works in every case, you must make the changes (using sw_extends) in two files?
/Magnus