Buy Y get X discount. Show X product in cart when Y is added to cart

Hi guy, is it possible to achieve something similar to the attached image on Shopify? I’ve created a Buy Y get X discount. When the customer add Y to the cart, I would like to show X, to let the user know that there is a discount. Much appreciated

You won’t be able to retrieve anything about the discount, but you could setup a metafield against both products referencing each other, then checking items in the card if they have that metafield and the referenced product isn’t in cart, show it.

We have that setup in place, but just wanted to check if there’s a more efficient option. Since we’ll need to update the product and create the discount manually, is there any way to have the discount details display directly from the discount rather than through the product setup?

I’ve found the following app that can deliver the required function Essential Upsell & Cross Sell