How to add custom button to order view page near "Back" and "Edit"?
相关问题
- Magento 1.7.0.2 Index Management overwriting URL R
- change button color on-click and remains same for
- How to get a slug name for a page without creating
- Magento: Best way to avoid extension conflicts
- Magento Fatal error: Maximum execution error solut
相关文章
- Magento, translate validation error messages
- Magento API order id vs. increment id
- Unique constraint violation on Magento 1.4.0 to 1.
- Android add image to button
- How to close form
- Editing Magento sales e-mail payment block
- Create a button with an image in Flutter?
- Android Button needs two click for action
config.xml:
Namespace/Module/Block/Adminhtml/Sales/Order/View.php:
If you want to do it quick-and-dirty (i.e. editing core files), open
app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
and add something like:You can place that before this block:
Your challenge, should you choose to accept is to create a file in local that is an over-ride of the core file, and to post it here!
In reference to the comments above about the parent::__constructor, here is what worked for me:
Instead of core hacks or rewrites, just use an observer to add the button to the order:
Then just check in the observer if the type of the block matches the order view:
The "getUrl" function of the block will automatically append the current order id to the controller call.