Add product attribute columns to Woocommerce backend grid

If you have to extend the backend product grid of Woocommerce by an custom attribute , you have to follow the steps below to add product attribute columns to Woocommerce backend grid: Register and sort  the new columns via a filter hook (‘manage_edit-product_columns’): <?php add_filter( ‘manage_edit-product_columns’, ‘add_columns_to_product_grid’, 10, 1 ); const BACKEND_PRODUCT_GRID_FIELD_SORTORDER = [ ‘cb’, ‘thumb’, ‘name’, […]

Multiselect Options Text

To render the text-values of an multiselect in a BE-grid: <?php /** * * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * It is available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * * * @category AskSheldon * @package AskSheldon_Adminhtml * […]

Create your own Backend theme

When developing Magento Backend functionalities, sometimes you need to add own layout files or templates. In these cases it is a good idea to create a new Backend theme under adminhtml and to modify the Magento configuration to lookup layout files and templates in this new theme before searching in the default one. Therefore you have to create […]

Image Grid Column Renderer

To show product image previews in Magento Backend, you have to add a image grid column renderer block first: <?php /** * * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * It is available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php […]

Add a main menu entry in Magento

This is how you can add a main menu entry to the Magento main menu in your modules adminhtml.xml: <?xml version=”1.0″ encoding=”UTF-8″?> <config> <menu> <sheldon_wysiwyg module=”sheldon_wysiwyg”> <title>WYSIWYG</title> <sort_order>88</sort_order> <children> <test module=”sheldon_wysiwyg” translate=”title”> <title>Test</title> <sort_order>0</sort_order> <action>adminhtml/sheldon_wysiwyg/data</action> </test> </children> </sheldon_wysiwyg> </menu> <acl> <resources> <all> <title>Allow Everything</title> </all> <admin> <children> <sheldon_wysiwyg> <title></title> <sort_order>70</sort_order> <children> <posts> <title>Manage Posts</title> <sort_order>0</sort_order> […]

Magento – Put Category-IDs into category tree in backend

To show the category IDs in the category tree under Catalog->Categories->Manage Categories you can rewrite Mage_Adminhtml_Block_Catalog_Category_Tree in an own module. You have to rewrite the method buildNodeName like this: /** * Get category name * * @param Varien_Object $node * @return string */ public function buildNodeName($node) { $result = $this->escapeHtml($node->getName()); if ($this->_withProductCount) { $result .= ‘ (‘ . $node->getProductCount() […]