I have a client who would like to sync up her site with Babylist and add an “Add to Babylist” button on each of her product pages—exactly what this online store is doing. Can anyone provide any guidance on how I would go about doing this? Thanks so much!
Hi @konamade ,
I checked and they are linking with 3rd party code: https://www.babylist.com/
So you just need to contact babylist directly, they will guide you to integrate it quickly.
Hope it helps!
Sharing how I added a button for babylist on this thread.
Disclaimer: I’m definitely not a Shopify expert, but this did the trick for me.
Step 1:
Go to Online Store > Themes > Click the “…” by ‘Customize’ > Edit Code > Open ‘Sections’ > Open ‘main-product.liquid’ > at the very end paste this code:
Step 2:
Go to Online Store > Theme > Customize > Navigate to Your Product Page >
Under “Add to Cart” put in a ‘Custom Liquid’ block and paste this code in it:
<a class=“button” style=“margin-bottom: 10px; width: 300px”
href="javascript: bl.addToRegistry({
images: ‘{{ product.featured_image.src | img_url: “800x” }}’,
price: ‘{{ product.price | money_without_currency }}’,
title: ‘{{ product.title }}’,
url: ‘{{ shop.url }}{{ product.url }}’
});">Add to Babylist
I tested it with my own registry and it worked. Hope this helps someone. ![]()
I can’t seem to figure out what you mean by “navigate to product page” to find under “add to cart”
Hi, I’ve tried following your instructions but I’m having trouble with Step 2. I can’t seem to find the correct location of “product page” or “add to cart”.
Are you able to help?
This works but now the add to cart and add to babylist buttons are different sizes. Any recommendations?
Hello - i am trying to do the same and have the work nearly working. it adds the product to babylist, but does not add the variant nor the image associated to the right variant. is there any refinement to the code to include the right image associate to the right color (ie red or size, etc)