PDP Metafield Reference
The configuration for the preview is stored as a variant-level metafield with the following specifications:
Namespace: tinytags
Key: configuration
The schema is as-follows:
{
"Fields": [
{
"Type": "textbox",
"Limit": 15,
"URL": "",
"FontFamily": "Arial",
"FontSize": 40,
"TextAlignment": "left",
"Left": 1005,
"Top": 1363,
"Width": 399.41,
"Height": 45.2,
"Angle": 0,
"Fill": "rgb(0,0,0)",
"ScaleX": 1.57,
"ScaleY": 1.57,
"Position": "front"
},
{
"Type": "image",
"Limit": 30,
"URL": "gemstone.png",
"FontFamily": "",
"FontSize": 40,
"TextAlignment": "",
"Left": 1371,
"Top": 1330,
"Width": 900,
"Height": 900,
"Angle": 0,
"Fill": "rgb(0,0,0)",
"ScaleX": 0.07,
"ScaleY": 0.07,
"Position": "front"
}
],
"Options": [
{
"ID": 1,
"ValueID": 1,
"SKUPrefix": "L",
"Enabled": true,
"Position": "front"
},
{
"ID": 1,
"ValueID": 2,
"SKUPrefix": "C",
"Enabled": true,
"Position": "front"
},
{
"ID": 1,
"ValueID": 3,
"SKUPrefix": "R",
"Enabled": true,
"Position": "front"
},
{
"ID": 1,
"ValueID": 6,
"SKUPrefix": "J",
"Enabled": false,
"Position": "front"
},
{
"ID": 12,
"ValueID": 14,
"SKUPrefix": "U",
"Enabled": false,
"Position": "front"
},
{
"ID": 12,
"ValueID": 15,
"SKUPrefix": "L",
"Enabled": false,
"Position": "front"
},
{
"ID": 13,
"ValueID": 16,
"SKUPrefix": "Blue",
"Enabled": false,
"Position": "front"
},
{
"ID": 13,
"ValueID": 17,
"SKUPrefix": "Green",
"Enabled": false,
"Position": "front"
},
{
"ID": 13,
"ValueID": 18,
"SKUPrefix": "Red",
"Enabled": false,
"Position": "front"
},
{
"ID": 1,
"ValueID": 1,
"SKUPrefix": "L",
"Enabled": false,
"Position": "back"
},
{
"ID": 1,
"ValueID": 2,
"SKUPrefix": "C",
"Enabled": false,
"Position": "back"
},
{
"ID": 1,
"ValueID": 3,
"SKUPrefix": "R",
"Enabled": false,
"Position": "back"
},
{
"ID": 1,
"ValueID": 6,
"SKUPrefix": "J",
"Enabled": false,
"Position": "back"
},
{
"ID": 12,
"ValueID": 14,
"SKUPrefix": "U",
"Enabled": false,
"Position": "back"
},
{
"ID": 12,
"ValueID": 15,
"SKUPrefix": "L",
"Enabled": false,
"Position": "back"
},
{
"ID": 13,
"ValueID": 16,
"SKUPrefix": "Blue",
"Enabled": false,
"Position": "back"
},
{
"ID": 13,
"ValueID": 17,
"SKUPrefix": "Green",
"Enabled": false,
"Position": "back"
},
{
"ID": 13,
"ValueID": 18,
"SKUPrefix": "Red",
"Enabled": false,
"Position": "back"
}
],
"FrontBackgroundImage": "3942265ba8a0499882cb.jpg",
"BackBackgroundImage": "",
"FrontBaseSKU": "BA0VER",
"BackBaseSKU": "BA0VER"
}
Variant Customization Fields
Fields
An array of fields for the variant customizations
| Field | Description |
|---|---|
| Type | Allowed values are textbox or image |
| Limit | Applies only to textboxes. Integer value used to specify how many characters are allowed in the entry field |
| URL | Applies only to images. String value linked to the filename of the image to display |
| FontFamily | Applies only to textboxes. String value used to specify the font face to render the text in |
| FontSize | Applies only to textboxes. Decimal value used to specify the font size to render the text in |
| TextAlignment | Applies only to textboxes. String value used to specify how the text should be aligned in the preview |
| Left | The absolute left position of the field in relation to the canvas. Can be a decimal data type |
| Top | The absolute top position of the field in relation to the canvas. Can be a decimal data type |
| Width | The width of the field. Can be a decimal data type |
| Height | The height of the field. Can be a decimal data type |
| Angle | The rotation of the element in terms of a degree. Can be a negative and/or a decimal |
| Fill | The fill color of the field. Can be transparent and can be presented in either RGB, RGBA, or HEX format |
| ScaleX | The horizontal scale factor of the field. Can be a decimal data type |
| ScaleY | The vertical scale factor of the field. Can be a decimal data type |
| Position | The position of the field in relation to the product. Allowed values are front or back |
Options
An array of available options
| Field | Description |
|---|---|
| ID | The option ID. Will be an integer and will map to a shop level metafield |
| ValueID | The value ID. Will be an integer and will map to a shop level metafield |
| SKUPrefix | The SKU prefix for this option. String datatype |
| Enabled | Determines whether the option is available for use. Boolean data type |
| Position | The position of the option in relation to the product. Allowed values are front or back |
Background Images
FrontBackgroundImage
The filename of the background of the front of the variant. String datatype
BackBackgroundImage
The filename of the background of the back of the variant preview. String datatype. Can be null
Base SKUs
FrontBaseSKU
The base SKU for the front of the variant
BackBaseSKU
The base SKU for the back of the variant