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’, […]

Install attribute in entity main table

Sometimes it is useful to add some fields to the attribute main table (f.e.: IDs from external systems like a middleware or a PIM). In the following example you can see how to add ID-fields to the category entity. Therefore I created a setupscript as an instance of Mage_Catalog_Model_Resource_Setup. Setup-model declaration in config.xml: <?xml version=”1.0″?> […]