Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,075 of 9,075 pages
About the help in other languages
All help pages

Catalog modeling in depth

Designing product classes for an Exponential store - one class or several, the fields a product needs, item numbers, relations, folders and several locations, translations, and models that import and report well.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/e-commerce/catalog/catalog-modeling-in-depth.md

On this page

Catalog modeling in depth

This page is for developers and merchants who design the content classes of a store catalog. It goes through the decisions in the order they are usually made and explains the trade-offs of each in Exponential's content model.

Contents

  1. One product class or several
  2. The fields of a product
  3. Item numbers and identifiers
  4. Images and related products
  5. Folders and several locations
  6. Translations
  7. Models that import and report well
  8. A worked example

One product class or several

A class is a set of fields. Products that need different fields belong in different classes; products that differ only in values belong in one.

SituationModel
All products are described the same wayOne class, for example product
Books and clothing: different fieldsTwo classes, each with a price field
Physical products and servicesTwo classes; services need no weight or dimensions
Products and gift cardsSeparate classes; a gift card's delivery is custom work

Every class with a price field is a product class. Store > Products overview shows one class at a time, and the dashboard lists the product classes with their price attribute, so a few clearly named classes are easier to run than many.

The fields of a product

FieldDatatypeNote
NameezstringShown in the basket and the order; keep it short and unique enough for staff
Item numberezstring (or ezisbn for books)See below
Short descriptionezxmltext or eztextUsed in lists and landing page blocks
DescriptionezxmltextThe full view
Priceezprice or ezmultipriceExactly one per class (Price fields compared)
Tax classezproductcategoryOnly when VAT depends on product category (Product categories and VAT rules)
Optionsezoption, ezmultioption, ezmultioption2, ezrangeoptionOnly for choices that change the price (Options and variants)
Imagesezimage or relations to image objectsSee below
Weight, dimensionsezfloat, ezintegerOnly if a shipping handler will read them

How to choose datatypes in general is in Choosing datatypes for your fields.

Item numbers and identifiers

The kernel has no item number (SKU) field of its own. Add one as ezstring and make it required. It is what staff search for, what imports match on, and what an accounting or stock system will expect. The order keeps the product's name and price in its product collection, so an item number in the name or a separate field visible in order templates helps staff identify products in old orders.

  • One ezimage field is simplest for a small catalog.
  • An object relation list to image objects lets several products share images from the media library (Relations and reuse).
  • An object relation list to other products gives "related products" chosen by hand. The shop also has a fetch function, fetch( 'shop', 'related_purchase', hash( 'contentobject_id', ..., 'limit', ... ) ), that lists products bought together with a product, from real orders (kernel/shop/function_definition.php).

Folders and several locations

Products live in folders like any content. One product can have several locations, so it can appear in "Shoes" and in "Sale" without a copy. Keep one main location for its address and breadcrumb. Sections can group products for permissions and for discount rules, which can target sections (Discounts).

Translations

A product translated into several languages is still one product: the price field and options are fields of the translation, so check prices in every language you publish. Multilingual sites are described in Multilingual sites.

Models that import and report well

  • Keep field order stable: the CSV import reads columns in the order of the class's fields (Product imports and migrations).
  • Use plain datatypes for data that comes from outside (strings, numbers, prices) and rich text only for descriptions.
  • Give every class and field a clear identifier; templates, imports and remote services use identifiers.
  • Avoid putting prices in option text: options have their own price fields.

A worked example

A small store sells printed books and gift sets, in one currency, with a reduced VAT rate for books:

ClassFields
booktitle (ezstring), ISBN (ezisbn), author (ezstring), description (ezxmltext), price (ezprice), tax class (ezproductcategory), cover (ezimage)
gift_setname (ezstring), item number (ezstring), description (ezxmltext), price (ezprice), tax class (ezproductcategory), image (ezimage), wrapping (ezoption)

VAT: two VAT types (standard and reduced), two product categories ("Books", "Other"), VAT rules per country, and the VAT handler switched on (Product categories and VAT rules).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x