Mastering Taobao Product Data: From Attributes to Dynamic SKU Forms
This article explains Taobao's product and SKU concepts, the relationship between attribute name and value tables, how to fetch and process attribute data via the API, and techniques for dynamically building forms and handling SKU combinations in e‑commerce systems.
Taobao Terminology
Product vs. Item : A standardized Taobao product is uniquely identified by category plus key attributes (e.g., brand and model for phones). A product includes key attributes, general info, sale attributes, and non‑key attributes. Multiple items sharing the same product have identical consumer utility.
Attribute Names and Values : Search relies on attribute tables. Attribute names belong to categories; values are stored separately. Brands and series are treated as category attributes.
The left table stores attribute names with parent‑child relationships (e.g., brand → model → sub‑model), while the right table stores the actual attribute values.
Key fields include parentVid linking attribute names to values, and the number of models is stored in the value table.
SKU
In Taobao, a SKU is a combination of sale attributes representing the smallest sale unit (e.g., color: gold; package: single charger). SKU combinations enable tracking of sales, inventory, and pricing for each variant.
While some e‑commerce platforms may choose not to expose SKU details directly to users, they are essential for internal analytics.
Brand and Series
Brands and series are encoded as attributes (e.g., brand: Head & Shoulders; series: Refreshing). Adding a new brand only requires defining its basic attributes.
Fetching Attributes
API documentation: Taobao API Docs
API attribute testing tool: Attribute Test Tool
SDK download: SDK Link
When scraping large data sets, handle API failures by logging IDs and retrying after removing failed entries.
Dynamic Form Construction via Attributes
After a user selects a category, retrieve all attribute names and values for that category. Taobao's add‑item page uses a UL → LI layout, making JavaScript implementation straightforward.
Attributes are categorized as key, non‑key, or user‑defined. Data fields such as is_key_prop, is_sale_prop, is_enum_prop, multi, must, and child_template determine the appropriate form control (select, checkbox list, etc.).
Sale attributes can combine into multiple SKUs; a practical approach is to pre‑generate all possible SKU rows, hide them in the DOM, and display the relevant row when a user selects a combination, reducing complexity and improving performance.
For a ready‑made solution, see the open‑source nopecomerce project’s variant implementation.
Additional Notes
Understanding attribute relationships (e.g., brand → series → sub‑series) and their storage in name/value tables is crucial for building robust e‑commerce back‑ends and reporting systems.
Source: Original Blog Post
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITFLY8 Architecture Home
ITFLY8 Architecture Home - focused on architecture knowledge sharing and exchange, covering project management and product design. Includes large-scale distributed website architecture (high performance, high availability, caching, message queues...), design patterns, architecture patterns, big data, project management (SCRUM, PMP, Prince2), product design, and more.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
