Skip to main content
This section describes the available actions in the direct order area. With these actions, products can be entered directly into an order list by article number, updated, and transferred to the basket.

Actions overview

ActionDescription
DirectOrderAddAdds a product to the direct order list by article number.
DirectOrderUpdateUpdates the quantity of a product in the direct order list.
DirectOrderDeleteRemoves a product from the direct order list.
DirectOrderAddLinesAdds another input row to the direct order list.
DirectOrderDeleteLinesRemoves the last input row from the direct order list.

Actions

DirectOrderAdd

This action adds a product to the direct order list by article number. After successful execution, the product is displayed with its information in the list. Usage example
Can 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
NameDescription
idThe article number of the product to be added.
Error codes
Error codeDescription
errorsByField.idError in the article number input.
errorsByField.quantityError in the quantity input.
Related modules, variables & methods Example showing how a product is added to the direct order list via an article number input field.
{{ var $myActionDirectOrderAdd = $wsActions.create("DirectOrderAdd", tag=string($myDirectOrderProduct)) }}
<form method="post" action="{{= $wsViews.current.url() }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionDirectOrderAdd.csrf }}">
    <input type="text" name="id" value="{{= $wsDirectOrder.items[$myDirectOrderProduct].id | ifNull('') }}">
    <button type="submit" name="wsact" value="{{= $myActionDirectOrderAdd.id }}">Search product.</button>
</form>

DirectOrderUpdate

This action updates the quantity of a product in the direct order list. Usage example
Can be used on the direct order page when a customer wants to adjust the quantity of a product that has already been entered.
Parameters
NameDescription
quantityThe new quantity of the product.
Error codes
Error codeDescription
errorsByField.quantityError in the quantity input.
Related modules, variables & methods Example showing how the quantity of a product in the direct order list is updated via an input field.
{{ var $myActionDirectOrderUpdate = $wsActions.create("DirectOrderUpdate", tag=string($myDirectOrderProduct)) }}
<input type="text" name="quantity" value="{{= $wsDirectOrder.items[$myDirectOrderProduct].quantity | ifNull('1') }}">
<button type="submit" name="wsact" value="{{= $myActionDirectOrderUpdate.id }}">Update product.</button>

DirectOrderDelete

This action removes a product from the direct order list. Usage example
Can be used on the direct order page when a customer wants to remove a product from the order list.
Parameters
NameDescription
idThe article number of the product to be removed.
Error codes
Error codeDescription
errorsByField.idError in the article number input.
Related modules, variables & methods Example showing how a product is removed from the direct order list via a button.
{{ var $myActionDirectOrderDelete = $wsActions.create("DirectOrderDelete", tag=string($myDirectOrderProduct)) }}
<button type="submit" name="wsact" value="{{= $myActionDirectOrderDelete.id }}">Remove product.</button>

DirectOrderAddLines

This action adds another input row to the direct order list so the customer can enter more products at once. Usage example
Can 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.
{{ var $myActionDirectOrderAddLines = $wsActions.create("DirectOrderAddLines") }}
<form method="post" action="{{= $wsViews.current.url() }}">
    <input type="hidden" name="wsact" value="{{= $myActionDirectOrderAddLines.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionDirectOrderAddLines.csrf }}">
    <button type="submit">Add row.</button>
</form>

DirectOrderDeleteLines

This action removes the last input row from the direct order list. The action is only available if more than five rows exist. Usage example
Can 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 the last input row is removed via a button, provided more than five rows exist.
{{ if $wsDirectOrder.currentLines > 5 }}
    {{ var $myActionDirectOrderDeleteLines = $wsActions.create("DirectOrderDeleteLines") }}
    <form method="post" action="{{= $wsViews.current.url() }}">
        <input type="hidden" name="wsact" value="{{= $myActionDirectOrderDeleteLines.id }}">
        <input type="hidden" name="wscsrf" value="{{= $myActionDirectOrderDeleteLines.csrf }}">
        <button type="submit">Remove row.</button>
    </form>
{{ /if }}