Dev Console
A Salesforce Commerce Cloud (Demandware) Cartridge for Developers.
Features
- Execute Server Side JavaScript on your Sandbox in your favorite browser
- 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)
Installation
- Install/upload Cartridge
- 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
).
Business Manager
To make use of the Dev Console in the context of the Business Manager (jobs, business manager modules) do the following:
-
Add
sfcc_developers_core
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.
Use cases
Storefront
- Execute code using your storefront session
- View objects from the current customer session
Business Manager
- 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
Troubleshooting
I am unable to load the console
You may need to temporarily switch Code Versions, then switch back to trigger the update in Business Manager.
I am unable to see the Business Manager modules in the Roles & Permissions
You may need to temporarily switch Code Versions, then switch back to trigger the update in Business Manager.
I clicked the link Console (Storefront), but I am getting a 404 page
In order for this link to work you need to follow the Storefront installation steps.
Sandbox Security
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.
Disclaimer
The trademarks and product names of Salesforce®, including the mark Salesforce®, are the property of Salesforce.com. SFCC DevOps is not affiliated with Salesforce.com, nor does Salesforce.com sponsor or endorse the SFCC DevOps products or website. The use of the Salesforce® trademark on this project does not indicate an endorsement, recommendation, or business relationship between Salesforce.com and SFCC DevOps.