Custom variables are used to collect additional information from customers when purchasing a specific product.
The variable feature allows you to create custom fields for your products, enabling you to gather additional information from customers during the purchasing process. These variables are presented to the customer when they add the product to their cart and are used to customize the order.
For instance, if you create a VIP product and add a variable called “Color,” customers will be prompted to select their preferred color when purchasing the product. If certain colors have additional charges, those fees are automatically added to the total cart price. The %color%
variable in server commands is then dynamically replaced with the customer’s selected color.
In the example images below, a variable named “Color” was created and assigned to the VIP product. The “White” option is free, while “Blue” and “Red” have additional costs. Once the purchase is finalized, the %color%
variable in the server command is replaced with the selected color value.
Navigate to Dashboard > Store > Variables > Add New. You can add a new variable by providing the following details:
%color%
.red
, the %color%
variable in product commands will be processed as red
. A command like say Color: %color%
will be sent to the server as say Color: red
.Navigate to Dashboard > Store > Products > Edit Product. In the product editing page, click on the Variables tab. On the opened page, click the Add Variable button to assign a variable. The assigned variables will be requested from the user when they add the product to their cart, and the order will be processed accordingly.
In the commands section of the product editing page, use variables in the format %identifier%
. For example, if you created a variable with the identifier color
, you can use it in commands as %color%
. The variable in the command will be replaced with the value entered by the user and sent to the server.
When the commands are configured as shown in the example image and the “Red” color is selected, the server will receive the command:
say hello LeaderOS, you selected the red color!
Custom variables are used to collect additional information from customers when purchasing a specific product.
The variable feature allows you to create custom fields for your products, enabling you to gather additional information from customers during the purchasing process. These variables are presented to the customer when they add the product to their cart and are used to customize the order.
For instance, if you create a VIP product and add a variable called “Color,” customers will be prompted to select their preferred color when purchasing the product. If certain colors have additional charges, those fees are automatically added to the total cart price. The %color%
variable in server commands is then dynamically replaced with the customer’s selected color.
In the example images below, a variable named “Color” was created and assigned to the VIP product. The “White” option is free, while “Blue” and “Red” have additional costs. Once the purchase is finalized, the %color%
variable in the server command is replaced with the selected color value.
Navigate to Dashboard > Store > Variables > Add New. You can add a new variable by providing the following details:
%color%
.red
, the %color%
variable in product commands will be processed as red
. A command like say Color: %color%
will be sent to the server as say Color: red
.Navigate to Dashboard > Store > Products > Edit Product. In the product editing page, click on the Variables tab. On the opened page, click the Add Variable button to assign a variable. The assigned variables will be requested from the user when they add the product to their cart, and the order will be processed accordingly.
In the commands section of the product editing page, use variables in the format %identifier%
. For example, if you created a variable with the identifier color
, you can use it in commands as %color%
. The variable in the command will be replaced with the value entered by the user and sent to the server.
When the commands are configured as shown in the example image and the “Red” color is selected, the server will receive the command:
say hello LeaderOS, you selected the red color!