Skip to content

Commit

Permalink
OP-289: Add accordion with bundled products on order view
Browse files Browse the repository at this point in the history
  • Loading branch information
hmfilar committed Aug 26, 2024
1 parent 2ec8439 commit dddd239
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
9 changes: 7 additions & 2 deletions src/Resources/views/Admin/Order/Show/Summary/_item.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
<tr>
<td class="single line">
{% include '@SyliusAdmin/Product/_info.html.twig' %}

{{ bitbag_render_product_bundle_order_items(item) }}
</td>
<td class="right aligned unit-price">
{{ money.format(item.unitPrice, order.currencyCode) }}
Expand Down Expand Up @@ -50,3 +48,10 @@
{{ money.format(item.total, order.currencyCode) }}
</td>
</tr>
{% if product.bundle %}
<tr>
<td colspan="9">
{{ bitbag_render_product_bundle_order_items(item) }}
</td>
</tr>
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<h3>{{ 'bitbag_sylius_product_bundle.ui.products_in_bundle'|trans }}</h3>

{% for item in items %}
{% set variant = item.productVariant %}
{% set product = variant.product %}
<div class="ui accordion">
<div class="title">
<i class="dropdown icon"></i> <strong>{{ 'bitbag_sylius_product_bundle.ui.products_in_bundle'|trans }}</strong>
</div>

<div class="content">
{% for item in items %}
{% set variant = item.productVariant %}
{% set product = variant.product %}

<div class="ui segment">
<div class="ui header">
Expand Down Expand Up @@ -30,6 +35,8 @@
</div>
{% endif %}

<p>{{ 'bitbag_sylius_product_bundle.ui.quantity'|trans }}: {{ item.quantity }}</p>
<p>{{ 'bitbag_sylius_product_bundle.ui.quantity'|trans }}: {{ item.quantity }}</p>
</div>
{% endfor %}
</div>
{% endfor %}
</div>

0 comments on commit dddd239

Please sign in to comment.