Manually add code for Variant Option Product Options

If the enable button in our app didn’t work you can add our code manually to your theme.liquid file

  • Go to the Shopify Dashboard
  • Under Sales Channels click on Online Store
  • Click on Themes
  • On the theme, you want to edit click on Actions > Edit Code
  • Open the theme.liquid file and paste in the following code after the <head> tag.
<link rel="stylesheet" href="https://obscure-escarpment-2240.herokuapp.com/stylesheets/bcpo-front.css">
<script>var bcpo_product={{ product | json }}; {% if product.metafields.bcpo.bcpo_data %}var bcpo_data={{ product.metafields.bcpo.bcpo_data }};{% endif %} {% if shop.metafields.bcpo.bcpo_settings %}var bcpo_settings={{ shop.metafields.bcpo.bcpo_settings }};{% endif %}var inventory_quantity = [];{% for v in product.variants %}inventory_quantity.push({{v.inventory_quantity}});{% endfor %}if(bcpo_product) { for (var i = 0; i < bcpo_product.variants.length; i += 1) { bcpo_product.variants[i].inventory_quantity = inventory_quantity[i]; }}window.bcpo = window.bcpo || {}; bcpo.cart = {{cart | json}}; bcpo.ogFormData = FormData;</script>

If you need any help, contact us.

Was this article helpful?
Dislike

Pin It on Pinterest