mar-pod-b2b / module-b2b-requisition-list
Private and company-shared reusable requisition lists for Marpod B2B.
Package info
gitlab.com/mar-pod-b2b/module-b2b-requisition-list
Type:magento2-module
pkg:composer/mar-pod-b2b/module-b2b-requisition-list
Requires
- php: ^8.5
- magento/framework: ^103.0
- magento/module-catalog: ^104.0
- magento/module-checkout: ^100.4
- magento/module-customer: ^103.0
- magento/module-graph-ql: ^100.4
- magento/module-quote: ^101.2
- magento/module-store: ^101.1
- mar-pod-b2b/module-b2b-bulk-add-to-cart: ^1.0
- mar-pod-b2b/module-b2b-company: ^1.0
- mar-pod-b2b/module-b2b-core: ^1.0
This package is auto-updated.
Last update: 2026-08-21 21:50:09 UTC
README
Persistent, reusable shopping lists for storefront customers — save a set of SKUs and quantities once, add them all to cart repeatedly.
Status
Full service layer shipped, plus a customer-facing GraphQL surface (see REST and GraphQL below). No Admin or storefront UI in this module yet — drive it through GraphQL or the service contracts directly; see Limitations.
Implemented foundation
- declarative schema:
marpod_b2b_requisition_list(per customer, optionally scoped to a company),marpod_b2b_requisition_list_item(SKU, quantity); - a list is either private (
company_idnull — visible and manageable only by the customer who created it) or company-shared (company_idset — visible to any company member holdingcompany.requisition_list.view_company, and manageable by anyone holdingcompany.requisition_list.manage_company, regardless of who originally created it); RequisitionListManagementInterface::createList()/deleteList()— list lifecycle;addItem()/removeItem()— line-item management. Adding a SKU already on the list updates that row's quantity instead of creating a duplicate;addToCart()— adds some or all of a list's items to the customer's active cart. Pricing and stock availability are re-evaluated at add-to-cart time, using the product's current price and quantity limits — a list never freezes a stale price from whenever the item was originally added to it.
REST and GraphQL
No admin REST surface — there's no merchant/admin configuration concern in this module (unlike
Purchase Approval's rule config), so it ships GraphQL-only, matching the same precedent
module-b2b-dynamic-product-data set.
Authenticated customers get the full workflow through GraphQL: marpodB2bRequisitionList/
marpodB2bRequisitionLists queries and marpodB2bCreateRequisitionList/
marpodB2bDeleteRequisitionList/marpodB2bAddRequisitionListItem/
marpodB2bRemoveRequisitionListItem/marpodB2bAddRequisitionListToCart mutations. Every
mutation delegates to RequisitionListManagementInterface, which already fully enforces
private-vs-company-list authorization internally — the resolvers are thin wrappers with no
additional access-control logic of their own (unlike Quote's resolvers).
Requirements
- PHP 8.5
- Magento 2.4.9-compatible framework packages
mar-pod-b2b/module-b2b-core,mar-pod-b2b/module-b2b-company,mar-pod-b2b/module-b2b-bulk-add-to-cart
Installation
Run from the Magento project root:
composer require mar-pod-b2b/module-b2b-requisition-list:^1.1
bin/magento module:enable Marpod_B2bRequisitionList
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean
Development
The planned scope, dependency rules, cache boundaries, security requirements, and test strategy
are documented in packages/B2B_LIGHT_PLAN.md in the development Magento project (section 4.4).
Unit tests:
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist packages/module-b2b-requisition-list/Test/Unit
GraphQL API tests (real HTTP against a running instance — routing, authentication, and
private-list/company-shared-list isolation; see mar-pod-b2b/module-b2b-core's README for the
shared Test/Api base classes these build on):
vendor/bin/phpunit -c dev/tests/api-functional/phpunit_graphql.xml \
packages/module-b2b-requisition-list/Test/Api/GraphQl/RequisitionListGraphQlTest.php
Limitations
- no Admin or storefront UI yet — a storefront account panel is the expected UI for this module, not yet built; drive it through GraphQL or the service contracts in the meantime.
Uninstallation
Do not remove the package while another installed module requires it. The
marpod_b2b_requisition_list* tables contain customer data and are retained when the module is
disabled or its package is removed.