diff --git a/src/Spryker/Zed/Customer/Communication/Table/CustomerTable.php b/src/Spryker/Zed/Customer/Communication/Table/CustomerTable.php
index ecb6346b..a9421937 100644
--- a/src/Spryker/Zed/Customer/Communication/Table/CustomerTable.php
+++ b/src/Spryker/Zed/Customer/Communication/Table/CustomerTable.php
@@ -172,10 +172,15 @@ protected function hydrateCustomerListRow(SpyCustomer $customer)
protected function getCountryNameByCustomer(SpyCustomer $customer)
{
$countryName = '';
+ if ($customer->getAddresses()->count() === 0) {
+ return $countryName;
+ }
- if ($customer->getAddresses()->count() > 0) {
- $address = $customer->getAddresses()->get(0);
- $countryName = $address->getCountry()->getName();
+ $addresses = $customer->getAddresses();
+ foreach ($addresses as $address) {
+ if ($address->getFkCountry() === $customer->getCountry()) {
+ return $address->getCountry()->getName();
+ }
}
return $countryName;
diff --git a/src/Spryker/Zed/Customer/Communication/navigation.xml b/src/Spryker/Zed/Customer/Communication/navigation.xml
index fc5c92bf..9d363130 100644
--- a/src/Spryker/Zed/Customer/Communication/navigation.xml
+++ b/src/Spryker/Zed/Customer/Communication/navigation.xml
@@ -7,7 +7,6 @@
#
1
-
Customers
@@ -15,9 +14,7 @@
index
index
1
-
-
Add a customer
@@ -26,7 +23,14 @@
index
0
-
+
+
+ Edit customer
+ customer
+ edit
+ index
+ 0
+
View
@@ -35,33 +39,26 @@
index
0
-
-
-
- Edit customer
- customer
- edit
- index
- 0
-
-
-
- Edit address
- customer
- address
- edit
- 0
-
-
+
+ Edit address
+ customer
+ address
+ edit
+ 0
+
+
+
+ Add address
+ customer
+ address
+ add
+ 0
+
-
-
-
-
diff --git a/src/Spryker/Zed/Customer/Presentation/Edit/index.twig b/src/Spryker/Zed/Customer/Presentation/Edit/index.twig
index b98f9f15..de895d19 100644
--- a/src/Spryker/Zed/Customer/Presentation/Edit/index.twig
+++ b/src/Spryker/Zed/Customer/Presentation/Edit/index.twig
@@ -7,7 +7,8 @@
{% block action %}
{{ removeActionButton(url('/customer/delete', {'id-customer': idCustomer}), 'Delete' | trans) }}
- {{ backActionButton(url('/customer/view', {'id-customer': idCustomer}), 'Back to Customer View' | trans) }}
+ {{ viewActionButton(url('/customer/view', {'id-customer': idCustomer}), 'View' | trans) }}
+ {{ backActionButton(url('/customer'), 'Back to Customers' | trans) }}
{% endblock %}
{% block content %}