PurchaseOrderHistoryLog Container
The PurchaseOrderHistoryLog container displays all history logs associated with the currently selected purchase order. The container requires no props. It listens for the purchase-order/data event emitted by the purchase order initializer and uses the event payload to render its content.
After receiving the event, the container displays a heading for each history log (including the performed action and time) and the history log details (text). If the total number of history logs exceeds the visibleRecordsLimit, a View More button is shown to toggle expansion.

PurchaseOrderHistoryLog container
Displayed information
- A heading for each history log (including performed action and time)
- The history log details (text)
- A View More button (shown only when the number of history logs exceeds the visibleRecordsLimit)
Available actions
| Parameter | Type | Req? | Description |
|---|---|---|---|
visibleRecordsLimit | number | No | Sets the maximum number of history entries to display initially. Controls how many history entries appear before requiring a ‘Show More’ action. Use to prevent overwhelming users with long audit trails and improve page load performance. |
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. |
Access to the container is governed by the following ACL permission:
Magento_PurchaseOrder::view_purchase_orders
Integration example
Basic
import { PurchaseOrderHistoryLog } from '@dropins/storefront-purchase-order/containers/PurchaseOrderHistoryLog.js';import { render as provider } from '@dropins/storefront-purchase-order/render.js';
await provider.render(PurchaseOrderHistoryLog, { withHeader: true, withWrapper: true, visibleRecordsLimit: 5,})(element);Compact
await provider.render(PurchaseOrderHistoryLog, { withHeader: true, withWrapper: true, visibleRecordsLimit: 3,})(element);Minimal
await provider.render(PurchaseOrderHistoryLog, { withHeader: false, withWrapper: false, visibleRecordsLimit: 2, className: 'custom-history-log',})(element);Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
visibleRecordsLimit | number | No | Number of history records shown initially before the Show more button appears. Use 5 (default) for standard purchase order details page, 3 for compact displays or dashboard widgets, 10 or higher to show all records without toggle (for short histories), or 1 for minimal preview with expand option. |
withHeader | boolean | No | Shows or hides the section header. Use true (default) for a standalone section on purchase order details. Use false when embedding in another component with 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. |
className | string | No | Additional CSS classes for custom styling. |
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