Guest User

Untitled

a guest
Nov 12th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
  2. <type name="MagentoSalesBlockAdminhtmlOrderCreateItems">
  3. <plugin name="vendor-module-order-create-items-block" type="VendorModulePluginOrderCreateItems" sortOrder="100" />
  4. </type>
  5. </config>
  6.  
  7. <?php
  8. namespace VendorModulePluginOrderCreate;
  9.  
  10. class Items
  11. {
  12. public function afterGetButtonsHtml(MagentoSalesBlockAdminhtmlOrderCreateItems $subject, $result)
  13. {
  14. $url = 'http://www.google.com';
  15. $result .= $subject->getLayout()->createBlock(
  16. MagentoBackendBlockWidgetButton::class
  17. )->setData(
  18. ['label'=>'Add New Products', 'type'=>'button', 'id'=> 'add_new_products', 'class' => 'action-secondary action-add', 'on_click'=>"window.location.href='" . $url . "'"]
  19. )->toHtml();
  20. return $result;
  21. }
  22. }
Add Comment
Please, Sign In to add comment