Extensibility Component Classes

This topic applies to

Applies to

Commerce Web Stores | Aconcagua

 

A component is a piece of functionality in a SuiteCommerce application that connects with specific aspects of the application to accomplish a task. The Extensibility API is organized around these components. Each component includes an associated class and various exposed methods for obtaining or modifying data, views, or template context.

Different components are available for SuiteCommerce (and SuiteCommerce Advanced) and SuiteCommerce InStore. The Extensibility API includes the following components.

For more information on how to use these components when building extensions, see Extensibility API Tutorials.

SuiteCommerce and SuiteCommerce Advanced Components

The SuiteCommerce components apply to both SuiteCommerce and SuiteCommerce Advanced.

See the full extensibility API reference for detailed information about each component.

Cart

This component interacts entirely with the LiveOrder, allowing you to add, update, and remove lines from the order, apply promotions to the order, select a shipping method to the order, associate the shipping and billing address to the order, add payment methods, etc. This component can access objects available in all three ssp applications: shopping, myaccount and checkout.

This component is available in the Frontend and the Backend.

ID

Cart

Methods

addLine()

addLines()

addPayment()

addPromotion()

clearEstimateShipping()

estimateShipping()

getAddresses()

getBillAddress()

getLines()

getPromotions()

getShipAddress()

getShipMethod()

getShipMethods()

getSummary()

removeLine()

removePromotion()

removeShipping()

submit()

updateLine()

Events

beforeAddLine

afterAddLine

beforeUpdateLine

afterUpdateLine

beforeRemoveLine

afterRemoveLine

beforeEstimateShipping

afterEstimateShipping

beforeClearEstimateShipping

afterClearEstimateShipping

beforeAddPromotion

afterAddPromotion

beforeRemovePromotion

afterRemovePromotion

beforeAddPayment

afterAddPayment

beforeSubmit

afterSubmit

Checkout

This component interacts entirely with the Checkout page and the checkout steps flow. This component lets you modify the steps visually, such as adding, removing, and reordering steps, etc. This component can access objects available in the checkout application only.

ID

Checkout

Methods

getCurrentStep()

setCurrentStep()

getStepGroupsInfo()

getStepsInfo()

getCheckoutFlow()

addModuleToStep()

removeModuleFromStep()

addStepsGroup()

removeStepsGroup()

addStep()

removeStep()

Events

beforeAddModuleToStep

afterAddModuleToStep

beforeSetCurrentStep

afterSetCurrentStep

beforeAddStep

afterAddStep

beforeAddStepsGroup

afterAddStepsGroup

CMS

This component is created only for the purpose of registering new Custom Content Types. If you want to add views inside of your CCT you can interact with all the rest of the components available. This component can access objects available in all three ssp applications: shopping, myaccount, and checkout.

ID

CMS

Methods

registerCustomContentType()

Events

Environment

This component is general to the entire SuiteCommerce Application and provides the utils method and access to Configuration values. This component does not provide interaction with any particular view. This component can access any object available in all three ssp applications: shopping, myaccount and checkout.

ID

Environment

Methods

getConfig()

isPageGenerator()

getSiteSetting()

getSession()

setTranslation()

Events

Layout

This component lets you modify aspects of SuiteCommerce that do not have a specific component available. For example, no components currently exist that let you add or modify views on the home page, in the header, or in the footer. Using Layout, you can access all the view methods for each view (addChildViews, addChildView, removeChildView, etc.). As more components become available in future SuiteCommerce updates, you can simply replace the use of Layout for the appropriate (new) component, keeping the same methods.

ID

Layout

Available Since

SuiteCommerce 2018.2

Methods

addChildView()

addChildViews()

addToViewContextDefinition()

addToViewEventsDefinition()

closeMessage()

registerView()

removeChildView()

removeToViewContextDefinition()

removeToViewEventsDefinition()

setChildViewIndex()

showContent()

showMessage()

Events

LoginRegisterPage

The LoginRegisterPage component is used to listen for login and register events on the Log In / Register page in the web store, and enables you to capture additional form data from the login and registration forms.

ID

LoginRegisterPage

Available Since

SuiteCommerce 2019.1

Methods

Events

beforeLogin

beforeRegister

afterRegister

MyAccountMenu

This component lets you add menu items to the menu on the My Account page. You can add group items and then add subitems to the group items. All group items and subitems have one or more permissions, which lets you restrict which users can view the menu items. Subitems point to a landing page URL that is loaded in the main content area of the page.

ID

MyAccountMenu

Available Since

SuiteCommerce 2019.1

Methods

addGroup()

addGroupEntry()

Events

PageType

Use the PageType component when you want to register new page types in an extension. A page type record can be created by logging in to NetSuite and creating the record, or by including the page type in the extension manifest file.

ID

PageType

Available Since

SuiteCommerce 2019.1

Methods

registerPageType()

registerTemplate()

Events

ProductDetailsPage (PDP)

This component interacts entirely with the Product Details page. This accesses objects inside the Product Details View only. This is undefined if invoked from any other part of the application.

ID

PDP

Methods

getAllMatrixChilds

getItemInfo

getSelectedMatrixChilds

setOption

setQuantity

getStockInfo

Events

beforeOptionSelection

afterOptionSelection

beforeQuantityChange

afterQuantityChange

beforeImageChange

afterImageChange

ProductListPage (PLP)

This component interacts entirely with the Search Page, allows navigating to the next or previous page, set the current page, change the rendering, search for a product, get the last search term, and so on. This component accesses objects inside the Facets Browse View in the shopping application only. This is undefined if invoked from any other part of the application.

ID

PLP

Methods

getPagination()

setCurrentPage()

getSorting()

getAllSorting()

setSorting()

getDisplay()

getAllDisplay()

setDisplay()

getPageSize()

getAllPageSize()

setPageSize()

getFilters()

getAllFilters()

setFilters()

getSearchText()

setSearchText()

getItemsInfo()

getCategoryInfo()

getURL()

Events

UserProfile

The UserProfile component lets you retrieve information about the current logged in user.

ID

UserProfile

Available Since

SuiteCommerce 2019.1

Methods

getUserProfile()

Events

SuiteCommerce InStore (SCIS) Components

The SCIS (SuiteCommerce InStore) components in the extensibility API let you create extensions that add, remove, or update lines in the cart. You can also show modal dialogs to present information to the user, and require the user to confirm or cancel an action.

See the full extensibility API reference for detailed information about each component.

Cart

The CartComponent in SCIS lets you add, remove, and update lines in the cart. It also provides methods to perform other operations in the cart, such as applying promotions and discounts.

ID

Cart

Available Since

SuiteCommerce 2018.2

Methods

addGlobalDiscount()

addLine()

addLines()

addLineDiscount()

addPromotion()

getLines()

getSummary()

removeLineDiscount()

removePromotion()

returnLine()

setCustomer()

unvoidLine()

voidLine()

Events

beforeAddGlobalDiscount

afterAddGlobalDiscount

beforeAddLine

afterAddLine

beforeAddLineDiscount

afterAddLineDiscount

beforeRemoveLineDiscount

afterRemoveLineDiscount

beforeReturnLine

afterReturnLine

beforeSetCustomer

afterSetCustomer

beforeUnVoidLine

afterUnVoidLine

beforeVoidLine

afterVoidLine

SCISLayout

The SCISLayoutComponent gives you access to two methods, both of which show a modal dialog to the user, but with different options to dismiss the dialog.

ID

SCISLayout

Available Since

SuiteCommerce 2018.2

Methods

showConfirmationPopup()

showMessagePopup()

Events