The Product Query block loops through products purchased in a Gravity Forms entry and displays them using Product Template blocks. This is essential for creating product lists in order confirmation emails.
Adding a Product Query Block
- While editing your email template, click theย “+”ย button to add a new block
- Search forย “Product Query”ย or find it in theย “E-Commerce”ย category
- Click to insert the block
- Add a Product Template block inside to define how each product is displayed
How It Works
The Product Query block:
- Retrieves all products from the current Gravity Forms entry
- Loops through each product
- Displays each product using the Product Template block you’ve configured
- Shows all products in the order
Adding Product Templates
- Click inside the Product Query block
- Add aย Product Templateย block
- Inside the Product Template, add product information blocks:
- Product Title
- Product Quantity
- Product Unit Price
- Product Line Total
- Product Description (if available)
Product Template Structure
A typical Product Template includes:
- Product Titleย – Name of the product
- Product Quantityย – How many were ordered
- Product Unit Priceย – Price per item
- Product Line Totalย – Total for this product line
Best Practices
- Complete Information: Include all relevant product information in your template
- Consistent Layout: Use consistent layout for all products
- Clear Formatting: Make product information easy to read
- Styling: Style the Product Template to match your email design
Troubleshooting
Products Not Displaying
- Verify that the entry contains products
- Check that a Product Template block is added inside the Product Query
- Ensure the Gravity Forms integration is properly configured
- Verify that dynamic data is enabled with a form entry selected
Product Information Missing
- Ensure product information blocks are added inside the Product Template
- Check that products have the required information (name, price, quantity)
- Verify the form entry contains product data
Template Not Rendering
- Ensure Product Template block is properly nested inside Product Query
- Check that product blocks are inside the Product Template
- Test with actual form entry data
Additional resources
Use the links below for more information and guidance on adding blocks. Keep in mind that these articles are general information related to the WordPress Editor and building with blocks. Email Customizer does not utilize all blocks or functionality due to the limited capabilities of emails.
WordPress Editor