Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC-31773 Fixed issue with missing shipment price on Order Details page. #402

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
} %}

{% define data = {
shipment: required,
shipmentGroup: required,
shipmentExpenses: required,
isGiftCardExists: false,
canEdit: false,
} %}

{% block body %}
{% set shippingAddress = data.shipment.shippingAddress %}
{% set shipment = data.shipmentGroup.shipment %}
{% set shippingAddress = shipment.shippingAddress %}
{% set fullShippingAddress = shippingAddress.salutation ~ ' ' ~ shippingAddress.firstName ~ ' ' ~
shippingAddress.lastName ~ ', ' ~ shippingAddress.address1 ~ ' ' ~ shippingAddress.address2 ~ ', ' ~
shippingAddress.zipCode ~ ' ' ~ shippingAddress.city %}
Expand All @@ -28,20 +30,14 @@
{% if not data.isGiftCardExists %}
<div class="{{ config.name }}__item">
<h4 class="title title--secondary-small">{{ 'checkout.step.summary.delivery_method' | trans }}</h4>
<h4 class="title title--secondary-small spacing-bottom grid grid--justify grid--middle">
<span class="col col--sm-7">{{ data.shipment.method.carrierName | trans }}</span>
<span class="col">
{% set deliveryLogoName = data.shipment.method.carrierName | replace({' ': ''}) | lower ~ '-logo' %}
{% include atom('icon') with {
class: 'col',
modifiers: [deliveryLogoName],
data: {
name: deliveryLogoName,
},
} only %}
</span>
</h4>
<div class="{{ config.name }}__text">{{ data.shipment.method.name }}: {{ data.shipment.method.storeCurrencyPrice | money(true, data.shipment.method.currencyIsoCode) }}</div>

{% if data.shipmentExpenses[data.shipmentGroup.hash] is defined %}
{% include molecule('shipment-information', 'CustomerPage') ignore missing with {
data: {
shipmentExpense: data.shipmentExpenses[data.shipmentGroup.hash],
},
} only %}
{% endif %}

{% if data.canEdit %}
<a class="link link--secondary spacing-top spacing-top--big" href="{{ url('checkout-shipment') }}">{{ 'general.edit.button' | trans }}</a>
Expand All @@ -50,8 +46,8 @@

<div class="{{ config.name }}__item">
<h4 class="title title--secondary-small">{{ 'checkout.step.summary.requested_delivery_date' | trans }}</h4>
{% if data.shipment.requestedDeliveryDate %}
<div class="{{ config.name }}__text">{{ data.shipment.requestedDeliveryDate | formatDate }}</div>
{% if shipment.requestedDeliveryDate %}
<div class="{{ config.name }}__text">{{ shipment.requestedDeliveryDate | formatDate }}</div>
{% endif %}
{% if data.canEdit %}
<a class="link link--secondary spacing-top spacing-top--big" href="{{ url('checkout-shipment') }}">{{ 'general.edit.button' | trans }}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
<div class="col col--sm-12 col--lg-5">
{% include molecule('summary-sidebar', 'CheckoutPage') with {
data: {
shipment: shipmentGroup.shipment,
shipmentGroup: shipmentGroup,
shipmentExpenses: data.shipmentExpenses,
isGiftCardExists: isGiftCardExists,
canEdit: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@
<div class="col col--sm-12 col--xl-4">
{% include molecule('summary-sidebar', 'CheckoutPage') ignore missing with {
data: {
shipment: shipmentGroup.shipment,
shipmentGroup: shipmentGroup,
shipmentExpenses: data.orderShipmentExpenses,
isGiftCardExists: isGiftCardExists,
},
} only %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% embed molecule('action-bar') with {
data: {
title: 'customer.profile.order_details' | trans,
titleClass: 'title title--secondary-box',
titleClass: 'title title--secondary-box spacing-right spacing-right--inner',
},
embed: {
order: data.order,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './shipment-information.scss';
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@mixin customer-page-shipment-information($name: '.shipment-information') {
#{$name} {
&__content {
font-weight: fw(light);
letter-spacing: rem(-0.18);
}

@content;
}
}

@include customer-page-shipment-information();
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% extends molecule('shipment-information', '@SprykerShop:CustomerPage') %}
{% import _self as component %}

{% define config = {
tag: 'div',
} %}

{% block class %}
{{- component.renderClass(config.name, modifiers, class) -}}
{% endblock %}

{% block body %}
{% set shipmentMethod = data.shipmentExpense.shipment.method %}
{% set carrierName = shipmentMethod.carrierName %}

<h4 class="title title--secondary-small spacing-bottom grid grid--justify grid--middle">
<span class="col col--sm-7">{{ carrierName | trans }}</span>
<span class="col">
{% set deliveryLogoName = carrierName | replace({' ': ''}) | lower ~ '-logo' %}

{% include atom('icon') with {
modifiers: [deliveryLogoName],
data: {
name: deliveryLogoName,
},
} only %}
</span>
</h4>

<div class="{{ config.name }}__content">
{{ shipmentMethod.name }}: {{ data.shipmentExpense.sumPrice | money(true, shipmentMethod.currencyIsoCode) }}
</div>
{% endblock %}
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends molecule('customer-reorder-form', '@SprykerShop:CustomerReorderWidget') %}

{% block extraClass %}
box
{% endblock %}

{% block formContent %}
{% include molecule('order-detail', 'CustomerPage') ignore missing with {
class: 'spacing-top spacing-top--big',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
}

&__actions {
margin-right: -8px;

@include helper-breakpoint-media-min($md-min) {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
margin-right: rem(-8);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Pyz/Zed/Sales/SalesConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function getSalesDetailExternalBlocksUrls(): array
'cart_note_bundle_items' => '/cart-note-product-bundle-connector/sales/list', #CartNoteFeature
'payments' => '/sales-payment-gui/sales/list',
'giftCards' => '/gift-card/sales/list',
'shipment' => '/shipment/sales/list',
'discount' => '/discount/sales/list',
'refund' => '/refund/sales/list',
];
Expand Down
Loading