Download the PHP package orangecat/module-prices-list without Composer

On this page you can find all versions of the php package orangecat/module-prices-list. 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-prices-list

Orangecat_PricesList

Customer-specific B2B price lists with volume tiers, multi-list resolution, and import support.

Module: Orangecat_PricesList Version: 1.0.0 License: OSL-3.0 Author: Oliverio Gombert [email protected]


Table of Contents

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

Overview

Orangecat_PricesList provides a named, reusable price list system for Magento 2 B2B stores. Each price list contains per-SKU pricing rules (fixed price, percentage discount, or fixed amount discount) with optional volume tiers based on minimum quantity. Price lists are assigned to companies with a numeric priority that controls which list wins when a customer belongs to a company with multiple assigned lists.

The module also exposes a CSV import pipeline for bulk price management and a full REST API for integrations.

Responsibilities:

Position in the Orangecat B2B Dependency Chain

Price Resolution Modes

When a company has more than one price list, the calculator resolves the effective price using the configured mode:

Mode Behaviour
Cascade (default) Iterates lists in descending priority order. The first list that contains the SKU and satisfies the minimum quantity requirement wins. Lower-priority lists are ignored.
Weight All valid lists are evaluated. The lowest computed price across all lists wins.

In both modes, a list entry only qualifies if the cart quantity is ≥ the entry's qty threshold. Higher priority value = higher precedence.

Discount Types

Type Stored value Behaviour
Fixed Price Override fixed_price Replaces base price with amount
Percentage Discount percentage base_price × (1 − amount / 100)
Fixed Amount Discount fixed_amount base_price − amount

All computed prices are floor-clamped to 0.


Theme Compatibility

Theme Status Notes
Luma Supported Admin UI only; no storefront templates
Hyvä Supported Admin UI only; no storefront templates
Breeze Evolution Supported Admin UI only; no storefront templates

This module has no frontend (storefront) templates. Price calculation happens server-side inside Orangecat_Prices; the rendered price on the product page depends on how Orangecat_Prices injects the calculated price into the theme. No theme-specific work is required in this module.


Requirements

Dependency Version / Notes
PHP ≥ 8.1
Magento Framework 2.4.x
magento/module-catalog Bundled with Magento
magento/module-import-export Bundled with Magento — required for CSV import
orangecat/core Any
Orangecat_Company Must be installed and enabled first
Orangecat_Prices Must be installed and enabled first (provides CalculatorPool)

Installation

This module ships as a git submodule inside the B2B SDK repository.


What Gets Installed

Database Tables

priceslist

Column Type Notes
entity_id int unsigned Primary key, auto-increment
name varchar(255) Display name
code varchar(255) Unique machine identifier used in the API
is_active boolean Default 1; inactive lists are not applied
description text Optional description
start_date timestamp Nullable; list not applied before this date
end_date timestamp Nullable; list not applied after this date
created_at timestamp Set on insert
updated_at timestamp Updated automatically on change

Unique constraint on code.

priceslist_item

Column Type Notes
item_id int unsigned Primary key, auto-increment
price_list_id int unsigned FK → priceslist.entity_id (CASCADE DELETE)
sku varchar(64) Product SKU
discount_type varchar(32) fixed_price, percentage, or fixed_amount
amount decimal(20,4) The discount or price value
qty decimal(12,4) Minimum quantity threshold; default 1.0000
created_at timestamp Set on insert
updated_at timestamp Updated automatically on change

Unique constraint on (price_list_id, sku, qty) — enables volume tiers per SKU.

priceslist_company

Column Type Notes
link_id int unsigned Primary key, auto-increment
company_id int unsigned FK → mycompany.entity_id (CASCADE DELETE)
price_list_id int unsigned FK → priceslist.entity_id (CASCADE DELETE)
priority int unsigned Default 0; higher value = higher precedence

Unique constraint on (company_id, price_list_id).

EAV Attributes

