Anonymous and demo modes
- 1 minute to read
The Design Editor offers two modes that can be used on public websites: demonstration and anonymous. Both modes allow users to customize a product without authorization. The main difference between modes is the automatic clean-up of user files. In the demonstration mode, the Design Editor automatically cleans up user files, including saved products, while in anonymous mode no files are cleaned up automatically.
Let us discuss both modes in detail.
Anonymous Mode
The anonymous mode allows users to customize products without authorization. The editor in this mode treats each session as belonging to a unique user. So, on a public website it allows keeping user files separated, preventing a user from accessing another user's images and products.
The usual workflow using the anonymous mode is as follows:
- An anonymous user customizes a product.
- The user continues working with the previously customized product as many times as they want.
- The user signs in or signs up and orders the product. Your system updates an authentication token and calls the setUserId method to set a user identifier and move user files to this user's folder.
- The system calls the Editor.finishProductDesign method and gets the hi-res output URLs.
To activate the anonymous mode, set the AnonymousModeEnabled
parameter to True
in AppSettings.config.
<appSettings>
...
<add key="AnonymousModeEnabled" value="True" />
...
</appSettings>
Demonstration Mode
The demonstration mode allows users to play with the editor. It does not require user authorization, and it prevents your system from overfilling with user files. The editor in demo mode treats each session as belonging to a unique user. So, on a public website it allows for keeping user files separated, preventing a user from accessing another user's images and products.
To activate the demonstration mode, set the DemoModeEnabled
parameter to True
in the AppSettings.config file.
<appSettings>
...
<add key="DemoModeEnabled" value="True" />
...
</appSettings>
Important
Do not use the demonstration mode for real orders. In this mode user files, including hi-res output, saved products, proof images, etc. are cleaned up automatically after the session ends. So, if a user saved a customized product when the system was in demo mode and wants to order it later, it may be impossible: the customized product may be deleted already.