shopify cornwall theme code changes

Change Sold Out message on Shopify Brooklyn theme

Shopify themes are templates written using liquid an open-source Ruby coding language. My knowledge of html, css, and php has equipped me with enough to be able to fathom out liquid and with Shopify’s excellent documentation and community input you can usually find something to do with your objective.

Blossom Clothing Cornwall wanted to be able to indicate products which would be “Coming Soon”. The Brooklyn theme handles “Sold Out” indicators smoothly based on inventory levels. What I needed to do was to flag a product as “Coming Soon” when certain criteria were met. I found some discussions in the Community which gave a clue as to how best to approach this and tailored it to the Brooklyn theme.

Basically a product is now flagged as “Coming Soon” when its product type is “Coming Soon” and inventory is at zero. Including the inventory as a criteria meant that no-one could purchase the product.

The files altered were:

  • product-grid-item.liquid
  • theme.scss.liquid
  • product-template.liquid

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.