Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
- <type name="MagentoSalesBlockAdminhtmlOrderCreateItems">
- <plugin name="vendor-module-order-create-items-block" type="VendorModulePluginOrderCreateItems" sortOrder="100" />
- </type>
- </config>
- <?php
- namespace VendorModulePluginOrderCreate;
- class Items
- {
- public function afterGetButtonsHtml(MagentoSalesBlockAdminhtmlOrderCreateItems $subject, $result)
- {
- $url = 'http://www.google.com';
- $result .= $subject->getLayout()->createBlock(
- MagentoBackendBlockWidgetButton::class
- )->setData(
- ['label'=>'Add New Products', 'type'=>'button', 'id'=> 'add_new_products', 'class' => 'action-secondary action-add', 'on_click'=>"window.location.href='" . $url . "'"]
- )->toHtml();
- return $result;
- }
- }
Add Comment
Please, Sign In to add comment