doc-site
Reference

Legacy and unused code

What is dead, what is dormant, what is vendor-owned, and the known discrepancies in this theme.

Legacy and unused code

This theme has passed through several agencies and carries files from apps that are no longer installed. A prominent file is not evidence that anything renders it.

Search before you edit, and search before you delete. The counts below come from the commands in each section, so you can re-run them rather than trusting a number that may be out of date.

Sections

194 sections exist. 121 are referenced by a template or a section group. 44 more carry a presets entry, so a merchandiser can add them through the theme editor at any time even though nothing uses them today. 29 are neither referenced nor addable.

python3 - <<'PY'
import os, re, json
referenced=set()
for root in ['templates','sections']:
    for dp,_,fs in os.walk(root):
        for f in fs:
            if not f.endswith('.json'): continue
            try:
                raw=re.sub(r'/\*.*?\*/','',open(os.path.join(dp,f),errors='ignore').read(),flags=re.S)
                d=json.loads(raw)
            except Exception: continue
            for s in (d.get('sections') or {}).values():
                if isinstance(s,dict) and s.get('type'): referenced.add(s['type'])
pat = re.compile(r"\{%-?\s*sections?\s+['\"]([^'\"]+)['\"]")
for dp,_,fs in os.walk('.'):
    if any(x in dp for x in ['node_modules','./.git','doc-site']): continue
    for f in fs:
        if f.endswith('.liquid'):
            referenced |= set(pat.findall(open(os.path.join(dp,f),errors='ignore').read()))
existing = {f[:-7] for f in os.listdir('sections') if f.endswith('.liquid')}
print(sorted(existing - referenced))
PY

Base theme leftovers

These are the standard sections a Shopify base theme ships with. This store's templates are hand-written Liquid instead, so none of them render.

main-product           main-collection        main-cart
main-article           main-blog              main-page
main-search            main-gift-card         main-password
main-not-found         main-list-collections  main-customers-account
main-customers-login   main-customers-register
main-customers-addresses  main-customers-order
main-customers-activate-account  main-customers-reset-password

templates/product.liquid renders its own markup and never calls {% section 'main-product' %}. The same applies across the set.

Leave them in place. They cost nothing, and removing them would break a future migration back towards a standard template structure.

Other unreferenced sections

announcement-bar       blog-list-wrapper      cart-drawer
cart-template-backup-uso  collection-banner   collection-newitems
collection-template    newsletter-popup       predictive-search
prev-next-blog-posts   privacy-banner

The name cart-template-backup-uso marks it as a backup. The rest are earlier implementations that current sections have replaced. cart-drawer, for example, is an older drawer that mini-cart replaced.

Snippets

280 snippets exist and 34 are never referenced by name.

grep -rn "render '<snippet-name>'\|include '<snippet-name>'" \
  layout/ templates/ sections/ snippets/ blocks/

Seven render calls in the theme use a variable rather than a literal snippet name, so a snippet can be rendered without appearing in that search. Check those before concluding a snippet is dead:

grep -rn "{%-\?\s*render\s\+[a-z_]" layout/ templates/ sections/ snippets/

Apps whose snippets remain

PrefixAppUnreferenced files
hulkapps-*Hulk Apps wishlist4
icart-*iCart drawer1
hs-*An older upsell app1
digismoothie-*Gift box1
nosto-*Nosto recommendations1
uncomplicated.*Breadcrumbs1

Several Discount Ninja snippets also appear unreferenced. Do not remove those. The app renders some of them from its own injected markup, and regenerates them when it updates. They are listed in .prettierignore for that reason.

The sca.* family

Files prefixed sca. appear across 128 files. They relate to an older search and cart app.

grep -rln "sca\." layout/ templates/ sections/ snippets/ | wc -l

Some are still live, including snippets/sca.freegifts.liquid. Treat the prefix as a warning to investigate rather than as proof of anything.

Templates

TemplateStatus
templates/index.backup.liquidNamed as a backup
templates/collection-orig.liquidSuperseded
templates/collection.boost-sd-original.jsonPre-Boost collection layout
templates/search.boost-sd-original.liquidPre-Boost search layout
templates/index.discountninja.liquidDiscount Ninja variant
templates/product.discountninja.liquidDiscount Ninja variant
templates/index.haloroar.liquidNamed for a previous theme
templates/index.sca.*.js.liquidJavaScript served through a Liquid template
templates/search.sca.*.js.liquidJavaScript served through a Liquid template

