Skip to content

DJIA BuilderWooCommerce · 1 of 4

Shop, category and product templates

A Product template designs every single product page; a Product archive template designs the shop page and the category, tag, brand and attribute archives. The runtime renders both from product data that DJIA Builder copies into its own tables whenever a product changes, while WooCommerce keeps the products, prices, stock and orders.

What this does

For every request the runtime picks one template. A product page uses the product's own builder document if it has one; otherwise the matching Product template with the highest priority, and when no Product template matches, a Single template. A product archive tries Product archive templates first, then Archive templates. Product archives are the shop page (WooCommerce's product archive) and the archives of product categories, product tags, brands (product_brand) and attributes (pa_…). A route that no published template covers stays with WordPress in transitional mode, so you can publish the product template first and leave the shop as it is.

The templates never ask WooCommerce for data while a visitor waits. When a product is saved, the plugin copies what its pages need: prices as a guest sees them, variations, attributes with their swatch colours and images, stock, upsells, cross-sells, the rating and the 50 newest approved reviews. A variation change updates its parent, and a change to a WooCommerce price setting (currency, taxes, the price display suffix) projects every product again in the background. Prices and stock need no publish; only design changes do.

Before you start

  • WooCommerce is active and the first projection has finished: the Dashboard's sync queue is empty. A large catalog catches up in the background.
  • Build the product card once as a component; the shop, the category pages and the related-products loops can all reuse it.
  • To start from a working shop, the Esenca starter site brings a shop and category archive, a product page and a product card component; Undo removes the import again.

Steps

  1. Create the product template.

    Open DJIA Builder → Templates, click New template, enter a Name, choose the Type Product and click Create and open the editor.

  2. Choose a sample product.

    Sample in the editor's top bar ("Sample object for the template") picks the product the canvas shows. Choose a variable product with reviews, so every element has real data.

  3. Set where the template applies.

    A new template has no conditions; the Templates list shows it as "No conditions (not shown)". With no element selected, the settings panel shows the document: under Template conditions click Add condition. Entire site covers every product, because only product pages try Product templates. To give some products their own layout, add a second template with Product category (with subcategories) or Product type (simple, variable, grouped or external) and a higher Priority: new templates start at 10 and the higher number wins. Exclude rows take products out again.

  4. Build the page from the Product elements.

    The Product group of the element panel has Product gallery, Product title, Price, Sale badge, Stock, Product rating, Short description, Add to cart, SKU & meta, Attributes table, Product tabs, Reviews, Brand, Upsells, Related products, Cross-sells and Recently viewed. On Add to cart, Variation choices shows swatches, label buttons or dropdowns, and "Chosen variation updates price, stock, SKU and image" is on by default.

  5. Create the product archive template.

    Create a template of the Type Product archive with Entire site for every product archive, and category-specific ones with a higher priority if you need them. Inside a Product loop grid, set the looping Block to Products and Main archive query, which takes the shop, category or tag from the address. The Catalog group adds Sorting, Products per page, Pagination & load more, Result count and Category cards; Query Loop: build a product or post listing covers the loop itself.

  6. Publish and check.

    Click Publish in each template. The Templates list then shows the type, the conditions, the priority and the status published r…. Open a product and a category page in a private window.

Data a product template can show

Every value comes from the projection of the current product: the product of the page, or the loop item inside a Query Loop. Dynamic tags use the same {tag} syntax as the rest of the builder.

Product data, elements and dynamic tags
DataElementsDynamic tags
PricePrice (Lowest – highest, From lowest or Lowest only; the regular price during a sale; the tax suffix), Sale badge, , ,
VariationsAdd to cart; combinations that cannot be bought are disablednone
StockStock (the stock text),
IdentifiersSKU & meta,
AttributesAttributes table (the values of one attribute)
ReviewsProduct rating, Reviews (rating summary and review form), Product tabs,
BrandBrand
Weight and sizeAttributes table, Product tabs,
Other productsUpsells, Cross-sells, Related products, Recently viewednone

Product pages also carry structured data: a Product with its offer, or a ProductGroup with one offer per variation for a variable product. Ratings and reviews are added only when real reviews exist. Return policy and shipping details come from Settings → SEO, section Store, and stay off until you turn them on.

What you should see

  • Product pageyour template with the product's data; choosing a size or colour changes the price, stock, SKU and image without a request
  • Page sourcean application/ld+json script with Product or ProductGroup
  • Shop and category pagesthe Product archive template with the products of that archive, the sorting and the pages
  • Response headersX-Djia-Runtime: MISS for an anonymous visitor (PRIVATE when logged in); a route WordPress still answers has no such header

Limits

  • A product with more than 400 variations shows the first 400 on the page; it still sells through WooCommerce.
  • Product pages show the 50 newest approved reviews; older ones stay on the WordPress review page.
  • Pages show prices as WooCommerce shows them to a guest. Role, B2B and currency prices are not part of the public page; the cart and checkout always use WooCommerce's own prices.
  • While no Product template matches, a Single template with Entire site also renders products. Give it a Post type condition, or publish a Product template.

If it doesn't work

  • Product pages still show the theme's design. The template is not published, shows "No conditions (not shown)", or was published as staged (Go live → Templates). Check the Conditions and Status columns of the Templates list.
  • A category gets the wrong layout. Of the matching templates the highest priority wins, and a matching Exclude row drops a template. "(the draft has different conditions)" in the list means the live conditions are older: publish again.
  • A new price or stock level is missing. Wait for the Dashboard's sync queue to empty. With DJIA Cache or a CDN in front, the stored page stays until it is purged.
  • Choosing a variation does not update the page. Turn on "Chosen variation updates price, stock, SKU and image" on Add to cart, and check that the product has at most 400 variations.
  • The shop lists the wrong products. The loop of a Product archive template needs Products with Main archive query; any other query ignores the archive in the address.

Last verified 2026-10-20 · tested with DJIA Builder 1.0.20.15
To confirm Verified against the plugin code; run the steps on a test site before launch