Sublogin Custom Catalog

mageb2b/sublogin-custom-catalog limits a sublogin to an assigned product set. It can work on its own or combine its result with the separate SoftwareSilo Custom Catalog extension when that module is present.

The separate Custom Catalog extension is optional. Sublogin Custom Catalog owns its own catalog, assignment and direct-product records.

Install and enable

composer require mageb2b/sublogin-custom-catalog
php bin/magento module:enable MageB2B_SubloginCustomCatalog
php bin/magento setup:upgrade

Open Stores > Configuration > MageB2B > Sublogin > Sublogin Custom Catalog.

Setting Default Effect
Activate Yes Enables product filtering and the Sublogin catalog context.
Allow sublogin "My Products" access Yes Controls access when the Role add-on is not active.
Enforce ACL check Yes Checks MageB2B_SubloginCustomCatalog::view for a sublogin.

When Role is active, grant or deny View My Products through the assigned role. The permission is allowed by default, but your role definition remains the source of truth.

Build a catalog

  1. Create a Sublogin catalog in Magento Admin.
  2. Add products to the catalog.
  3. Assign the catalog to one or more sublogins.
  4. Add direct product assignments only for exceptions that do not belong in a reusable catalog.
  5. Sign in as each affected buyer and test category, search, product detail and cart access.

Sublogin catalog with its assigned products in Magento Admin

The main customer can manage assignments in the supported storefront flow. A sublogin cannot manage its own allowed catalog.

What is filtered

The allowed product set is applied to storefront product collections, direct product access and cart validation. Test search and recently viewed or recommendation components supplied by other modules because they may build product collections differently.

If an allowed product later becomes disabled, out of stock or unavailable on the store website, Magento can still hide it. Catalog assignment does not override core product availability.

Combine with SoftwareSilo Custom Catalog

When MageB2B_CustomCatalog is installed and its Sublogin integration is active, choose a merge operator under Stores > Configuration > MageB2B > Custom Catalog:

Operator Effective products
Intersection Only products allowed by both systems. This is the default and the strictest option.
Union Products allowed by either system.
Sublogin Only Ignore the separate Custom Catalog result for this calculation.
Custom Catalog Only Ignore Sublogin-specific assignments and use the separate Custom Catalog result.

Use Intersection when company rules and individual buyer rules must both pass. Use Union only when either assignment is sufficient; it can broaden visibility.

A practical example

Northstar Industrial Supplies has a company catalog containing approved workshop equipment. Its maintenance buyer receives a smaller Sublogin catalog containing only consumables.

  • Intersection shows approved consumables that occur in both sets.
  • Union shows the complete company set plus the buyer's direct additions.
  • Sublogin Only uses only the maintenance buyer's assignments.
  • Custom Catalog Only applies only the company catalog.

Test before rollout

Use three products:

  1. one assigned by both systems;
  2. one assigned only to the sublogin;
  3. one assigned only through the separate Custom Catalog.

For every merge operator you intend to use, check category, search, direct URL and add-to-cart behavior. Also test a cart created before an assignment changed.

Hyvä storefront

Install mageb2b/sublogin-custom-catalog-hyva when the storefront uses Hyvä. It requires the base Sublogin Hyvä bridge as well as this package. See Hyvä Compatibility Packages.

Troubleshooting

  • My Products is missing: check Activate, Allow Sublogin View and Role ACL.
  • Every product disappeared: in Intersection mode, an empty result from either system produces an empty effective set.
  • A direct URL still opens: confirm filtering is active for the current store view and clear only the relevant Magento cache after configuration changes.
  • A previously added cart item fails: the cart is revalidated against current visibility; review recent assignment changes.

Related: Roles and Permissions and Permission Problems.