Template Hooks

You are viewing documentation for an unreleased version of Craft Commerce. Please be aware that some pages, screenshots, and technical reference may still reflect older versions.

Commerce adds its own template hooks in addition to Craft’s.

# Control Panel Template Hooks

Hook Description & Template
cp.commerce.discount.edit After discount detail view’s “Enabled” field.
promotions/discounts/_edit.twig (opens new window)
cp.commerce.discounts.edit.content After discount detail view’s main content.
promotions/discounts/_edit.twig (opens new window)
cp.commerce.discounts.edit.details After discount detail view’s existing right sidebar details column.
promotions/discounts/_edit.twig (opens new window)
cp.commerce.discounts.edit Before discount detail view’s template blocks.
promotions/discounts/_edit.twig (opens new window)
cp.commerce.discounts.index After discounts index view’s main content.
promotions/discounts/index.twig (opens new window)
cp.commerce.order.edit Before order edit view’s template blocks.
orders/_edit.twig (opens new window)
cp.commerce.order.edit.details After existing order edit view’s right sidebar details.
orders/_edit.twig (opens new window)
cp.commerce.order.edit.main-pane After existing content within order edit view’s “Order Details” tab.
orders/_edit.twig (opens new window)
cp.commerce.product.edit.content After product detail view’s custom fields.
products/_edit.twig (opens new window)
cp.commerce.product.edit.details After existing product detail view’s right sidebar details.
products/_edit.twig (opens new window)
cp.commerce.sales.edit.content After sale detail view’s main content.
promotions/sales/_edit.twig (opens new window)
cp.commerce.sales.edit.details After sale detail view’s existing right sidebar details column.
promotions/sales/_edit.twig (opens new window)
cp.commerce.sales.edit Before sale detail view’s template blocks.
promotions/sales/_edit.twig (opens new window)
cp.commerce.sales.index After sales index view’s main content.
promotions/sales/index.twig (opens new window)
cp.commerce.subscriptions.edit.content After the last .pane in subscription detail view’s content block.
subscriptions/_edit.twig (opens new window)
cp.commerce.subscriptions.edit.meta After the discount detail view’s existing right sidebar details.
subscriptions/_edit.twig (opens new window)