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

fix addressAccessType check and improve view #1544

Merged
merged 2 commits into from
Dec 29, 2020
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 @@ -14,9 +14,13 @@
</nav>

<h2 class="main-heading text-center">
{{ 'coreshop.ui.address'|trans }} <br/>
{% if address.addressIdentifier is not empty %}
{{ ('coreshop.ui.' ~ address.addressIdentifier.name ~ '_address')|trans }}
{% else %}
{{ 'coreshop.ui.address'|trans }}
{% endif %}
{% if not address.getId %}
<span>{{ 'coreshop.ui.add_new_address'|trans }}</span>
<span>{{ 'coreshop.ui.add_new_address'|trans }}</span>
{% endif %}
</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
<div class="card card-smart">
<div class="card-body">
{% if customer is not coreshop_address_owner_of(address) %}
<span class="badge badge badge-secondary float-right">{{ 'coreshop.ui.company_address'|trans }}</span>
<span class="badge badge-secondary float-right">{{ 'coreshop.ui.company_address'|trans }}</span>
{% elseif address.addressIdentifier is not empty %}
<span class="badge badge-secondary float-right">{{ ('coreshop.ui.' ~ address.addressIdentifier.name ~ '_address')|trans }}</span>
{% endif %}
{{ address|coreshop_format_address }}
<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function checkAddressAffiliationPermissionForCustomer(CustomerInterface $
return true;
}

if ($customer->getAddressAccessType() === null) {
if (empty($customer->getAddressAccessType())) {
return $customer->hasAddress($address);
}

Expand Down