From 64caff793081baa3a32a32f6a661ea155022afe6 Mon Sep 17 00:00:00 2001 From: reindertvetter Date: Mon, 10 Apr 2017 10:09:36 +0200 Subject: [PATCH] useV2Endpoint only myparcel_print_labels --- .../TIG/MyParcel2014/sales/order/mass_actions.phtml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/design/adminhtml/default/default/template/TIG/MyParcel2014/sales/order/mass_actions.phtml b/app/design/adminhtml/default/default/template/TIG/MyParcel2014/sales/order/mass_actions.phtml index 328b1b72..faa67920 100755 --- a/app/design/adminhtml/default/default/template/TIG/MyParcel2014/sales/order/mass_actions.phtml +++ b/app/design/adminhtml/default/default/template/TIG/MyParcel2014/sales/order/mass_actions.phtml @@ -150,12 +150,13 @@ return; } + var massActionSelect = $('sales_order_grid_massaction-select'); + var selectedMassAction = massActionSelect[massActionSelect.selectedIndex]; + /** * Additional MyParcel functionality */ if (!skipMyParcelCheck) { - massActionSelect = $('sales_order_grid_massaction-select'); - selectedMassAction = massActionSelect[massActionSelect.selectedIndex]; if (selectedMassAction.value == 'myparcel_print_labels') { var paper_type = 'getConfig('print_orientation');?>'; @@ -250,7 +251,12 @@ return; } - useV2Endpoint = $$('input:checked[name=order_ids]').length > ; + + if (selectedMassAction.value == 'myparcel_print_labels') { + useV2Endpoint = $$('input:checked[name=order_ids]').length > ; + } else { + useV2Endpoint = false; + } if ((this.useAjax || useV2Endpoint)&& item.url) { new Ajax.Request(item.url, {