#
Product Types in Commercetools
Product types are a fundamental concept in Commercetools. They enable you to define the structure and attributes of your products.
#
Introduction
#
What Are Product Types?
A product type is a blueprint that defines the characteristics and properties of a particular group of products. It acts as a template, allowing you to create products with a consistent set of attributes and variations.
#
Key Features of Product Types
Attributes: Product types define the attributes that products of that type can have. These attributes can include things like size, color, material, and any other relevant product information.
Variants: Products can have different variants, and product types enable you to specify which attributes can vary between these variants. For example, a t-shirt product type might allow variations in size and color.
Validation: Product types often include validation rules to ensure data consistency. This helps prevent incorrect data from being associated with a product.
#
Catch All Product Type
The "Catch All" product type is a versatile and temporary solution designed to facilitate the storage of product attributes in a flexible JSON format within the Commercetools platform. This concept is particularly useful during transitional phases when a stable and structured product model is yet to be established.
The product type consists of a single field called JSON
, which field can store a set of product attributes and their corresponding values. On the frontend, the JSON data can be parsed and dynamically rendered.
#
Provisional Solution
This product type is meant as a provisional solution, especially when your product catalog is evolving, and you need to adapt to changing requirements without constant modifications to your product type structure.
#
Usage
Rocket will ask you if you want to use the Catch All product type while executing the ignite
command.
Alternatively, you can run rocket commercetools product-type-catch-all
.