Overview
In V3 Template, products are fetched using GraphQL. While default product data is automatically included, accessing additional metafields requires three steps:- Adding metafields to the
getProductDetailsQuery
function - Including metafields in the
transformProductData
function - Accessing the metafields in your template’s theme.liquid
Basic Implementation
Step 1: Modify getProductDetailsQuery
Add your metafields to the GraphQL query in thegetProductDetailsQuery
function:
Step 2: Update transformProductData
Modify thetransformProductData
function to include your metafields:
Step 3: Access in Theme
Use the transformed metafield in your theme.liquid:Practical Example: Product Ratings with Judge.me
Prerequisites
-
Install Judge.me app on your Shopify store:
- Go to Shopify App Store and install Judge.me
- Enable the app integration in your store settings
-
Enable Judge.me in Glood:
- Navigate to Glood Product Recommendations
- Go to Settings >> Integrations >> Product Review Apps
- Enable the Judge.me app integration