PurchaseOrderCommentForm Container
The PurchaseOrderCommentForm container displays a form that allows users to add a comment to the currently selected purchase order. The container requires no props. It listens for the purchase-order/data event emitted by the purchase order initializer.
The event is used only to determine when the drop-in is ready - no data from the event is required. After receiving the event, the container displays a single text-area comment field and an Add Comment submit button. This container provides one action: submit.

PurchaseOrderCommentForm container
Displayed information
- A single text-area comment field
- An Add Comment submit button
ACL permissions
| Parameter | Type | Req? | Description |
|---|---|---|---|
withHeader | boolean | No | Controls whether to render the container header section. Set to false when embedding the container within a layout that already provides its own header to avoid duplicate navigation elements. |
withWrapper | boolean | No | Controls whether to wrap the container in a styled wrapper element. Set to false when integrating with existing design systems or when the container is embedded within another styled component that provides its own layout structure. |
className | string | No | Adds custom CSS classes to the container element. Use to override default styles, integrate with existing design systems, or apply conditional styling based on application state. |
Magento_PurchaseOrder::view_purchase_orders
Integration example
Basic
import { PurchaseOrderCommentForm } from '@dropins/storefront-purchase-order/containers/PurchaseOrderCommentForm.js';import { render as provider } from '@dropins/storefront-purchase-order/render.js';
await provider.render(PurchaseOrderCommentForm, { withHeader: true, withWrapper: true,})(element);Minimal
await provider.render(PurchaseOrderCommentForm, { withHeader: false, withWrapper: false, className: 'custom-comment-form',})(element);Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
withHeader | boolean | No | Shows or hides the section header Add Comment. Use true (default) for a standalone section on the purchase order details page. Use false when embedding in another component that already has its own header. |
withWrapper | boolean | No | Wraps content in a Card component with secondary styling. Use true (default) for standard page layout with visual separation. Use false when embedding inside another card or container to avoid nested cards. |
className | string | No | Additional CSS classes for custom styling of the container. Use to apply custom spacing, margins, or other styles. Useful for adjusting layout in specific contexts. |
Admin panel configuration
The Purchase Order (B2B) feature must be enabled at both the store and company levels:
- Store level: Stores > Settings > Configuration > General > B2B Features > Order Approval Configuration > Enable Purchase Orders
- Company level: Customers > Companies > Edit Company > Advanced Settings > Enable Purchase Orders