Embedding Babylist Button to your Shopify Site

Ever wanted to add the popular Bablylist Button to your shopify website so you can potential customers buying your products in the future? Well you’ll have to use the back-end code because there isn’t a Shopify app to make it easier.

babylist_social_square-db02fadd021f35d6513c85d39b1bf26d998faf9d5db8f4cf8a90ec161162ee12 Embedding Babylist Button to your Shopify Site

Instructions

  1. Login in to the admin part of the site (e.g www.yourwebsite.myshopify.com/admin or www.yourwebsite/admin
  2. Go to Online Store
  3. Select Actions, and select “Edit Code”
  4. Under “Templates”, select product.liquid
38269811-6e930f2e-3736-11e8-9ba0-fb1d9a169f13-1-1024x533 Embedding Babylist Button to your Shopify Site

And paste this piece of code:

 <script type="text/javascript">window._bl = { partner: 'INSERT YOUR DOMAIN NAME HERE' };</script> <script async type="text/javascript" src="https://babylist.com/add.js"></script> 

Hit Save.

5. Then go to your product-template.liquid, and paste this piece of code above the “Add to Cart” buttion and fill the appropriate information:

 a class="btn" 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</a>  

Hit Save.

Viola! You should be able to see the button in your single product pages.

Screen-Shot-2020-07-20-at-9.17.02-AM-1024x560 Embedding Babylist Button to your Shopify Site

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.