How to disable/ hide your live site while you are setting it up

By default the apps code gets automatically installed into your published theme. If you want to work on the setting up the app without it showing up on your live theme follow these instructions.

  • Go to your Shopify Dashboard
  • Under Sales Channels go to Online Store > Click on Themes
  • Under your Live Theme, go to Actions > Edit code
  • Click on the theme.liquid file in the Layout Section

In this section replace our code below

<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>

with this code

<!--
<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>
-->

If you want to test the app on a theme that isn’t published click here for instructions
Was this article helpful?
Dislike 0

Pin It on Pinterest