These are the product state parameters that can be sent on the smartlink app. The product on the smartlink then loads with the state that is sent on the parameters.
It is useful when the front end platform requires certain states to be chosen outside the smartlink, for example, colour and size. Using this feature, the smartlink can load the product with the chosen color and size when the user clicks on Customize.
The following product states can be sent:
- Aspect options
- Text
- Images
- Attributes
- Print Sizes
- Variants
Aspect Options
The selected aspect option can be controlled using:
state[aspect][X][option]=Y
Where X
is the name or ID of the target aspect and Y
is the name, ID or SKU of the desired aspect option.
aspect option names currently do not support spaces when being called in state parameters.
Text
The default text for specific text areas can now be controlled using:
state[text_areas][X][text]=Custom%20Gateway
Where x is the name, internal name or ID of the text area.
Please note that i
n both cases, if X
or Y
have any spaces or other special characters, they must be encoded.Names are case sensitive.
Images
The default image for specific image areas can now be controlled using:
state[image_areas][X][url]=Y
Where x is the name, internal name or ID of the Image area and Y is the publicly accessible image URL.
Please note that In both cases, if X
or Y
have any spaces or other special characters, they must be encoded. Note Names are case sensitive.
Attributes
The default attribute for specific attributes can be controlled using:
state[attribute][X]=Y
Where X is the name of the Group Name of the attribute, and Y is the Value of the attribute.
Print Sizes
We can now send the Print sizes as state parameter on the url.
&state[print_size]=Print_Size
Where Print_Size:
- The Print Size ID
- The Print Size SKU
- The Print Size Description
Please note, the Print Size ID can be found from the variant export: variant.print_size_id (provided the variants are set up using the print sizes)
The Print Size SKU and print size Description can be found under Print Specification > Print Size
Variants
If the product has the variants set up (with the combination of Aspects, Attributes and Print Sizes), then the variant information combining all of them can be sent as state parameter on the url.
&state[variant]=Variant Name
where Variant Name = Attribute1 + Attribute2 + Aspect1+ Aspect2 + Print Size Description
So, for example if a product variant has the following it will appear like so - Aspect1=Red (Front), Aspect2=Red (Back), Print Size Description=Large and No Attributes would need to be set as &state[variant]=Red Red Large.
Please note that with Variants, all standard apps except digital3, eris and 3coloumn3 (which do not display size option currently) are updated with variants.
Examples
We have added a selection of different examples of this as shown below:
- Aspect Example
- Aspect Example 2
- Attribute Example
- Image Area Example
- Text Area Example
- Print Size Example
- Variants Example