Nhảy đến nội dung

getAttributeSetByMarker

Lấy một đối tượng thuộc tính duy nhất được thiết lập bởi marker

AttributesSets.getAttributeSetByMarker(marker, langCode)

const value = await AttributesSets.getAttributeSetByMarker('my-marker')
Schema

marker:* string định danh văn bản (marker) của bộ thuộc tính ví dụ: 'form'

langCode: string mã ngôn ngữ ví dụ: en_US

Phương thức này trả về một thuộc tính với dữ liệu từ bộ thuộc tính

Ví dụ trả về:

{
"id": 1764,
"updatedDate": "2025-01-31T22:25:11.952Z",
"version": 10,
"identifier": "my-id",
"title": "Set for pages",
"schema": {
"attribute1": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"identifier": "string",
"localizeInfos": {
"en_US": {
"title": "String"
}
}
}
},
"isVisible": true,
"type": {
"id": 5,
"type": "forProducts"
},
"position": 1
}
Schema

id: number Định danh đối tượng ví dụ: 1764

updatedDate: string($date-time) Ngày sửa đổi đối tượng ví dụ: ''

version: number Số phiên bản sửa đổi đối tượng ví dụ: 10

identifier:* string Định danh văn bản cho trường ghi ví dụ: 'my-id'

title:* string Tên bộ thuộc tính ví dụ: 'Set for pages'

schema:* Record<string, string> Mô tả JSON schema (các thuộc tính được sử dụng bởi bộ) của bộ thuộc tính ví dụ:

{
"attribute1": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"identifier": "string",
"localizeInfos": {
"en_US": {
"title": "String"
}
}
}
}

isVisible:* boolean Cờ hiển thị của bộ

type:* object Đối tượng loại bộ

position:* number Số thứ tự vị trí ví dụ: 1