Adding a limited stock promo to my product page

Hi guys, I’m looking to add a limited stock promo to my product page, where consumers will get a free product with any subscription purchase or bulk purchase options while stocks of the free product last. After stock of the free product empties I’d like this to all disappear from the product page until I run the promo again.

Does anyone know any ways of doing this or apps that can manage this?

Thanks

Use this condition

{% assign free_product_variant_id = ‘YOUR_FREE_PRODUCT_VARIANT_ID’ %}
{% assign free_product_variant = all_products[‘free-product-handle’].variants | where: ‘id’, free_product_variant_id %}

{% if free_product_variant.first.inventory_quantity > 0 %}

Get a free gift with any subscription purchase while stocks last!

{% else %}

Promotion ended - Free gift is out of stock.

{% endif %}

Hi @laurence1
You can create an automatic discount Buy X Get Y to make the product free and add conditions for when it should be added
You will require some knowledge of liquid and JS to add it to cart
and to manage the promo, you can set available quantity to this and the remove the promo if quantity becomes unavailable
OR
You can find some free or paid apps on shopify app store

Please press Like and Mark Solution if you find it helpful.

Thanks!