How To Display Bitcoin Currency in Shopify Without APP?

Are you accepting Bitcoin on your store? Then this article is absolutely for you!

Upload the bit-rates.js file as a theme asset

  1. Download the bit-rates.js file by clicking here.

  2. From your Shopify admin, go to Online Store > Themes.
  3. Find the theme you want to edit, and then click Actions > Edit code.

  4. Click Assets.

  5. Click Add a new asset.

  6. Click Choose File and browse to the downloaded file.

  7. Upload the  bit-rates.js file.

Include the bit-rates.js file

  1. From the Edit HTML/CSS page, under Layout, click theme.liquid.

  2. Locate the closing </body> tag at the end of the theme.liquid file.

  3. Copy and paste   {{ "bit-rates.js" | asset_url | script_tag }} just before the </body> tag.

  4. Click Save.

Add following code to display BTC price

This code need to add where you want to display BTC price. Make sure {{ product.price }} accessible or you can add {{ variant.price }}. 

<span class="bitcoin-price" data-usd="{{ product.price }}"></span>
If you are using other currency than usd(suppose inr) then just use code like 

<span class="bitcoin-price" data-inr="{{ product.price }}"></span>

    That's It, Enjoy!

    Leave a comment

    Please note, comments must be approved before they are published