Wholesale Storefront
Build a B2B storefront with bulk pricing.
Updated
On this page
Wholesale Storefront
Build a wholesale/B2B storefront using bulk pricing and customer tags.
import dash from "@/lib/dash"
export default async function WholesalePage() {
const { customer } = await dash.auth.getProfile()
// Check if customer is a wholesale buyer
const isWholesale = customer?.tags?.includes("wholesale")
if (!isWholesale) {
return <p>This page is for approved wholesale customers only.</p>
}
// Load products with bulk pricing visible
const { products } = await dash.products.list({ expand: "sizes" })
return (
<div>
<h1>Wholesale Ordering</h1>
<p>Bulk discounts applied automatically at checkout.</p>
{products.map(p => (
<div key={p.id}>
<h2>{p.name}</h2>
<p>Max bulk discount: {p.max_bulk_discount}%</p>
{/* Show bulk pricing table per size */}
</div>
))}
</div>
)
}