2024-09 Deprecation of Button Order on Variants
This release brings some changes to how variants are ordered. The system now automatically orders the variants based on the variant attributes and values of the product family. For example, if the product family has attribute values of Color: Red, Green, Blue
and Size: S, M
, then variants are ordered by Red
first, then Green
then Blue
. Within Red
, variant Red / S
is ordered before Red / M
.
The APIs below are impacted.
When using POST /api/2.0/products
API to create a new product family:
-
Previously, the tutorial for creating variants warned not to set button order on variants when creating product family using the
POST /api/2.0/products
API because it may risk creating nested variants. This field has now been deprecated. Theindex
on the variant request payload will now be ignored. -
Previously, the variants are ordered based on the order the variant is specified in the request payload. This is now ordered by the system based on the attribute value encountered first in the request payload.
When using POST /api/2.1/products
API to add a new variant to existing product family:
- The field
index
has now been deprecated.