v1.49
Line item properties for apps
Apps can now attach a shopper's choices to a cart line and read them back on the order. It is what product customizers, engraving and personalisation apps need.
New for app developers
-
Line item properties. A theme app block calls
window.PlatformDTC.cart.setLineProperties(productId, payload). Every Add to cart and Buy now button attaches the payload to the line, and it travels through checkout to the order. Two differently customised lines of one variant stay separate. See Line item properties. -
Read them anywhere the order goes. The
orders/createapp webhook is now sent when checkout completes an order, withline_items[].app_properties.GET /api/v1/agent/v1/orders/{order_id}returnsitems[].appProperties. -
App blocks in the product section. The product page's main section accepts app blocks in its buy-box column, in the default theme and in Origin, at the position the merchant chooses.
-
Product media blocks. A block with
target: "product_media"is drawn over the product gallery's active image, for live previews on the product photo. See Product media blocks. -
Customisations on the order. The order page lists each line's customisation (for example "Name: Alex") and its preview image, which opens full size. The packing slip and invoice print the same lines, and the packing slip shows the preview instead of the catalog photo.
-
In the CSV and the emails. The order CSV's "Lineitem properties" column and the order confirmation and shipping emails include them.
Unchanged: lines without app data look and behave exactly as before. An app's private data (keys starting with _) is never shown to shoppers or printed.