Skip to content

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.

Notifications You must be signed in to change notification settings

addison74/ProductTaxClasses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenmageLabs ProductTaxClasses

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.

🧩 Features

  • 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).

⚙️ Installation

  1. Copy all module files into your Magento/OpenMage root directory.
  2. Clear the Magento cache (System > Cache Management).
  3. Logout and log back into the admin panel to trigger setup script execution.

🛠️ Configuration

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.

💡 How It Works

  • 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).

🧪 Compatibility

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).

Layout XML for Magento 1.9.2.4

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>

📝 License

MIT License

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published