Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

Technical Notes

Apparel Products and Sub-Products: database structure

Question: In the ProductCart database, how is the relationship between Apparel products and Sub-products handled?

Answer: Both the parent product and its sub-products are saved to the “products” table. The relationship between N sub-products and their unique parent product is handled by the “pcProd_ParentProd” field in the same table. The field holds the unique ID of the parent product. The value is that of the “idproduct” field for the parent product, in the same table.

If the product is a sub-product, the option groups (e.g. “Color”) and option attributes (e.g. “Red”) assigned to it are stored in the “pcprod_Relationship” field. Let's assume that the field contains the string: 6_9_11:

6 = ID of the parent product

9 = ID of the first “option group/option attribute” combination (e.g. “color/red”). The id refers to the “idoptoptgrp” field in the “options_optionsGroups” table.

11 = ID of the second “option group/option attribute” combination (e.g. “size/large”). Here too, the id refers to the “idoptoptgrp” field in the “options_optionsGroups” table.


QR Code
QR Code Technical Notes (generated for current page)