Magento 1 / OpenMage module that allows administrators to restrict which product Tax Classes are available when creating or editing a product in the admin panel.
- Hide specific product tax classes in the admin product form.
- Keep the selected tax class visible even if it is hidden in configuration.
- Fully configurable via
System > Configuration > Sales > Tax > Product Tax Classes
. - Compatible with both Magento 1.9.2.4+ and OpenMage 20.10.0+ (with layout handling differences noted below).
- Copy all module files into your Magento/OpenMage root directory.
- Clear the Magento cache (
System > Cache Management
). - Logout and log back into the admin panel to trigger setup script execution.
Go to:
System > Configuration > Sales > Tax > Product Tax Classes
- Visible Product Tax Classes – Select which tax classes will appear in the product edit interface.
- Note: By default, all product tax classes are available.
- The module uses an observer (
adminhtml_block_html_before
) to filter the<select>
options in the admin form. - A JavaScript enhancement hides unselected options without removing them entirely from the DOM.
- The selected tax class (if hidden) remains visible and selectable.
- The list of visible tax class IDs is injected into the admin page as a global JS variable (
window.visibleTaxClassIds
).
Magento Version | Status | Notes |
---|---|---|
OpenMage 20.10.0+ | ✅ | Fully compatible with layout XML format used in this module. |
Magento 1.9.2.4 | ✅ | JS injection requires slight layout XML adjustment (see below). |
If the default layout does not inject inject.phtml
properly, use this workaround:
<adminhtml_catalog_product_edit>
<reference name="content">
<block type="core/template" name="openmagelabs.producttaxclasses.jsinject" template="openmagelabs/producttaxclasses/inject.phtml" />
</reference>
</adminhtml_catalog_product_edit>
MIT License