Skip to content

Commit

Permalink
[Order] Add displaying immutable product/variant names and codes in ui
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed Oct 30, 2017
1 parent 3da58c3 commit 3b0fb95
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Viewing order items with proper names
And I addressed it to "Lucifer Morningstar", "Seaside Fwy", "90802" "Los Angeles" in the "United States" with identical billing address
And I chose "Free" shipping method with "Cash on Delivery" payment

@ui @todo
@ui
Scenario: Viewing basic information about an order
Given the product "Angel T-Shirt" was renamed to "Devil Cardigan"
And the product "Angel Mug" was renamed to "Devil Glass"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature: Seeing order items with proper names
And the customer chose "Free" shipping method to "United States" with "Cash on Delivery" payment
And I am logged in as an administrator

@ui @todo
@ui
Scenario: Seeing order items with proper names
Given the product "Angel T-Shirt" was renamed to "Devil Cardigan"
And the product "Angel Mug" was renamed to "Devil Glass"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% set taxAdjustment = constant('Sylius\\Component\\Core\\Model\\AdjustmentInterface::TAX_ADJUSTMENT') %}

{% set variant = item.variant %}
{% set product = variant.product %}
{% set product = item.variant.product %}

<tr>
<td class="single line">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{% set product = variant.product %}

<div class="ui header">
{% include '@SyliusAdmin/Product/_mainImage.html.twig' with {'product': product, 'filter': 'sylius_admin_product_tiny_thumbnail'} %}
<div class="content">
<a href="{{ path('sylius_admin_product_update', {'id': product.id}) }}" class="sylius-product-name" title="{{ product.name }}">{{ product.name }}</a>
<span class="sub header sylius-product-variant-code" title="{{ variant.code }}">
{{ variant.code }}
<div class="sylius-product-name" title="{{ item.immutableProductName }}">{{ item.immutableProductName }}</div>
<span class="sub header sylius-product-variant-code" title="{{ item.immutableVariantCode }}">
{{ item.immutableVariantCode }}
</span>
</div>
</div>
Expand All @@ -17,10 +15,10 @@
</div>
{% endfor %}
</div>
{% elseif variant.name is not null %}
{% elseif item.immutableVariantName is not null %}
<div class="ui horizontal divided list">
<div class="item sylius-product-variant-name">
{{ variant.name }}
{{ item.immutableVariantName }}
</div>
</div>
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<div class="ui header">
{% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': product, 'filter': 'sylius_shop_product_tiny_thumbnail'} %}
<div class="content">
<a href="{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}" class="sylius-product-name">{{ product.name }}</a>
<div class="sylius-product-name">{{ item.immutableProductName }}</div>
<span class="sub header sylius-product-variant-code">
{{ variant.code }}
{{ item.immutableVariantCode }}
</span>
</div>
</div>
Expand All @@ -17,10 +17,10 @@
</div>
{% endfor %}
</div>
{% elseif variant.name is not null %}
{% elseif item.immutableVariantName is not null %}
<div class="ui horizontal divided list">
<div class="item sylius-product-variant-name">
{{ variant.name }}
{{ item.immutableVariantName }}
</div>
</div>
{% endif %}

0 comments on commit 3b0fb95

Please sign in to comment.