Testing and Deploying Themes in SuiteCommerce

Testing themes locally enables effective verification before deployment in SuiteCommerce. This guide walks through the essential steps.

·2 min read·1 views·View Oracle Docs

TL;DR

Testing themes on a local server in SuiteCommerce allows developers to verify customizations before deploying them to NetSuite. This article covers the necessary steps for both testing and deployment, ensuring a smooth transition from development to live environments.

How to Test a Theme on a Local Server

Before deploying your theme to NetSuite, it's crucial to test it locally. This process lets you preview frontend changes without affecting the live site. Here's how to effectively do it:

  1. Set up your environment: On your local machine, open a command line interface and navigate to your top-level development directory.
  2. Run the testing command:
    gulp theme:local
    Warning: This command also updates the manifest.json file. If you have made manual changes that you want to preserve, use the following command instead:
    gulp theme:local --preserve-manifest
  3. View your theme: To see your changes, navigate to the local version of your application using one of these URLs:
    • http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/<SSP_APPLICATION>/shopping-local.ssp
    • http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/<SSP_APPLICATION>/my_account-local.ssp
    • http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/<SSP_APPLICATION>/checkout-local.ssp
    • Note: Replace <DOMAIN_NAME> and <ACCOUNT_ID> with your specific configurations.

How to Deploy a Theme to NetSuite

After thoroughly testing your theme, the next step is deployment. This will enable it for use on your website domain. Follow these steps:

  1. Access your environment: Open your command line or terminal and navigate to the top-level development directory.
  2. Deploy your theme with the command:
    gulp theme:deploy
    For accounts that require specific domains, append your account number to the command.
  3. Enter deployment information: Depending on your setup, you may need to provide the following details during the first deployment:
    • Authentication ID: This is the ID that represents your NetSuite account and role. If you've created one previously, it will be reused for future operations.

Warning: Similar to testing, the gulp theme:deploy command updates the manifest.json file, potentially overwriting manual changes made to it. To avoid this, use:

gulp theme:deploy --preserve-manifest

Conclusion

Properly testing and deploying your themes in SuiteCommerce requires careful execution of commands and understanding of your specific environment settings. Following the outlined steps will ensure that your changes are effectively reflected in your live web application.

Source: This article is based on Oracle's official NetSuite documentation.

Key Takeaways

  • Local testing is essential for verifying theme customizations.
  • Use gulp theme:local for testing and gulp theme:deploy for deployment.
  • Preserve your changes in manifest.json by using the appropriate flags during commands.

Frequently Asked Questions (4)

Do I need to run any specific command to test SuiteCommerce themes locally?
Yes, you need to use the command `gulp theme:local` to test themes on a local server in SuiteCommerce. This allows you to preview frontend changes before deployment.
How can I prevent the 'manifest.json' file from being overwritten during local testing?
To prevent the 'manifest.json' file from being overwritten when testing locally, you should use the command `gulp theme:local --preserve-manifest`.
What information is required during the first deployment of a theme to NetSuite?
During the first deployment of a theme to NetSuite, you may need to provide an Authentication ID. This ID represents your NetSuite account and role and will be reused for future operations.
How can I ensure my manual changes to 'manifest.json' are not lost during deployment?
To ensure that your manual changes to 'manifest.json' are not lost during deployment, use the command `gulp theme:deploy --preserve-manifest` instead of the standard `gulp theme:deploy`.
Source: Test and Deploy Your Theme Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →