Finding the applicable liquid file for a given page

Solved

Finding the applicable liquid file for a given page

pmiller66
Shopify Partner
5 1 1

Here's my method for finding the liquid file that produces something on a page.
In this example, I want to find the liquid file that produces "Including ... in taxes"
on the customer order status page.

 

1. search the locale/en*.json files for the string "Including".

2. get the locale translation key associated with "Including..."

3. search the liquid files for the translation key; that search should lead
me to the applicable liquid file.


This for the Dawn theme. Problem is: step 1 fails. How can there be an
English language word generated on a page yet the word does not appear in the
en*.json files? And, BTW, the word doesn't appear in any liquid file.

 

And please comment on techniques to find an applicable liquid file.

Accepted Solution (1)
pmiller66
Shopify Partner
5 1 1

This is an accepted solution.

The technique described in the original post is valid.  My Shopify plan doesn't allow changes to certain areas and the order status is one area prohibited;  certain liquid files are not accessible.  Example where the technique works:  in the product page quick order list, there's a heading "PRODUCT SUBTOTAL".  In locales/en.default.json, you find the localization key 'product_total' for that heading. Search the liquid files for that key and it leads you to snippets/quick-order-list.liquid.  

View solution in original post

Replies 6 (6)

suyash1
Shopify Partner
10862 1343 1718

@pmiller66 - did you check default theme content? you can find text in there as well 

 

store admin > Online Store > Themes > in the current theme, click "..." > Edit default theme content

To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
pmiller66
Shopify Partner
5 1 1
 
Thanks. I did not know about that. I naively assumed that having done
"Download theme file" that I had the entirety of the theme. 
 
The "default theme content" has valuable info, including the taxes_included key 
(with value "Including {{ amount }} in taxes") that I was looking for in my quest to find the 
liquid file that generated:
 
        Including $0.00 in taxes.
 
Now I search the liquid files for something like 
'taxes_included' | t: amount: ...
 
and no matches. So the mystery continues. It's tempting to conclude that
the liquid files I'm searching (from the theme download) are not the ones in play.
 
suyash1
Shopify Partner
10862 1343 1718

@pmiller66 - can you accept me as collaborator of your site? I can check it, I will need website link and collab code, you can DM collab code and link

To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
pmiller66
Shopify Partner
5 1 1

Thanks for the reply.  My particular scenario is an example, one we hope to fix ourselves. The real issue is "how does one find the liquid or json file that generates some text on a front-end page"?  

pmiller66
Shopify Partner
5 1 1

This is an accepted solution.

The technique described in the original post is valid.  My Shopify plan doesn't allow changes to certain areas and the order status is one area prohibited;  certain liquid files are not accessible.  Example where the technique works:  in the product page quick order list, there's a heading "PRODUCT SUBTOTAL".  In locales/en.default.json, you find the localization key 'product_total' for that heading. Search the liquid files for that key and it leads you to snippets/quick-order-list.liquid.  

pmiller66
Shopify Partner
5 1 1

For the record, now that I'm deep into liquid, the obvious way to find
the associated liquid file is: Online Store => Themes => Customize => select
template under "Home page" => right click something => Edit code. That
takes you to the governing liquid file.