Create Custom Content Types Module for SuiteCommerce
Creating a custom module for CCTs allows dynamic content management in SuiteCommerce, enhancing website functionality and user experience.
Creating a custom module for your Custom Content Type (CCT) in SuiteCommerce (SCA) allows you to manage dynamic functionality on your website. This article outlines the necessary components and steps to set up your CCT, which will provide features such as retrieving and updating data from NetSuite records, thereby enhancing the website's user experience.
What Files Are Required for a CCT Module?
Your CCT module must include the following files at a minimum:
- Entry Point: This JavaScript or TypeScript file includes the
mountToApp()method, linking your custom module to a CMS content type record. This makes it available for inclusion in your website. - View: This JavaScript file listens for events, interprets them, and defines variables for use in the template. These variables correspond to fields within your CMS content type record.
- HTML Template: This file utilizes Handlebars.js helpers alongside HTML to render content on your site.
For example, when developing a fictitious CCT named SC.CCT.ImageViewer, this module introduces a simple image viewer that can pull data from either a custom record or from existing data in the browser context.
Steps to Create a CCT Module
Follow the steps below to create your custom CCT module:
-
Create Your Custom Module: This should contain all your CCT files. Use the format for naming your CCT Module:
SC.CCT.cctName@x.y.z, wherecctNamerefers to your CCT andx.y.zdenotes the version number. For example,SC.CCT.ImageViewer@0.0.1. -
Create Necessary Subdirectories:
- JavaScript: Store your entry point JavaScript or TypeScript file and all views in this subdirectory.
- Templates: This directory will hold the HTML template for your CCT.
Note: If your CCT includes new Sass, SuiteScript, or configuration files, ensure to also store these in their respective subdirectories.
Related Resources
To further enhance your understanding and implementation of CCTs, consider reviewing these related topics:
- Create Custom Content Types for SMT
- Create an Entry Point File
- Create a View File
- Create a Template File
- Set Up Your ns.package.json and distro.json Files
This guide serves as a starter framework for integrating CCTs into SCA, helping you leverage powerful custom features dynamically managed through the Site Management Tools (SMT).
Frequently Asked Questions (4)
Does creating a Custom Content Type (CCT) for SuiteCommerce require specific subdirectories?
What is the purpose of the entry point file in a CCT module?
Can a CCT module include additional types of files beyond JavaScript and HTML?
What naming convention should be used for Custom Content Type module versions in SuiteCommerce?
Was this article helpful?
More in Commerce
- Available Items Only Feature in NetSuite 2026.1
Available items only filtering boosts sales efficiency in NetSuite 2026.1 with Intelligent Item Recommendations.
- Commerce Extensions in NetSuite 2026.1
Commerce Extensions in NetSuite 2026.1 enhance performance and user experience in eCommerce.
- Convert Multiple Transaction Line Items into Configured Items in
Enhance transaction processing in NetSuite by converting multiple line items into configured items with improved session handling.
- New SuiteCommerce Features in NetSuite 2026.1
New SuiteCommerce features in NetSuite 2026.1 enhance user experience and improve eCommerce efficiency.
