In Shopify Liquid, pull a known product by handle with all_products.[your-handle] instead of building a separate API call or duplicating markup in JavaScript. It works for up to 20 distinct handles per page, so use it for featured or related products, not for iterating a whole catalog.

Context: Stack Overflow #13269125 (accepted answer, 40 votes): the asker had product handles and could not find a Liquid tag that fetches a single product by handle. The accepted answer (40 votes) points to the all_products global: assign someProduct = all_products.[your-handle] gives you the full product object without any extra API call or JavaScript. It keeps the existing snippets and markup intact since the product is available directly in the template.