Download the PHP package orangecat/module-company-methods without Composer

On this page you can find all versions of the php package orangecat/module-company-methods. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-company-methods

Orangecat_CompanyMethods

Restrict the payment and shipping methods available to each company at checkout.

Module: Orangecat_CompanyMethods | Version: 1.0.0 | License: OSL-3.0 | Author: Oliverio Gombert


Table of Contents

  1. Overview
  2. Theme Compatibility
  3. Requirements
  4. Installation
  5. What Gets Installed
  6. Configuration
  7. Store Admin Guide
  8. Buyer Guide (Frontend)
  9. Developer Guide
  10. REST API
  11. Frontend Routes Reference
  12. DevOps & Integrator Notes

1. Overview

Orangecat_CompanyMethods lets store administrators define which payment and shipping methods are available to each company. At checkout, the module intercepts Magento's native method-resolution pipeline via plugins and filters the returned lists against the allowed methods stored for the active customer's company.

Responsibilities:

Position in the Orangecat B2B Dependency Chain

Empty Assignment Semantics

When no methods are stored for a company, the module applies no restriction — all store-level payment and shipping methods remain available at checkout. A restriction takes effect only when at least one method code is explicitly saved for that company and type. This is an intentional pass-through default: newly created companies inherit no limits without any admin action required.


2. Theme Compatibility

Theme Status Notes
Luma Supported All filtering is server-side; no custom templates required
Hyvä Supported All filtering is server-side; no custom templates required
Breeze Evolution Supported All filtering is server-side; no custom templates required

Because the module operates exclusively through backend plugins on Magento's checkout APIs, the method lists presented to the storefront are already filtered before any theme-specific rendering occurs. No theme-specific templates, layout files, or JS components are needed.


3. Requirements

Dependency Version / Notes
PHP >= 8.1
magento/framework *
magento/module-payment *
magento/module-shipping *
magento/module-quote *
magento/module-ui *
orangecat/core *
orangecat/module-company * — provides the Company entity and CompanyManagementInterface

4. Installation

Step 1 — Add as a git submodule (if working from the B2B SDK development environment):

Step 2 — Enable the module (run inside reward shell):


5. What Gets Installed

Database Tables

mycompany_methods — Company Payment and Shipping Method Assignments

Column Type Nullable Notes
entity_id int(10) unsigned No Primary key, auto-increment
company_id int(10) unsigned No FK → mycompany.entity_id (CASCADE DELETE)
method_type varchar(20) No payment or shipping
method_code varchar(255) No Native Magento method code (e.g. checkmo, flatrate_flatrate)

Constraints:

EAV Attributes

None.

Data Patches

None. No default records, roles, CMS pages, or seed data are created on install.


6. Configuration

This module has no system.xml and therefore no global or store-scoped configuration stored in core_config_data.

All configuration is per-company and is stored directly in the mycompany_methods table (see Store Admin Guide).


7. Store Admin Guide

Accessing the Sales Methods Settings

  1. In the Magento Admin, navigate to Companies (the main Companies grid provided by Orangecat_Company).
  2. Click Edit on the target company.
  3. Scroll to the Sales Methods fieldset near the bottom of the form.

Sales Methods Fieldset

Field Description
Payment Methods Multiselect. Lists all active payment methods for the store. Select one or more to restrict this company to those methods. Leave empty to allow all.
Shipping Methods Multiselect. Lists all active carriers and their methods. Select one or more to restrict this company to those methods. Leave empty to allow all.

The Payment Methods picker is populated from Magento\Payment\Api\PaymentMethodListInterface::getActiveList. The Shipping Methods picker lists all active carriers from Magento\Shipping\Model\Config::getActiveCarriers, displayed as Carrier Title - Method Title.

Workflow: Restrict a Company to Specific Methods

Example: Allow only Purchase Order and Company Credit for payment; restrict shipping to flat rate only.

  1. Open the company edit form.
  2. In Payment Methods, hold Ctrl/Cmd and select Purchase Order and Company Credit.
  3. In Shipping Methods, select Flat Rate - Fixed.
  4. Click Save Company.

From this point, buyers belonging to that company will see only those methods at checkout. All other methods are hidden, regardless of store-level configuration.

Removing All Restrictions

To re-allow all store methods for a company, open the company form, clear all selections in both multiselects (click each selected item to deselect, or use your browser's multiselect clear mechanism), and save. When no items are stored, the module applies no filtering.


8. Buyer Guide (Frontend)

There are no dedicated frontend pages or routes in this module. The module's effect is fully transparent to the buyer — restricted methods simply do not appear in the checkout shipping step or payment step.

What buyers experience:

No frontend login, dashboard, or URL is associated with this module.


9. Developer Guide

Module Structure

Key Classes

Orangecat\CompanyMethods\Api\Data\CompanyMethodsInterface

Data object for a single method assignment row.

Constants: TYPE_PAYMENT = 'payment', TYPE_SHIPPING = 'shipping'.

Orangecat\CompanyMethods\Api\CompanyMethodsRepositoryInterface

Observers

None — this module registers no event observers.

Plugins

Class Target Hook Purpose
Plugin\Payment\PaymentMethodListPlugin Magento\Payment\Model\MethodList after getAvailableMethods Filters the returned payment method list to those allowed for the customer's company
Plugin\Shipping\ShippingMethodManagementPlugin Magento\Quote\Model\ShippingMethodManagement after estimateByExtendedAddress, after estimateByAddressId Filters the returned shipping method list to those allowed for the customer's company
Plugin\Api\CompanyRepositoryPlugin Orangecat\Company\Api\CompanyRepositoryInterface after save Reads sales_methods from the POST request and persists payment/shipping assignments
Plugin\Ui\Component\Form\Company\DataProviderPlugin Orangecat\Company\Ui\Component\Form\Company\DataProvider after getData Injects stored payment_methods and shipping_methods comma-separated strings into the form data array

Filtering logic (both checkout plugins): If the company has zero stored methods of a given type, the original result is returned unchanged. If at least one method is stored, only methods whose code appears in the stored list are kept; all others are removed. Errors during lookup are caught, logged, and the original list is returned as a safe fallback.

JS Components

None — this module ships no JavaScript files.

Email Templates

None.

ACL Resources

None — this module does not register ACL resources. Access to the Sales Methods fieldset is governed by the existing Company edit ACL from Orangecat_Company.

Adding Custom Logic


10. REST API

This module exposes no REST endpoints. There is no etc/webapi.xml. Method assignment is performed exclusively through the admin UI.


11. Frontend Routes Reference

This module has no frontend controllers or routes. There is no etc/frontend/routes.xml. All functionality is backend-only.


12. DevOps & Integrator Notes

Deployment Checklist

Integration Token Scope

This module has no dedicated ACL resources. An integration token with access to the Company entity (via Orangecat_Company ACL resources) is sufficient for any programmatic use. No additional minimum ACL permissions are required.

Disabling Without Uninstalling

When disabled, the checkout filter plugins are deactivated — all store-level payment and shipping methods become available to all companies again. The mycompany_methods table and its data persist in the database. Re-enabling the module immediately restores all previously configured restrictions without data loss.

Data Integrity Notes


All versions of module-company-methods with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
magento/framework Version *
orangecat/core Version *
orangecat/module-company Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package orangecat/module-company-methods contains the following files

Loading the files please wait ...