Skip to content

Commit

Permalink
[Design-v2] - behat fix feature
Browse files Browse the repository at this point in the history
  • Loading branch information
codingioanniskrikos committed Nov 14, 2024
1 parent 7608765 commit 76dc279
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 67 deletions.
1 change: 1 addition & 0 deletions features/ui/frontend/payment/concurrency.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Feature: Create a new order
And the site has a tax rule group "AT"
And the tax rule group has a tax rule for country "Austria" with tax rate "AT"
And the site has a product "T-Shirt" priced at 2000
And the product is active and published and available for store "Austria"
And the product has the tax rule group "AT"
And the site has a customer "[email protected]"
And the customer "[email protected]" has an address with country "Austria", "4600", "Wels", "Freiung", "9-11/N3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,82 +1,89 @@
{% import '@CoreShopFrontend/Common/Macro/currency.html.twig' as currency %}

{% set productUrl = pimcore_object_path(item.product) %}
<div class="shopping-cart-item mb-3">
<div class="d-md-flex justify-content-md-between gap-md-3 mb-2">
<div class="shopping-cart-item-info">
<a class="text-decoration-none" href="{{ productUrl }}">
<div class="flex-row gap-3 mb-2 layout4 card border-0">
{% if item.product and item.product.image is pimcore_asset_image %}
{{ item.product.image|pimcore_image_thumbnail_html('coreshop_productCartPreview', {'imgAttributes': {'class': 'img-fluid'}, 'alt': item.product.name, 'title': item.product.name}) }}
{% endif %}

<div class="p-0 card-body">
<div class="mt-md-1">
<h6 class="mb-1 card-title">
{{ item.name }}
</h6>
{% if item.isGiftItem %}
<br/><span>{{ 'coreshop.ui.gift_item'|trans }}</span>
<div class="shopping-cart-item mb-3">
<div class="d-md-flex justify-content-md-between gap-md-3 mb-2">
{% if item.product %}
{% set productUrl = pimcore_object_path(item.product) %}
<div class="shopping-cart-item-info">
<a class="text-decoration-none" href="{{ productUrl }}">
<div class="flex-row gap-3 mb-2 layout4 card border-0">
{% if item.product and item.product.image is pimcore_asset_image %}
{{ item.product.image|pimcore_image_thumbnail_html('coreshop_productCartPreview', {'imgAttributes': {'class': 'img-fluid'}, 'alt': item.product.name, 'title': item.product.name}) }}
{% endif %}
<p class="card-text">
shortdescription
</p>

<div class="p-0 card-body">
<div class="mt-md-1">
<h6 class="mb-1 card-title">
{{ item.name }}
</h6>
{% if item.isGiftItem %}
<br/><span>{{ 'coreshop.ui.gift_item'|trans }}</span>
{% endif %}
<p class="card-text">
shortdescription
</p>
</div>
</div>
</div>
</div>
</a>
</div>
</a>
</div>
<div class="d-flex justify-content-between gap-3 gap-md-5 mb-3">
<div class="text-right cart-item-price">
{% set price = item.itemPrice %}
{% set discount = item.itemDiscount %}
{% set discountPrice = item.itemDiscountPrice %}
{% set retailPrice = item.itemRetailPrice %}

<div><small>Each:</small></div>
<span class="price-new">{{ currency.convertAndFormat(price) }}</span>
{% if price < retailPrice %}
{% if discountPrice > 0 %}
<span class="price-old">{{ currency.convertAndFormat(retailPrice) }}</span>
{% endif %}
{% if discount < 0 %}
<span class="price-discount">(-{{ currency.convertAndFormat(discount) }})</span>
{% endif %}
{% endif %}
{% endif %}
{% if item %}
<div class="d-flex justify-content-between gap-3 gap-md-5 mb-3">
<div class="text-right cart-item-price">
{% set price = item.itemPrice %}
{% set discount = item.itemDiscount %}
{% set discountPrice = item.itemDiscountPrice %}
{% set retailPrice = item.itemRetailPrice %}

</div>
<div class="text-right cart-item-total-price">
<div><small>Total:</small></div>
<div class="price-new">
{% if item.discount < 0 %}
<span>({{ currency.convertAndFormat(item.discount) }})</span>
<div><small>Each:</small></div>
<span class="price-new">{{ currency.convertAndFormat(price) }}</span>
{% if price < retailPrice %}
{% if discountPrice > 0 %}
<span class="price-old">{{ currency.convertAndFormat(retailPrice) }}</span>
{% endif %}
{% if discount < 0 %}
<span class="price-discount">(-{{ currency.convertAndFormat(discount) }})</span>
{% endif %}
{% endif %}

{{ currency.convertAndFormat(item.total) }}
</div>
<div class="text-right cart-item-total-price">
<div><small>Total:</small></div>
<div class="price-new">
{% if item.discount < 0 %}
<span>({{ currency.convertAndFormat(item.discount) }})</span>
{% endif %}

{% set with_tax = coreshop_display_with_tax(coreshop.context) %}
{% if with_tax %}
<span class="order-3"><small>{{ 'coreshop.ui.inc_vat'|trans }}</small></span>
{% else %}
<span class="order-3"><small>{{ 'coreshop.ui.excl_vat'|trans }}</small></span>
{% endif %}
{{ currency.convertAndFormat(item.total) }}
</div>

{% set with_tax = coreshop_display_with_tax(coreshop.context) %}
{% if with_tax %}
<span class="order-3"><small>{{ 'coreshop.ui.inc_vat'|trans }}</small></span>
{% else %}
<span class="order-3"><small>{{ 'coreshop.ui.excl_vat'|trans }}</small></span>
{% endif %}
</div>
</div>
</div>
</div>
<div class="d-flex justify-content-end gap-3">
<div class="text-center">
{% if is_granted('CORESHOP_CART_REMOVE_ITEM') and not btnremove %}sss
<a
href="{{ path('coreshop_cart_remove', {cartItem: item.id|coreshop_string}) }}"
title="{{ 'coreshop.ui.remove'|trans }}"
class="btn btn-link"
data-id="{{ item.id }}"
{{ coreshop_test_html_attribute('cart-remove-button', item.name) }}
>
<i class="bi bi-trash me-2"></i> Remove
</a>
{% endif %}
</div>
{% if item %}
<div class="d-flex justify-content-end gap-3">
<div class="text-center">
{% if is_granted('CORESHOP_CART_REMOVE_ITEM') and not btnremove %}sss
<a
href="{{ path('coreshop_cart_remove', {cartItem: item.id|coreshop_string}) }}"
title="{{ 'coreshop.ui.remove'|trans }}"
class="btn btn-link"
data-id="{{ item.id }}"
{{ coreshop_test_html_attribute('cart-remove-button', item.name) }}
>
<i class="bi bi-trash me-2"></i> Remove
</a>
{% endif %}
</div>
</div>
{% endif %}
</div>
</div>

0 comments on commit 76dc279

Please sign in to comment.