Live sales figure update

Hi, is there any way to keep track of a certain product’s sales figure live on a page? For example, create a custom page for the product. Live tracking about the product donation net figure to the customers.

@chienny_Tai there’s no built-in Liquid object or Storefront API field that exposes a product’s sales count, so you have to track it yourself. The usual shape is:

1. Subscribe to the orders/paid webhook in an app (or a custom app on your own server), add up quantity per product, and write the running total to a product or shop metafield.

2. Expose that metafield to the Storefront API and read it on your custom page, or render it straight in Liquid if the metafield is readable by the theme.

Treat “live” as near-real-time: webhooks land seconds after payment, and metafield output is cached. Refresh with the Section Rendering API instead of expecting instant numbers.

For a donation figure, decide whether it should subtract refunds — if so, listen to refunds/create too and keep a net value, not the gross total.