Why aren’t the custom option settings showing up when I preview a theme?

The code doesn’t get installed to unactivated themes. Once a theme is activated, the code gets automatically installed when the app is opened.

You can also manually insert this code right after the <head> tag in the theme.liquid file.

  • Under the theme you want to edit click on Actions > Edit Code
  • In the theme.liquid file, add this code just after <head> (the opening 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 bcpo_cdn = "{{'bcpo_cdn'|asset_url}}";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]; }}</script>

Was this article helpful?
Dislike 0

Pin It on Pinterest