} foreach ($lineItems as $match) { // enrich all products in original cart
$this->
enrich($context,
$match['item'
],
$data,
$behavior);
// remove "parent" products which should never be displayed in storefront
$this->
validateParents($match['item'
],
$data,
$match['scope'
]);
// validate data timestamps that inactive products (or not assigned to sales channel) are removed
$this->
validateTimestamp($match['item'
],
$original,
$data,
$behavior,
$match['scope'
]);
// validate availability of the product stock
$this->
validateStock($match['item'
],
$original,
$match['scope'
],
$behavior);
} $this->featureBuilder->
prepare($items,
$data,
$context);
}, 'cart'
);
} /**
* @throws CartException
*/