Search & Navigation

Find SFRA routes and hook IDs with Search Everywhere, see the owning cartridge of every result and follow gutter icons to templates, scripts and forms

In a project with many cartridges the same file name shows up again and again, and a route like Cart-Show can be defined in one cartridge and extended in two more. Intellij SFCC adds SFCC results to Search Everywhere, labels every result with its cartridge and puts gutter icons on the strings that point to other files

Search Everywhere gets two SFCC groups in the All tab. SFCC Routes shows every route with its method, so a base get and an append override sit side by side. SFCC Hooks shows hook IDs with their script path and opens the hooks.json entry

Search Everywhere

Press Shift twice to open Search Everywhere and type part of a route or hook name. On the All tab the plugin adds two groups

GroupFindsEach result showsOpens
SFCC RoutesRoutes whose full name contains what you type, for example cart-sh for Cart-ShowThe route and how it is defined: get, post, use, append, prepend or replace for SFRA, the guard settings such as get:https for SiteGenesis controllers, or the node type for pipelinesThe line that defines or extends the route. A pipeline start node opens in the Pipeline Editor on that node
SFCC HooksHook IDs from your cartridges' hooks.json files, for example app.payment.processorThe hook ID and the script it points toThe hook's entry in hooks.json

A base route and its overrides sit side by side, so Cart-Show lists the get in app_storefront_base next to the append in app_custom. With a site scope selected, results follow that site's cartridge order

The groups need a valid license or trial, a linked cartridge and finished indexing

The cartridge on every result

Files from linked roots show their cartridge on the right side of a result, with an icon for its kind: cartridge , B2C module or modules folder . You see it in Search Everywhere, Go to File and in the Choose Declaration list when Cmd+Click has more than one target. Five copies of productHelpers.js become five clearly different rows

Controllers , models , forms , pipelines and ISML templates keep their own file icons in the results too, see Cartridges & Modules

Gutter icons

FileLineIconOpens
JavaScriptres.render, ISML.renderTemplate, getRenderedHtml, sendEmail, new Template with a known templateNavigate to templateThe template
ISMLtemplate on <isinclude>, <isdecorate> and <ismodule>Navigate to templateThe template
hooks.jsonscriptNavigate to fileThe hook script
steptypes.jsonmoduleNavigate to fileThe job step script
package.jsonhooks, caches, initNavigate to fileThe referenced file
Form XML<include name="...">"Open billing.xml form"The included form

When the target exists in several cartridges, the icon opens Choose Declaration with one row per cartridge

Go to Declaration

Cmd+Click or Cmd+B (Ctrl+Click or Ctrl+B) works on the SFCC strings as well as on code:

OnGoes to
A require pathThe module, see Module Resolution
module.superModuleThe file the current one overrides
A route in URLUtils.url('...') or server.append('...')The route definitions and overrides
A template pathThe ISML template
A resource keyThe key in every locale file
A hook ID or hook functionThe hooks.json entry or the exported function
A form ID in server.forms.getForm('...')The form XML
A custom attributeIts definition in the metadata XML

SFCC Contracts lists every call that is covered

Troubleshooting

SymptomWhat to do
No SFCC Routes or SFCC Hooks groupCheck the license, link a cartridge and wait for indexing. The groups only show once you type something
A route is missingIts controller isn't in a controllers folder of a linked cartridge, or the pipeline isn't in a pipelines folder. Routes are read from server.* calls, exports.<Name> = assignments and pipeline start nodes
No cartridge label on a resultThe file is outside your linked cartridges and modules
Too many results for a common nameSelect a site scope, or type a longer part of the route such as Cart-Show

On this page