Skip to content

Commit

Permalink
Use getId instead of getRealOrderId to avoid issues (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
loginesta authored Oct 2, 2023
1 parent 2c00de1 commit d5a09cc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* ************************************************************************
*/
?>
<div id="cancel-order-modal-<?=/* @noEscape */ $block->getOrder()->getRealOrderId() ?>">
<div id="cancel-order-modal-<?=/* @noEscape */ $block->getOrder()->getId() ?>">
<div class="modal-body-content">
<h3><?= $block->escapeHtml(__('Cancel order')) ?>
<span class="cancel-order-id"><?=/* @noEscape */ $block->getOrder()->getRealOrderId() ?></span>
</h3>
<p><?= $block->escapeHtml(__('Provide a cancellation reason:')) ?></p>
<form>
<select id="cancel-order-reason-<?=/* @noEscape */ $block->getOrder()->getRealOrderId() ?>"
<select id="cancel-order-reason-<?=/* @noEscape */ $block->getOrder()->getId() ?>"
class="cancel-order-reason" name="reason">
<?php foreach ($block->getReasons() as $key => $description): ?>
<option value="<?= $block->escapeHtml(__($description)) ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ $viewModel = $block->getViewModel();
<?php endif ?>
<?php if ($viewModel->canCancel($_order->getEntityId())): ?>
<a href="#" class="cancel-order"
id="cancel-order-<?=/* @noEscape */ $_order->getRealOrderId() ?>" data-mage-init='{
id="cancel-order-<?=/* @noEscape */ $_order->getId() ?>" data-mage-init='{
"cancelOrderModal":{
"url": "<?=/* @noEscape */ $block->getBaseUrl(); ?>",
"order_id": "<?= $block->escapeHtml(__($_order->getRealOrderId())); ?>"
"order_id": "<?= $block->escapeHtml(__($_order->getId())); ?>"
}
}'>
<span><?= $block->escapeHtml(__('Cancel Order')) ?></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ $viewModel = $block->getViewModel();
<?php endif ?>
<?php if ($viewModel->canCancel($_order->getEntityId())): ?>
<a href="#" class="cancel-order"
id="cancel-order-<?=/* @noEscape */ $_order->getRealOrderId() ?>" data-mage-init='{
id="cancel-order-<?=/* @noEscape */ $_order->getId() ?>" data-mage-init='{
"cancelOrderModal":{
"url": "<?=/* @noEscape */ $block->getBaseUrl(); ?>",
"order_id": "<?= $block->escapeHtml(__($_order->getRealOrderId())); ?>"
"order_id": "<?= $block->escapeHtml(__($_order->getId())); ?>"
}
}'>
<span><?= $block->escapeHtml(__('Cancel Order')) ?></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ $viewModel = $block->getViewModel();
<?php endif ?>
<?php if ($viewModel->canCancel($_order->getEntityId())): ?>
<a href="#" class="cancel-order"
id="cancel-order-<?=/* @noEscape */ $_order->getRealOrderId() ?>" data-mage-init='{
id="cancel-order-<?=/* @noEscape */ $_order->getId() ?>" data-mage-init='{
"cancelOrderModal":{
"url": "<?=/* @noEscape */ $block->getBaseUrl(); ?>",
"order_id": "<?= $block->escapeHtml(__($_order->getRealOrderId())); ?>"
"order_id": "<?= $block->escapeHtml(__($_order->getId())); ?>"
}
}'>
<span><?= $block->escapeHtml(__('Cancel Order')) ?></span>
Expand Down

0 comments on commit d5a09cc

Please sign in to comment.