Skip to content

Commit

Permalink
Merge pull request #54 from Paazl/1.5.0
Browse files Browse the repository at this point in the history
1.5.0
  • Loading branch information
Marvin-Magmodules authored Mar 26, 2021
2 parents fd6bc8e + 1df7880 commit 4237b07
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
12 changes: 12 additions & 0 deletions ViewModel/Pickup/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,16 @@ public function getLocationName()
{
return $this->getOrderInfo()->getLocationName();
}

/**
* @return string
*/
public function getLocationCode()
{
try {
return (string)$this->getOrderInfo()->getLocationCode();
} catch (NoSuchEntityException $e) {
return '';
}
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "paazl/magento2-checkout-widget",
"description": "Paazl checkoutWidget for Magento 2",
"type": "magento2-module",
"version": "1.4.1",
"version": "1.5.0",
"keywords": [
"Paazl",
"Magento 2",
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<default>
<carriers>
<paazlshipping>
<version>v1.4.1</version>
<version>v1.5.0</version>
<active>0</active>
<sallowspecific>0</sallowspecific>
<price>0</price>
Expand Down
7 changes: 7 additions & 0 deletions view/adminhtml/templates/order/view/pickup/info.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ $viewModel = $block->getData('pickupViewModel');
<?= $block->escapeHtml($viewModel->getLocationName()) ?>
<div class="pickup-info-wrapper">
<?= /* @escapeNotVerified */ $pickupAddress ?>

<?php if ($viewModel->getLocationCode()): ?>
<div class="store-code-wrapper">
<strong><?= /* @noEscape */ __('Pick-up location ID') ?>:</strong><br/>
<?= $block->escapeHtml($viewModel->getLocationCode())?>
</div>
<?php endif; ?>
</div>
<?php endif;?>

7 changes: 6 additions & 1 deletion view/adminhtml/web/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,9 @@ section.paazl.method-select {
section.paazl.method-select section.paazl__body.body form.options {
max-height: 400px;
overflow-y: auto;
}
}

.pickup-info-wrapper .store-code-wrapper {
margin-top: 1.5em;
margin-bottom: 1.5em;
}

0 comments on commit 4237b07

Please sign in to comment.