Get Started with Extensions
Before you start developing an extension for SuiteCommerce, make sure you have completed the following tasks:
-
Set up the extension developer tools. The developer tools enable you to create a baseline extension, test your extension, deploy it to NetSuite, and more. See Set Up Extension Developer Tools for more information.
-
Familiarized yourself with the SuiteCommerce extensibility API. You can use the extensibility API to access or modify many aspects of the SuiteCommerce application, such as the behavior and content of the product list page, a visitor’s cart, or the application settings. See the SuiteCommerce extensibility API for full details.
Extension Development Steps
The basic steps to create an extension include the following:
-
Create a baseline extension. The extension developer tools give you a starting point for extension development. Follow these instructions to create a baseline “Hello World” extension. See Create a Baseline Extension.
-
Fetch active theme and extension files. You must download files for the currently active theme before you can deploy an extension or test it on a local server. See Fetch Active Theme and Extension Files.
-
Add extension functions and features. You can introduce JavaScript, SuiteScript, Json, HTML templates, and Sass files, as needed. The Extensibility API is available to access frontend and backend modules within the application. See APIs for SuiteCommerce Extensions.
-
Test on your local machine. You can test your extension code on a local server for debugging purposes. See Test an Extension on a Local Server.
-
Deploy your extension to NetSuite. You can test your extension on a local server. However, you must first deploy your extension files to your account and activate the extension on a domain before testing locally. See Deploy an Extension to NetSuite.
-
Activate the extension. To see your extension in action, you must activate it for a domain. See Manage Themes and Extensions.
Useful Information to Know Before You Begin
Be aware of the following important information:
-
The
gulp extension:fetch
command only fetches the following:-
HTML and Sass files associated with the currently active theme for the specified domain.
-
Extensions development files for custom extensions currently active for the specified domain. You cannot download files for published extensions.
-
-
Login parameters, including your NetSuite email, account, role, and domain information, are stored in the .nsdeploy file when you create an extension. To reset your login and deployment information, delete the .nsdeploy file. This file is located here:
<LOCAL_SOURCEFILES_ROOT>/gulp/config/.nsdeploy
-
Extension information, including the extension name, fantasy name, version, and description, are stored in the extension’s Manifest.json file. The manifest file is located here:
<LOCAL_SOURCEFILES_ROOT>/Workspace/<EXTENSION_DIRECTORY>/manifest.json