A Salesforce Commerce Cloud (Demandware) Cartridge for Developers.
- Execute Server Side JavaScript on your Sandbox in your favorite browser
- Adds a global
log
method to allow logging within the dev console - No Site Preferences or Misc Imports Required, just drop in and go
- Safety Measures to prevent running in Production Environments
- Menu in the Business Manager (with role management)
Example use of the log
feature built into the dev console
- If you still have this cartridge included from
sfcc_developers_core
, you will need to delete it fromsfcc_developers_core/cartridges/sfcc_dev_console
. - Download the release zip.
- Extract the zip contents and rename the folder to just read
sfcc_dev_console
(excluding the-#.#.#
version) - Delete everything inside the directory
sfcc_dev_console
except for thecartridges
folder. - Move the entire remaining contents to your project root so that your folder structure looks as
%project_root%/sfcc_dev_console/cartridges
- Add
sfcc_dev_console
to Business Manager StorefrontCartridges
Path - Once installed, you can access the Dev Console on your sandbox at
/on/demandware.store/YOUR_SITE_ID/default/Console-Show
( changeYOUR_SITE_ID
to your Site ID, e.g.Sites-Site
).
To make use of the Dev Console in the context of the Business Manager (jobs, business manager modules) do the following:
-
Add
sfcc_dev_console
to project or global .gitignore -
Add
sfcc_dev_console
to the Business ManagerCartridges
Path, do the following actions to accomplish this:Administration
Manage Sites
- On this page click
Mange the Business Manager site
- Go to the tab
Settings
- Add
sfcc_dev_console
to the cartridges path
-
Do the following actions in the Business Manager:
Administration
Roles & Permissions
- Click on your role
Business Manager Modules
- Assign rights here (Both on
Organization
level & theSites
you want to use this on)
-
To get the link
Console (Storefront)
to work, you need to assign thesfcc_dev_console
cartridge to your Storefront site by following the steps in the Storefront installation guide.After configuration in the Business Manager you should see a new menu item in the
Administrator
&Merchant Tools
menu.
- Execute code using your storefront session
- View objects from the current customer session
- Iterate through objects and use the global
log
method to print those logs to the console
- Execute code using your Business Manager session
- Execute code as if it is a Business Manager Page
- Execute code in the same context as Jobs
You may need to temporarily switch Code Versions, then switch back to trigger the update in Business Manager.
You may need to temporarily switch Code Versions, then switch back to trigger the update in Business Manager.
In order for this link to work you need to follow the Storefront installation steps.
You may need to clear your browsers localStorage due to data structure changes with the new tabs feature.
Our
sfcc_dev_console
cartridge will allow anyone with access to your sandbox to be able to run code.
If you wish to lock down your sandbox, SFCC already provides a solution to protect it.
- Head over to
Administration > Sites > Manage Sites
- Select your Site Name under
Storefront Sites
- Click the
Site Status
tab - Set
Select the Site Status
toOnline (Protected)
- Enter a
Password
and clickApply
Once this is set up, anytime you login to your storefront from a new browser, you will need to enter the username storefront
and the password you just created. Your login info will be saved as long as you do not clear your browser's cookies. The Chrome plugin Demandware with Ease provides the ability to automatically login with a Storefront Password.