Cartridge Management

Link cartridges and modules into your project from the VS Code UI, with no dw.json or settings to maintain

Cartridge management in Intellij SFCC is entirely UI-driven. You link folders into the project from the Cartridges view and the Explorer right-click menu. There is no dw.json, no setting, and no cartridge-path string to edit manually

Linking Cartridges

The plugin tries to detect all three types automatically with Find Cartridges. Every type can also be linked manually from the VS Code Explorer right-click menu, which is the surest way to add B2C and Global modules the scan does not surface

Two ways to add folders, and together they cover everything: let the plugin scan, or link one manually

Find Cartridges automatically

Run Find Cartridges from the Cartridges view, the welcome button when the view is empty, or the magnifier-and-cartridge icon in the status bar (tooltip Find Cartridges (not linked to the project)). The plugin scans the workspace for folders with a cartridge subfolder, skips node_modules, .git, .vscode, .intellij-sfcc and the legacy .intellijsfcc, test and fixture trees (test, tests, mocks, fixtures, __tests__) and build output such as dist, build and coverage. It then looks one level into the folders that hold those cartridges for modules: a modules folder counts when it holds scripts, and a B2C module such as app when its main.js, main.ds, main.ts or package.json main reads as server code (CommonJS, no Node built-ins, DOM or ES modules). A Node tool kept beside the cartridges is not suggested. The multi-select list shows every cartridge, B2C module, and global module it found. Pick the ones to link and confirm. Duplicates start unchecked, and you can ignore a cartridge or a whole folder to keep it out of future scans. The Find Cartridges List walks through every action

Right-click a folder in the Explorer and choose the matching B2C - Link as ... command, one per type, listed in Three Cartridge Types below. Use this for module folders the scan does not surface, or to link one folder explicitly

The Find Cartridges List

Find Cartridges opens Found N not linked cartridges, grouped under the workspace folder. Every cartridge starts checked except duplicates, so OK links them all at once. The ignore buttons clear out copies, fixtures, and vendor folders first

Find Cartridges checks every cartridge it found except duplicates. The row buttons ignore one cartridge or its whole folder, the title button ignores the folders of the checked rows, and OK links what is checked
ControlWhereWhat it does
CheckboxEach rowChecked rows are linked when you press OK
Select allCheckbox next to the filterChecks or clears every row
Duplicate nameLine under the rowThe name is already linked, or listed above under another path. The row starts unchecked, so the first copy wins
Ignore all cartridges in folderRow, on hoverIgnores every cartridge in that row's folder, for example vendor/sfra/cartridges
Ignore and don't suggest this cartridge next timeRow, on hoverIgnores only this cartridge
Ignore all cartridges in selected foldersTitle barIgnores every cartridge in the folders of the checked rows. Check one row per folder, then click it
OKNext to the countLinks the checked rows and reports N cartridges were linked to the project

Ignored cartridges leave the list at once, and the rest are checked again, duplicates still unchecked. They stay out of every future scan until you restore them from Show Ignored Cartridges

What Linking Unlocks

Linking is what makes a folder real to the plugin. Once it is linked, you get:

  • require() resolution that is cartridge-aware across everything you linked
  • Override detection along the cartridge path, with one-click jumps between versions
  • Generated dw.* types built from the metadata in your linked cartridges
  • Navigation - go to definition, find references, and symbol search span the linked set

Three Cartridge Types

The plugin recognizes three kinds of linkable folders, each with its own icon in the Cartridges view. It tells them apart by what the folder contains:

Find Cartridges reads what each folder contains to pick its type, and skips tool folders on the way. Modules count only beside cartridges, never in test folders. Each type also has its own Link as command in the Explorer right-click menu

B2C - Link as Cartridge expects the folder to contain a cartridge/ subfolder. If it does not, the plugin tells you so instead of linking it

The Cartridges View

The Cartridges view sits in VS Code's built-in Explorer, under your project files. It lists everything you have linked, each with the icon for its type, and its header reads Cartridges (N)

The Cartridges view lists the linked cartridges in cartridge path order, each with its type icon and the total in the title. Search in Cartridges opens the tree find, and its Filter toggle hides everything that does not match
  • Order follows your B2C Scope. When the active connection has a B2C Scope, the cartridges on its path come first, in path order, so what you see mirrors how the server resolves overrides. Linked cartridges that are not on the path follow from A to Z. With no scope or no active connection, the whole list is alphabetical
  • Search in Cartridges filters the tree by name or path

Unlinking and Ignoring

These actions only change what the plugin tracks. Nothing on disk is deleted, moved, or edited

The difference is what the next scan does:

ActionWhereWhat it doesNext scan
UnlinkCartridges view, or Show Linked CartridgesDrops it from the projectShows up again
IgnoreFind Cartridges list, or Show Linked CartridgesDrops it and remembers to skip itStays hidden
Show Ignored CartridgesCartridges view menuReview the ignore list and restore any folder to the project-
Show Linked CartridgesCartridges view menuSearchable list of everything linked, with unlink and ignore on each row-

Duplicates are caught for you. When a scan finds a cartridge whose name is already linked, or a second folder with the same name, it marks the extra one Duplicate name and leaves it unchecked, so you never link two cartridges with the same name by accident. Ignore the copy you do not want, and it stays hidden on every future scan

Creating a New Cartridge

To scaffold a fresh cartridge, run B2C - New Cartridge... from the Command Palette or the Explorer right-click menu. The plugin creates the folder with a cartridge/ directory, a .project file, and a <name>.properties file, then links it for you

Where Linked Cartridges Are Stored

Linked and ignored cartridges live in VS Code workspace state, scoped to the current project. That has three practical consequences:

  • Nothing to commit. There is no dw.json key or settings entry, so your linking choices never appear in version control
  • Per developer. A teammate who opens the same repository runs Find Cartridges once to link their own copy. It takes seconds
  • Independent of deployment. This list drives editor intelligence only. How code uploads, and which cartridge path the server runs, is governed by your connection and the instance, not by what you link here

On this page