diff --git a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml index ecc2b5beee321..10b7b1c028c66 100644 --- a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml +++ b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml @@ -35,7 +35,13 @@ - + + + + * + + + diff --git a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml index 3ec450a570b46..ac1233c5e4961 100644 --- a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml +++ b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml @@ -35,7 +35,13 @@ - + + + + * + + + diff --git a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml index 27cef50742163..6db77a79b8c14 100644 --- a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml +++ b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml @@ -35,7 +35,13 @@ - + + + + * + + + diff --git a/app/code/Magento/Ui/Component/ExportButton.php b/app/code/Magento/Ui/Component/ExportButton.php index 9d5f125839003..284362a119bad 100644 --- a/app/code/Magento/Ui/Component/ExportButton.php +++ b/app/code/Magento/Ui/Component/ExportButton.php @@ -54,11 +54,13 @@ public function getComponentName() */ public function prepare() { + $context = $this->getContext(); $config = $this->getData('config'); if (isset($config['options'])) { $options = []; foreach ($config['options'] as $option) { - $option['url'] = $this->urlBuilder->getUrl($option['url']); + $additionalParams = $this->getAdditionalParams($config, $context); + $option['url'] = $this->urlBuilder->getUrl($option['url'], $additionalParams); $options[] = $option; } $config['options'] = $options; @@ -66,4 +68,25 @@ public function prepare() } parent::prepare(); } + + /** + * Get export button additional parameters + * + * @param array $config + * @param ContextInterface $context + * @return array + */ + protected function getAdditionalParams($config, $context) + { + $additionalParams = []; + if (isset($config['additionalParams'])) { + foreach ($config['additionalParams'] as $paramName => $paramValue) { + if ('*' == $paramValue) { + $paramValue = $context->getRequestParam($paramName); + } + $additionalParams[$paramName] = $paramValue; + } + } + return $additionalParams; + } }