None.

Data Patches

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


Configuration

Section: Prices > Price Lists Configuration

Navigate to Stores → Configuration → Prices → Price Lists Configuration.

Label Config path Default Description
Enable Price Lists prices/priceslist/enabled Yes Master switch. When disabled, the calculator returns null and native pricing applies.
Resolution Mode prices/priceslist/mode cascade cascade or weight — see Price Resolution Modes. Visible only when enabled.

Config paths:

Both settings are scoped to Default / Website / Store View.


Store Admin Guide

Navigating to Price Lists

Catalog → Manage Price Lists (added by this module under the Orangecat_Prices::base parent menu).

Creating a Price List

  1. Go to Catalog → Manage Price Lists.
  2. Click Add New Price List.
  3. Fill in:
    • Name — human-readable label.
    • Code — unique slug used in the API and CSV import (e.g. B2B-WHOLESALE).
    • Is Active — set to Active to make this list available for assignment.
    • Description — optional internal note.
    • Start Date / End Date — optional validity window (leave blank for no limit).
  4. Click Save and Continue Edit to save and remain on the form.

Adding Products to a Price List

After saving the price list (so an entity_id exists):

  1. Inside the price list form, scroll to the Items section.
  2. Click Add Products to open the product selection grid.
  3. Select one or more products and click Add Selected.
  4. A dialog appears for each selected product. For each row:
    • Choose Discount Type (Fixed Price Override, Percentage Discount, Fixed Amount Discount).
    • Enter Amount (the price, percentage, or discount value).
    • Enter Qty — the minimum cart quantity required to unlock this tier. Use 1 for the base price.
  5. Click Confirm & Add to persist the rows.

To add a volume tier for the same SKU, add the same SKU again with a higher Qty value.

Existing items can be edited inline in the items grid or deleted individually with Delete or in bulk with Delete Selected.

Assigning Price Lists to a Company

  1. Go to Companies → (select a company) → Edit.
  2. Open the Price Lists tab.
  3. The grid shows currently assigned lists. Click Reset Filter to see all available lists.
  4. Check the checkbox next to each list to assign it.
  5. Set the Priority value for each assigned list. Higher values take precedence.
  6. Click Save Company. The assignments are persisted atomically.

Bulk Import via CSV

  1. Go to System → Import.
  2. Set Entity Type to Price List Items.
  3. Select a Behavior: Add/Update, Replace, or Delete.
  4. Upload a CSV file with columns: price_list_code, sku, qty, discount_type, amount.
  5. Click Check Data to validate, then Import to execute.

Sample CSV (Files/Sample/priceslist_item.csv):

Validation rules:


Developer Guide

Module Structure

Key Classes

Service Contracts

Interface Implementation Description
PriceListRepositoryInterface Model\PriceListRepository save, getById, getByCode, getList, deleteById, deleteByCode
PriceListItemRepositoryInterface Model\PriceListItemRepository Standard CRUD for price list items
PriceListManagementInterface Model\PriceListManagement getPrices($code), addPrices($code, $items[]), removePrices($code, $skus[])
PriceListCompanyManagementInterface Model\PriceListCompanyManagement getCompanies($code), associate($code, $companyId, $priority), removeAssociation($code, $companyId)

Calculator

Model\Calculator\PricesListCalculator implements Orangecat\Prices\Api\PriceCalculatorInterface and is registered into Orangecat\Prices\Model\CalculatorPool via di.xml. The orchestrator in Orangecat_Prices calls calculate(sku, qty, companyId, basePrice) on each registered calculator.

Returns null when:

Observers

None. This module registers no event observers.

Plugins

Class Target Hook Purpose
Plugin\Company\Controller\Adminhtml\Company\SavePriceLists Orangecat\Company\Controller\Adminhtml\Company\Save afterExecute Reads price_list_ids[] and price_list_priority[] from POST and atomically replaces priceslist_company rows for the saved company.

