The DirectOrder actions do not add anything to the basket. Transferring the captured items is a separate step that uses the
BasketItemAdd action. A complete example can be found under Transfer items to the basket.Actions overview
Actions
DirectOrderAdd
This action enters a product into the order form list based on its article number. If the product is already in the list, the action adds the new quantity to the existing quantity. After successful execution, the item is set in$wsDirectOrder.items.
The article number comes either from the id field or from the configured article number fields. The latter are only evaluated if the id field is empty.
Usage exampleCan be used on the direct order page, where customers can quickly search for products by article number and add them to the order list without having to open the product detail page. Parameters
Errors
The error texts and the exact mapping can be found under actions.directOrder.
Related modules, variables & methods
Example showing how a product is added to the direct order list via an article number input field.
DirectOrderUpdate
This action sets the quantity of an item in the order form list. UnlikeDirectOrderAdd, the quantity is not added but replaced. If the product number is not yet in the list, the action creates the item.
Usage exampleCan be used on the direct order page when a customer wants to adjust the quantity of a product that has already been entered. Parameters
Errors
The action can report the same errors as
DirectOrderAdd.
Related modules, variables & methods
Example showing how the quantity of an item in the direct order list is updated via an input field.
DirectOrderDelete
This action removes a product from the direct order list. Usage exampleCan be used on the direct order page when a customer wants to remove a product from the order list. Parameters
Errors
Related modules, variables & methods
Example showing how a product is removed from the direct order list via a button.
DirectOrderAddLines
This action adds further input rows to the order form so the customer can enter several products at once. The number is defined byrefreshedNumber under checkout.directOrder (default 5). The total number of rows increases to maximalNumber at most.
Usage exampleCan be used on the direct order page when a customer wants to enter more products than there are currently input rows. Related modules, variables & methods Example showing how a new input row is added to the direct order list via a button.
DirectOrderDeleteLines
This action removes input rows from the order form. Their number is defined byrefreshedNumber. However, the total number of rows never drops below initialNumber.
Usage exampleCan be used on the direct order page when a customer has added too many rows and wants to remove them again. Related modules, variables & methods Example showing how input rows are removed via a button. The button only appears if more rows are displayed than
initialNumber specifies.
