considering below in controller:
/**
*
* @return string
*/
public function execute()
{
$resultJson = $this->resultJsonFactory->create();
$layout = $this->_view->getLayout();
$block = $layout->createBlock('Magento\Sales\Block\Adminhtml\Order\Create\Totals')->renderTotals('footer');
$this->log->debug($block);
return $resultJson->setData($block);
}
I get below in logger:
[2017-10-01 10:06:45] main.DEBUG: <tr class="row-totals">
<td style="" class="admin__total-mark" colspan="1">
<strong>Grand Total</strong>
</td>
<td style="" class="admin__total-amount">
<strong><span class="price">NOK37.20</span></strong>
</td>
</tr>
below is my ajax call in view and I need to get the total amount 37.20
, but got stuck :
$.ajax({
showLoader: true,
url: ajaxurl,
dataType: "html",
data: {
form_key: $('input[name=form_key').val()
},
type: "POST"
}).done(function (result) {
// how to process result
});
Appreciate any hint to access the price form result
.