Orange Collar Media
Orange Collar Media
DOCS
OCMLABS/MODULE-EXTRA-FEES · INSTALLATION

Installing the Extra Fees module and creating your first fee

MAGENTO 2.4.7 - 2.4.8 PHP 8.3+ LUMA + HYVÄ COMPOSER

Requirements

  • Magento Open Source or Adobe Commerce 2.4.7 - 2.4.8 (magento/framework >=103.0.7 <103.0.9); 2.4.9 is not supported
  • PHP 8.3 or higher
  • GraphQL coverage is automatic when Magento_GraphQl, Magento_QuoteGraphQl, and Magento_SalesGraphQl are enabled; on a REST-only install the schema is simply never parsed

Install via Composer

Composer access to the package is granted with purchase through the OCMLabs Packagist repository. The license is $250 for Magento Open Source (ocmlabs/module-extra-fees) and $500 for Adobe Commerce (ocmlabs/module-extra-fees-commerce); pick the edition on the product page at checkout.

Terminal window
composer require ocmlabs/module-extra-fees
bin/magento module:enable OCMLabs_ExtraFees
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

setup:static-content:deploy matters here: the fee form’s condition builder and the checkout components are deployed static assets, and skipping the deploy leaves them missing or stale on a production-mode store.

Adobe Commerce customers instead run composer require ocmlabs/module-extra-fees-commerce - a metapackage that licenses the module for Adobe Commerce and pulls in ocmlabs/module-extra-fees automatically. The remaining bin/magento steps are identical.

Hyva theme

If your storefront runs Hyva, install the companion compatibility module alongside the core module:

Terminal window
composer require ocmlabs/module-extra-fees-hyva
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

The companion module (Hyva_OCMLabsExtraFees) registers with Hyva’s compat module registry and renders fee lines in the Hyva cart totals with Alpine.js/Tailwind templates. Checkout fee lines and the optional-fee checkbox work through the standard Luma/Knockout checkout, which Hyva stores fall back to for the checkout flow. Native Hyva Checkout (Magewire) is not supported. See Troubleshooting for the details.

Verify the installation

Terminal window
bin/magento module:status OCMLabs_ExtraFees

The output should read Module is enabled. In the admin panel, check for two new locations:

  • Sales > Extra Fees > Manage Fees - the fee management grid
  • Stores > Configuration > OrangeCollar > Extra Fees - the module configuration

If either menu item is missing, run bin/magento cache:clean config full_page.

Enable the module - it ships disabled

The global switch defaults to No, so nothing renders until you turn it on:

  1. Go to Stores > Configuration > OrangeCollar > Extra Fees
  2. Set Enable Extra Fees to Yes
  3. Save, then bin/magento cache:flush

Grant admin access

Four ACL resources live under System > Permissions > User Roles:

  • OCMLabs_ExtraFees::view - read-only access to the fee grid, the fee form, the Fee Revenue report, and the Change Log
  • OCMLabs_ExtraFees::manage - create/edit fees, mass enable/disable, Duplicate (nested under view)
  • OCMLabs_ExtraFees::delete - delete and mass delete (also nested under view)
  • OCMLabs_ExtraFees::config - the configuration section

Upgrading from a version that predates the view-only role requires no role edits: a data patch grants view access to every role that already held manage or delete.

Create your first fee

  1. Go to Sales > Extra Fees > Manage Fees and click Add New Fee.
  2. Name it (this text is what shoppers see), pick Fixed or Percentage, and enter the amount.
  3. Add a condition - for example, a product attribute value that marks items needing special handling - or leave conditions empty to apply the fee to every cart.
  4. Set Is Active to Yes and save.
  5. Add a matching product to the cart on the storefront: the fee appears as its own line in the cart totals, and again in the checkout order summary.

If the fee does not appear, work through the checklist in Troubleshooting - store scope, schedule window, and condition option IDs are the usual causes.

Uninstall

bin/magento module:uninstall OCMLabs_ExtraFees --remove-data is a clean uninstall: it drops the module’s five tables, every column it added to quote, quote_address, sales_order, sales_order_grid, sales_invoice, and sales_creditmemo, and its configuration rows. A plain module:uninstall or module:disable leaves all data in place.