Admin JS Components

File Purpose
view/adminhtml/web/js/add-products.js Extends Magento_Ui/js/form/components/button. Orchestrates the product-picker modal → pricing dialog → AJAX save flow for adding items to a price list.

Email Templates

None.

ACL Resources

There is no etc/acl.xml in this module. All admin controllers and REST API routes reference the resource Orangecat_PricesList::priceslist. This resource must be defined in a parent module or added manually if fine-grained ACL control is required. Admin users with full access will have access to all price list actions.

Adding Custom Logic


REST API

All endpoints require an admin integration token with the Orangecat_PricesList::priceslist ACL resource.

Price List CRUD

Method Endpoint Description
POST /V1/priceslist Create a new price list
GET /V1/priceslist/:entityId Get price list by ID
PUT /V1/priceslist/:entityId Update a price list
DELETE /V1/priceslist/:entityId Delete by ID
GET /V1/priceslist/search List with search criteria
GET /V1/priceslist/code/:code Get by unique code
DELETE /V1/priceslist/code/:code Delete by unique code

Price List Items

Method Endpoint Description
GET /V1/priceslist/:priceListCode/prices Get all items for a price list
POST /V1/priceslist/:priceListCode/prices Add or update items (array of PriceListItemInterface)
POST /V1/priceslist/:priceListCode/prices/remove Remove items by SKU array

Company Associations

Method Endpoint Description
GET /V1/priceslist/:priceListCode/companies Get companies assigned to this list
POST /V1/priceslist/:priceListCode/companies Assign a company (with priority)
DELETE /V1/priceslist/:priceListCode/companies/:companyId Remove a company assignment

Examples

Create a price list:

Add items with a volume tier:

Assign to a company with priority:


Frontend Routes Reference

This module has no frontend (storefront) routes. All controllers are under the adminhtml area.

Admin route prefix: orangecat_priceslist

Path pattern Controller Access
orangecat_priceslist/pricelist/index Controller\Adminhtml\PriceList\Index Admin — Orangecat_PricesList::priceslist
orangecat_priceslist/pricelist/new Controller\Adminhtml\PriceList\NewAction Admin
orangecat_priceslist/pricelist/edit Controller\Adminhtml\PriceList\Edit Admin
orangecat_priceslist/pricelist/save Controller\Adminhtml\PriceList\Save Admin
orangecat_priceslist/pricelist/delete Controller\Adminhtml\PriceList\Delete Admin
orangecat_priceslist/pricelist/inlineEdit Controller\Adminhtml\PriceList\InlineEdit Admin
orangecat_priceslist/pricelist_item/add Controller\Adminhtml\PriceList\Item\Add Admin
orangecat_priceslist/pricelist_item/delete Controller\Adminhtml\PriceList\Item\Delete Admin
orangecat_priceslist/pricelist_item/massDelete Controller\Adminhtml\PriceList\Item\MassDelete Admin
orangecat_priceslist/pricelist_item/inlineEdit Controller\Adminhtml\PriceList\Item\InlineEdit Admin
orangecat_priceslist/pricelist_item/getProducts Controller\Adminhtml\PriceList\Item\GetProducts Admin (AJAX)
orangecat_priceslist/company_pricelist/grid Controller\Adminhtml\Company\Pricelist\Grid Admin (AJAX)

DevOps & Integrator Notes

Deployment Checklist

Integration Token Scope

Minimum ACL permission required for all REST API operations: Orangecat_PricesList::priceslist.

Disabling Without Uninstalling

When disabled, PricesListCalculator::calculate() returns null immediately, so the Orangecat_Prices orchestrator falls back to the next registered calculator or the native Magento price. No data is removed.

Data Integrity Notes


All versions of module-prices-list with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
magento/framework Version *
orangecat/core Version *
orangecat/module-company Version *
orangecat/module-prices 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-prices-list contains the following files

Loading the files please wait ...