Add a product automatically to the cart depending on the subtotal price

Hello community

I need your wisdom I need to modify the liquid code in order to add a product “X” when the subtotal price of the cart is above “$Y”

Could you help me with that please?

I dont want to use any app

Thanks in advance

2 Likes