Adding custom order action in Shop-Script

Extra order actions can be used to make the order processing more convenient and compliant with your company's workflow requirements. Read below to see how you can add custom action "Expecting payment". This sample action will change order state to "Expecting payment". After you receive payment for an order, you can change its state to "Paid".

Step 1. Adding new order state

If your own order action should change order state to a custom one, first add such a state. If no custom state is required for your action, then skip this step 1 and proceed to step 2 below.

To add a new state, proceed to backend section "Settings → Order states" and click on "New order state". Enter the state name and an ID. Select other state properties and save the changes.

Step 2. Adding new order action

Click "Add custom action".

  • Enter the name for your action and select the state which orders will be assigned upon execution of this action.
  • Select which status must be assigned to an order upon action execution.

  • Select the action appearance: button or link.
    A button is displayed at the top of the order-viewing page in backend. You can change the color for a button.
    A link is displayed in the right-hand sidebar on the order-viewing page. You can assign an icon to a link.
  • Select action behavior. By default, a custom action does nothing special except for changing an order status. Additionally, you can link your custom action to any of the built-in ones—to make your action perform the same logic as the selected built-in action does.

Save action properties.

Step 3. Availability of an action in different states

Decide on the states in which your custom action should be available to a backend user. To do so, select those states one by one in "Settings → Order states" screen, enable the checkbox next to the custom action name, and save the settings.


    Add comment

    To add a comment please sign up or login