Line item extension

This component provides extension attributes for order items.

  • It can be enabled independent of the order export component.

  • It generates line item numbers, which are unique within the dedicated order.

  • It is something Magento does not have by default but is required sometimes by ERP/OMS.

Configuration

The configurations for the line item extension can be executed in Magento’s admin UI Stores > Configuration > Pacemaker > Order Workflow

General Settings

ee line item extension settings
Figure 1. Line item extension settings
Configuration Default Value Description

Enable Line Items

No

Feature toggle for the whole module.

If enabled, the extension attributes will be loaded for each order item.

Enable Number Generator

No

If enabled a plugin will generate unique line item numbers per order every time an order is placed

Number Offset

1

This option appears if Enable Number Generator is set to Yes.

The value defines the count sequence for line item numbers.

For example, the value 3 would mean the numbers will be 3, 6, 9, 12, etc.

String Padding

Configuration Default Value Description

Enable String Padding

No

If enabled the function str_pad will be applied to the generated number.

Please refer to the str_pad() function description in PHP manual.

String Padding Length

6

Defines the number of chars to which the number will fill up

String Padding Character

0

The character, which will be used to fill up the padding

String Padding Direction

Left

In which direction the padding should be applied

Example

For SAP systems, we usually use the settings:

Configuration Value

Enable Line Items

Yes

Enable Number Generator

Yes

Number Offset

10

Enable String Padding

Yes

Enable String Length

6

Enable String Character

0

Enable String Direction

LEFT

This leads in line item numbers like 000010, 000020, 000030, …​