DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsRecipesBuild a Product Page
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
Build a Product PageBuild a Cart DrawerBuild a Checkout FlowAdd SearchBuild a BlogAffiliate Landing PageCustomer Account PageWholesale Storefront
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Build a Product Page

Create a full product detail page with variants and reviews.

Updated March 29, 2026

On this page
  • Build a Product Page
  • Key Points
  • Related

Build a Product Page

This recipe walks through building a complete product page with images, description, variation picker, reviews, and add-to-cart.

typescript
// app/products/[slug]/page.tsx
import dash from "@/lib/dash"
import { VariationPicker } from "@/components/VariationPicker"
import { ProductGallery } from "@/components/ProductGallery"
import { ProductReviews } from "@/components/ProductReviews"

export async function generateMetadata({ params }) {
  const { seo } = await dash.seo.product(params.slug)
  return { title: seo.title, description: seo.description }
}

export default async function ProductPage({ params }) {
  const { product } = await dash.products.getCore(params.slug)

  return (
    <div className="max-w-6xl mx-auto grid md:grid-cols-2 gap-8 py-12">
      <ProductGallery mainImage={product.main_image} images={product.images} />

      <div>
        <h1 className="text-3xl font-bold">{product.name}</h1>
        <p className="text-2xl mt-2">
          {product.discounted_price ? (
            <>
              <span className="line-through text-gray-500">${product.price}</span>
              <span className="text-green-400 ml-2">${product.discounted_price}</span>
            </>
          ) : (
            <span>${product.price}</span>
          )}
        </p>

        <VariationPicker slug={params.slug} />

        <div className="mt-6 prose"
             dangerouslySetInnerHTML={{ __html: product.description }} />
      </div>

      <div className="md:col-span-2">
        <ProductReviews slug={params.slug} />
      </div>
    </div>
  )
}

Key Points

  • Use getCore() on the server for the initial page shell
  • VariationPicker loads getOptions() on the client
  • SEO via generateMetadata
  • Reviews loaded as a separate section

Related

  • Get Product by Slug
  • Variations & Sizes
  • Product Reviews
PreviousPayment FailuresNextBuild a Cart Drawer

On this page

  • Build a Product Page
  • Key Points
  • Related