- Print
Integrating shortform collections
- Print
This guide introduces how to integrate Shortform Collection.
Initialization
Here are examples of how you can initialize the Shoplive Shortform without user authentication, simple authentication, and JWT token authentication.
Install with desired auth type of initialization code in common layout (head area, etc.)
Detail information can be found in User Authentication.
Access Key
Access key and secret key can be obtained from Shoplive representative.
Set a template to render a shortform collection with
Enter the code below where you want to display the Shortform list. The template field indicates which layout you want to use for a shortform list.
Choose a shortform collection layout
Shortform lists can be displayed in the 3 formats below. You can also specify whether to use the VIEW MORE button and the maximum number of rows.
Grid1: Vertical Scroll Layout (Large content)
Grid2: Vertical Scroll Layout (Small content)
Horizontal: Horizontal Scroll Layout
Grid1: Vertical Scroll Layout (Large content)
Insert below code.
Grid2: Vertical Scroll Layout (Small content)
Insert below code.
Horizontal: Horizontal Scroll Layout
Insert below code.
Configure a shorform collection UI
The rows and hasMoreButton options are available only for Grid1 and Grid2.
Parameter name | Function | Description | Default |
---|---|---|---|
rows | Max rows | Sets the default number of rows that apply to the vertical scroll layout. | 2 (max:4) |
hasMoreButton | Whether showing the View More button | Indicates whether to display the View more button. If not displayed, additional rows are automatically loaded when the bottom of the list is reached. | true |
<div id="shoplive-shortform-2"></div>
<script defer >
cloud.shoplive.setShortformCollection("shoplive-shortform-2", {template: "GRID2" ,hasMoreButton:true, rows:4} );
</script>