The LineItemList component is the central representation of product lists in the B2B-Suite. The main design choices are:
The component is used across a multitude of different child components throughout the B2B-Suite.
The yellow colored blocks represent components, the smaller green ones are context objects that contain the component specific information.
The component provides LineItemList and LineItemReference as its central entities. As the name suggests a LineItemReference references line items. In most cases these line items will be products, but may include other types (eg. vouchers) that are valid purchasable items.
To make this work with the Shopware cart, order and product listing the LineItemReferences themselves can be set up by different entities. Schematically a list that is not yet ordered looks like this:
Whereas an ordered list looks like this:
As you can see, each LineItemReference borrows data from Shopware data structures, but an user of these objects can solely depend on the LineItemReference and LineItemList objects for a unified access.
This basic pattern revolves against other data structures in the component as well.
As you can see the specific data is abstracted away through the order context object. An object that can either be generated during the Shopware checkout process or be created dynamically through the API. Here the rule applies: The B2B-Suite may store or provide ID's, without having an actual concept on what they refer to.
These central data containers help provide a forward compatible structure for many B2B components.