Product Inheritance

This chapter explains the technical sides of product value inheritance between parent and child products.

Tip

Before you read this chapter, take a look at Product Parents, Children, and Inheritance in the Editors section.

Processing inherited data

When a child or parent product is saved, hooks within the class Pixelant\PxaProductManager\Hook\ProcessDatamap\ProductInheritanceProcessDatamap will go through the data map, recursively adding inherited for ancestor product. This class has a high complexity.

The hooks will also take care of creating attributes that do not exist and remove those that should not be there (e.g. if the included attributes have been changed in the product type record).

Tracking relations

When updating a child product or its attributes, it can be difficult to ascertain which inherited relations ("cousin records") represent which relation record in the parent. To solve this problem, the Product Manager keeps an index of relations in the table tx_pxaproductmanager_relation_inheritance_index.

Operations on this table are handled by ProductInheritanceProcessDatamap through Pixelant\PxaProductManager\Domain\Repository\RelationInheritanceIndexRepository.

Tip

If the relation inheritance index comes out of sync, it can be rebuilt by running the command typo3 productmanager:updaterelationinheritanceindex.