Hey there
I have a Klaviyo “notify me” button setup correctly on individual product pages with the accompanying popup, but I’d like them to display on collection pages that have the quick add feature. At the moment, when there is no stock, the quick add to cart button turns to “sold out” but I want it to become a Klaviyo “notify me” button along with the same popup.
Thank you
Hey @mikeylew 
You can show Klaviyo’s “Notify me” on collection cards (with Quick Add) by swapping the Sold out state for a Klaviyo trigger button and passing the variant id to it.
1) Make sure Klaviyo onsite script is global
In layout/theme.liquid (inside <head>):
<script async src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=YOUR_PUBLIC_API_KEY"></script>
2) Edit your product card (collection grid)
Open snippets/card-product.liquid (Grid/Dawn-like themes) and find the block that renders the Quick-Add button.
When the card is OOS, render this button instead of “Sold out”:
{%- assign first_variant = product.variants.first -%}
{%- if first_variant.available == false -%}
<button
type="button"
class="button button--secondary klaviyo-bis-trigger"
data-klaviyo-bis-trigger
data-product-id="{{ product.id }}"
data-variant-id="{{ first_variant.id }}"
data-product-name="{{ product.title | escape }}"
data-product-url="{{ product.url | within: collection }}"
data-product-image="{{ product.featured_image | image_url: width: 800 }}"
data-sku="{{ first_variant.sku | escape }}"
>
Notify me
</button>
{%- endif -%}
If your card has variant pickers, replace first_variant.id with the currently selected variant id (see step 3).
3) (Optional) Keep variant id in sync with on-card pickers
If your card has a variant selector, update the button’s data-variant-id on change:
<script>
document.addEventListener('change', (e) => {
const sel = e.target.closest('[data-product-card]')?.querySelector('select[name="id"]');
if (!sel) return;
const btn = e.target.closest('[data-product-card]')?.querySelector('.klaviyo-bis-trigger');
if (btn) btn.dataset.variantId = sel.value;
});
</script>
4) Style like your theme button (optional)
.klaviyo-bis-trigger { width:100%; }
That’s it—when an item is out of stock on the collection card, shoppers get a Klaviyo “Notify me” button and the same BIS popup.
(If a product has multiple variants and no on-card picker, consider sending users to the product page or defaulting to the first oos variant.)
You can check out our Shopify Partner profile — we’ve built and shared several free Shopify app solutions to help store owners. Feel free to explore our profile and see how our apps can make your Shopify experience better!
I can’t quite work out what I’m supposed to replace in step 2.
1 Like
Hi @mikeylew
Ok dear, please share your store URL and collaborator code with me so I can check and provide you with the proper solution.
@mikeylew did you add klaviyo app? and did you get the klaviyo code for your website?