The .js.liquid templates serve JavaScript through a Liquid route, which is an older pattern from before themes could rely on assets/. They may still be fetched by an app.

An alternate template is only dead if no product, collection or page in Shopify Admin is assigned to it. That assignment lives in store data, not in this repository, so the repository alone cannot answer the question. Check Shopify Admin before deleting one.

Entrypoints

These exist under src/entrypoints/ and no Liquid file renders them.

EntrypointStatus
quick-add-modal.ts, quick-add-modal.cssComplete implementation, nothing renders it. It tags its cart adds as quick-add-modal:addToCart
counter.tsImports src/components/counter/main, nothing renders it
mini-cart/elements/00-example.tsDeliberate template for new cart elements. Keep it
main.tsOnly the Vite modulepreload polyfill
utils.tsImported by other entrypoints rather than rendered
mini-cart/internals/*Imported by the cart elements as shared chunks. Not meant to be rendered

quick-add-modal is finished code that no page loads, so every build produces a bundle for it that nothing downloads. Either wire it up or remove it.

Blocks

Four blocks are named ai_gen_block_<hash>:

blocks/ai_gen_block_079d509.liquid
blocks/ai_gen_block_130a14e.liquid
blocks/ai_gen_block_80c6af0.liquid
blocks/ai_gen_block_b3abc84.liquid

Shopify's theme editor generates these when a merchandiser uses its AI block feature. The hash is not meaningful. Open the file to see what it does before assuming anything.

Dormant features

Deferred app loading

snippets/load-apps-script.liquid splits app URLs into critical and delayed groups, driven by settings.app_delayload_collection and settings.app_delayload_product.

Neither setting exists in config/settings_schema.json, so both resolve to blank and nothing is ever delayed. layout/theme.liquid still renders the snippet. layout/theme.medispa-redesign.liquid has the render commented out.

Adding those two settings to the schema would switch the feature on across the main storefront immediately. Test that change on a preview theme first.

The global popup

src/entrypoints/popup-logic.ts imports a global-popup definition and both the import and its call are commented out. snippets/global-popup.liquid and src/entrypoints/global-popup.css still exist and are still rendered.

The popup is therefore styled but never registered with the popup manager.

Known discrepancies

These are places where the code contradicts itself. They are recorded here rather than fixed, because fixing them changes storefront behaviour and belongs in its own ticket.

Reward banner cart total is converted twice

layout/theme.liquid computes window.theme.cartRewardBanner.cartTotal in dollars, dividing the summed line prices by 100.

src/entrypoints/cart-reward-banner.ts then divides that value by 100 again when constructing the banner.

CartRewardBanner's own constructor states the expected unit in its error message: cartTotal must be a number and be represented in dollars.

The initial value is therefore a hundred times too small. The banner recalculates from the cart on the next cart:changed event, so the effect is limited to the first paint, which is why nobody has fixed it. A cart of 200 dollars starts the page reporting 2 dollars.

Two different threshold comparisons

snippets/mini-cart.progress-bar.liquid and snippets/reward-tier.liquid unlock a tier when the cart total is strictly greater than the threshold.

src/entrypoints/mini-cart/components/free-gifts.ts adds the gift when the total is greater than or equal to the threshold.

A cart total exactly equal to a threshold gets the gift but not the filled progress bar.

A hard-coded threshold override

Both snippets/mini-cart.progress-bar.liquid and snippets/reward-tier.liquid rewrite a threshold of 198 to 199 before displaying it:

{%- if price_threshold == 198 -%}
  {%- assign price_threshold = 199 -%}
{%- endif -%}

The reason is not recorded. Avoid 198 as a threshold value until someone establishes why this exists.

Klaviyo form IDs live in two places

Product page and MediSpa offer popup IDs are in theme settings, editable by a merchandiser.

Sitewide signup popup IDs are compiled into src/components/popup-logic/definitions/sign-up-forms.ts, so changing one needs a build and a deploy.

Someone looking for a popup ID will find the theme settings first and assume every ID is there.

Before deleting anything

  1. Search the whole repository for the name, including inside JSON templates.
  2. Check for dynamic render calls that build the snippet name from a variable.
  3. For an alternate template, check Shopify Admin for products, collections or pages assigned to it.
  4. For a vendor file, check whether the app is still installed under Apps in Shopify Admin.
  5. Delete on a branch, deploy to a preview theme, and click through the affected pages.

The cost of leaving a dead file is a slightly larger theme. The cost of removing a live one is a broken page that nobody notices until a customer reaches it.

On this page