Alokai

ProductOptionConfig

Product option config.

interface ProductOptionConfig {
	checkbox_label: string;
	checked_by_default: boolean;
	date_earliest_value: string;
	date_latest_value: string;
	date_limit_mode: DateLimitMode;
	date_limited: boolean;
	default_value: string;
	file_max_size: number;
	file_types_mode: FileTypesMode;
	file_types_other: string[];
	file_types_supported: SupportedFileType[];
	number_highest_value?: number;
	number_integers_only?: boolean;
	number_limit_mode?: NumberLimitMode;
	number_limited?: boolean;
	number_lowest_value?: number;
	product_list_adjusts_inventory?: boolean;
	product_list_adjusts_pricing?: boolean;
	product_list_shipping_calc?: ProductListShippingCalc;
	text_characters_limited: boolean;
	text_lines_limited: boolean;
	text_max_length: number;
	text_max_lines: number;
	text_min_length: number;
}

Properties

NameRequiredTypeDescription
checkbox_labelRequiredstring(checkbox) Label displayed for the checkbox option.
checked_by_defaultRequiredboolean(checkbox) Flag for setting the checkbox to be checked by default.
date_earliest_valueRequiredstring(date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
date_latest_valueRequiredstring(date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
date_limit_modeRequiredDateLimitMode(date) The type of limit that is allowed to be entered on a date option.
date_limitedRequiredboolean(date) Flag to limit the dates allowed to be entered on a date option.
default_valueRequiredstring(date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string.
file_max_sizeRequirednumber(file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server.
file_types_modeRequiredFileTypesMode(file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: * specific - restricts uploads to particular file types; * all - allows all file types.
file_types_otherRequiredstring[](file) A list of other file types allowed with the file upload option.
file_types_supportedRequiredSupportedFileType[](file) The type of files allowed to be uploaded if the file_type_option is set to specific. Values: * images - Allows upload of image MIME types (bmp, gif, jpg, jpeg, jpe, jif, jfif, jfi, png, wbmp, xbm, tiff). * documents - Allows upload of document MIME types (txt, pdf, rtf, doc, docx, xls, xlsx, accdb, mdb, one, pps, ppsx, ppt, pptx, pub, odt, ods, odp, odg, odf). * other - Allows file types defined in the file_types_other array.
number_highest_valueOptionalnumber(numbers_only_text) The highest allowed value for a number option if number_limited is true.
number_integers_onlyOptionalboolean(numbers_only_text) The highest allowed value for a number option if number_limited is true.
number_limit_modeOptionalNumberLimitMode(numbers_only_text) The type of limit on values entered for a number option.
number_limitedOptionalboolean(numbers_only_text) Flag to limit the value of a number option.
number_lowest_valueOptionalnumber(numbers_only_text) The lowest allowed value for a number option if number_limited is true.
product_list_adjusts_inventoryOptionalboolean(product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list.
product_list_adjusts_pricingOptionalboolean(product_list, product_list_with_images) Flag to add the optional product's price to the main product's price.
product_list_shipping_calcOptionalProductListShippingCalc(product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: * none - don't adjust; * weight - use shipping weight only; * package - use weight and dimensions.
text_characters_limitedRequiredboolean(text, multi_line_text) Flag to validate the length of a text or multi-line text input.
text_lines_limitedRequiredboolean(multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input.
text_max_lengthRequirednumber(text, multi_line_text) The maximum length allowed for a text or multi line text option.
text_max_linesRequirednumber(multi_line_text) The maximum number of lines allowed on a multi-line text input.
text_min_lengthRequirednumber(text, multi_line_text) The minimum length allowed for a text or multi-line text option.

Referenced Types

On this page