To implement page types and component types, you must include a meta definition file and a script file for each page type and component type in a custom cartridge.
default_component_constructors
property in the meta definition file for a page type. You can also use this property in the meta definition file for a component type that includes a region. When the merchant creates a page in the Visual Editor using the page type or component type, the default components are already populated in the region. The merchant can delete the components if necessary. .js
extension. For example, if the meta definition file for a promotions page type is promopage.json, the script file is named promopage.js.file
displays a file selection modal window that the merchant can use to browse the library files. An attribute of type enum
displays a single select box where the merchant chooses one of the allowed values. context
object, also known as the content dictionary, are defined in a map with the attribute IDs as the keys and the resolved values as values. A resolved value is a value that has been converted to B2C Commerce API objects when necessary. For example, for an attribute of type product, the value of the attribute (the product SKU) is converted to a dw.catalog.Product
object instance. For some attributes, conversion isn't necessary. For example, strings can be stored as is. The following table lists the content attribute types and their corresponding B2C Commerce API objects.render
function of a page type creates the page's HTML markup. Typically, the page type's render
function calls an ISML template that uses PageMgr.renderRegion()
to render each region of the page.© Copyright 2000-2020, salesforce.com inc. All rights reserved. Various trademarks held by their respective owners. |
Show URL | Submit Feedback | Privacy Policy |