I’m working on a Shopware 6 project and trying to display the quantity of line items in a Twig template /checkout/finish
. However, when I try to access the quantity
property in the index.html.twig
, I am getting empty string. However, this gives correct value in base.html.twig
.
Here’s the code I’m using:
{% set count = 0 %}
{% for item in page.order.lineItems %}
{% set count= item1.quantity + count %}
{% endfor %}
How can I access quantity of the final checkout in case of
2x Produkt A
1x Produkt B
so that the total quantity I get will be 3?