use Shopware\Core\Framework\Log\Package;
#[Package('buyers-experience')]
trait PromotionCartInformationTrait
{ /**
* Adds a new error to the cart if the promotion for
* the provided code was not found as active and valid promotion.
*/
private function addPromotionNotFoundError(string
$code, Cart
$cart): void
{ $cart->
addErrors(new PromotionNotFoundError($code));
} /**
* Adds a new error to the cart if the promotion has been found
* but somehow is not eligible for the current cart.
*/
private function addPromotionNotEligibleError(string
$name, Cart
$cart): void
{ $cart->
addErrors(new PromotionNotEligibleError($name));
}