Dot All Lisbon – the official Craft CMS conference – is happening September 23 - 25.
Template Hooks
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
| cp.commerce.discounts.edit.content
| After discount detail view’s main content.
promotions/discounts/_edit.twig
| cp.commerce.discounts.edit.details
| After discount detail view’s existing right sidebar details column.
promotions/discounts/_edit.twig
| cp.commerce.discounts.edit
| Before discount detail view’s template blocks.
promotions/discounts/_edit.twig
| cp.commerce.discounts.index
| After discounts index view’s main content.
promotions/discounts/index.twig
| cp.commerce.order.edit
| Before order edit view’s template blocks.
orders/_edit.twig
| cp.commerce.order.edit.details
| After existing order edit view’s right sidebar details.
orders/_edit.twig
| cp.commerce.order.edit.main-pane
| After existing content within order edit view’s “Order Details” tab.
orders/_edit.twig
| cp.commerce.product.edit.content
| After product detail view’s custom fields.
products/_edit.twig
| cp.commerce.product.edit.details
| After existing product detail view’s right sidebar details.
products/_edit.twig
| cp.commerce.sales.edit.content
| After sale detail view’s main content.
promotions/sales/_edit.twig
| cp.commerce.sales.edit.details
| After sale detail view’s existing right sidebar details column.
promotions/sales/_edit.twig
| cp.commerce.sales.edit
| Before sale detail view’s template blocks.
promotions/sales/_edit.twig
| cp.commerce.sales.index
| After sales index view’s main content.
promotions/sales/index.twig
| cp.commerce.subscriptions.edit.content
| After the last .pane
in subscription detail view’s content block.
subscriptions/_edit.twig
| cp.commerce.subscriptions.edit.meta
| After the discount detail view’s existing right sidebar details.
subscriptions/_edit.twig