I would like to add total product quantity

Topic summary

Goal: Aggregate total product quantity across variants and display it in an XML output.

  • A single product has three size variants, each with quantity 1. The desired result is to show a total availability of 3 in the XML.
  • The user specifically wants this total reflected “on this code SKU,” implying the total should appear in or alongside the SKU element/field in the XML.
  • Key terms: Variants (different options like sizes for the same product), SKU (Stock Keeping Unit identifier for a product/variant), XML (structured data format for output/integration).
  • No code, platform, or data structure details were provided (e.g., how variants are represented or how the XML is generated), and no solution or method has been proposed yet.
  • Status: Open question; awaiting guidance on calculating and injecting the summed quantity into the XML output.
Summarized with AI on January 24. AI used: gpt-5.

How can i add total product quantity on variants and shown at xml

eg I have a product of 3 different sizes, having 1 item each and i need to show the total availability of 3 products on this code SKU