How to add the popup(when you click on delete item) to a custom button, Screenshot Below
<?php
$orderStatus = $_order->getStatusLabel();
if ($orderStatus == 'Pending' || $orderStatus == 'Processing')
{
?>
<a href="<?php /* @escapeNotVerified */
echo $block->getBaseUrl() . 'ordercancel/index/ordercancel?orderId=' . $_order->getId(); ?>" class="action view">
<span><?php /* @escapeNotVerified */
echo __('Cancel Order') ?></span>
</a>
<?php
} ?>
Want to add this popup when customer click order cancel
Best Answer
You can try with below code,
data-order with order id is added in anchor tag.