title: Shopify shipping notification based on variant inventory
body: <p>I'm trying to show a shipping message to users based on variant inventory, then pass it through as a line item. Currently everything is working, you just have to click onto another variant. However it does not show up when the page is loaded. How can I make the shipping notification show when the page loads on the first variant? I am using the Debut theme which does not have selectCallback.   </p>
  
  <pre><code>$stockMessage = $('#stockMessage');
        $stockMessageInStock = $('#stockMessageInStock');
        $stockMessageMadeToOrder = $('#stockMessageMadeToOrder');
        $stockMessagePreOrder = $('#stockMessagePreOrder');
    if (invQty &gt; 0 ) {
        $stockMessage.hide();
        $stockMessageMadeToOrder.hide();
        $stockMessagePreOrder.hide();
        $stockMessageInStock.show();
        $('#stock-status-prop').val('In stock - ships in 1-3 days');
      } else if (invQty &gt; -19) {
        $stockMessage.show();
        $stockMessageMadeToOrder.show();
        $stockMessagePreOrder.hide();
        $stockMessageInStock.hide();
        $('#stock-status-prop').val('In production - ships in 1-3 weeks');
     } else {
        $stockMessage.hide();
        $stockMessageMadeToOrder.hide();
        $stockMessagePreOrder.show();
        $stockMessageInStock.hide();
        $('#stock-status-prop').val('Pre order');
     };
  </code></pre>
  
  <p>You can see my js here:</p>
  
  <p><a href="http://cdn.shopify.com/s/files/1/0597/3409/t/56/assets/theme.js?6194985269805756198" rel="nofollow noreferrer">http://cdn.shopify.com/s/files/1/0597/3409/t/56/assets/theme.js?6194985269805756198</a></p>
  
  <p>Live site:</p>
  
  <p><a href="https://roughandtumbledesign.com/collections/convertible-backpacks/products/new-generation-hobo-pack-adjustable" rel="nofollow noreferrer">https://roughandtumbledesign.com/collections/convertible-backpacks/products/new-generation-hobo-pack-adjustable</a></p>
  
  <p>Thanks!!</p>