Hi Jai1
I have theme “Craft” one of the new shopify free themes, and I don’t have “product-template.liquid” in my edit/code pages.. which page/line I should add the code to it? Thank you for your help in advance.
Topic summary
Core Issue:
Users want to display real-time inventory quantities on Shopify product pages, particularly for products with multiple variants (sizes, colors, etc.).
Proposed Solutions:
-
Basic Implementation: Add Liquid code to
product-template.liquidthat displays inventory count when Shopify inventory tracking is enabled. Multiple code snippets shared for different themes (Icon, Simple, Minimal, Supply). -
Variant-Specific Challenge: The basic code doesn’t automatically update quantities when customers switch between variants (e.g., changing from size Small to Medium). This requires custom JavaScript to dynamically refresh the display on dropdown/swatch changes.
Key Limitations:
- Solutions vary by theme; line numbers and placement differ across Icon, Simple, Minimal, Supply, Venture, Craft, and Spotlight themes.
- Some users report code not working on specific themes (Venture, Supply).
- Multi-location inventory display requires additional customization.
- Newer Shopify themes may not use
product-template.liquid, requiring alternative file locations.
Status:
Discussion remains open with ongoing troubleshooting. Several users successfully implemented basic inventory display, but dynamic variant updates and theme-specific compatibility issues persist. Professional developers offer custom JavaScript solutions for advanced functionality.