In Commerce how can I have a customer update custom fields on an order after the order is completed? I'm using Commerce, and Orders can have a custom field on them. I need customers to be able to update that field from a front end form. I can't use the built in contoller for Orders because that requires Admin users.
Create a new plugin with a new controller class that enables this.

e.g.,

plugins/myplugin/MyPlugin.php

&lt;?php
namespace Craft;
class MyPlugin extends BasePlugin
{
    ... the usual stuff from https://pluginfactory.io/ etc ...
}
?&gt;


plugins/myplugin/controllers/My_OrdersController.php

&lt;?php
namespace Craft;

class My_OrdersController extends BaseController
{

    public function actionUpdateOrder()
    {
        // basic security precautions
            $this-&gt;requirePostRequest();

        // get the fields
            $orderNumber = craft()-&gt;request-&gt;getPost('orderNumber');
            $customField = craft()-&gt;request-&gt;getPost('customField');
            $order       = craft()-&gt;commerce_orders-&gt;getOrderByNumber($orderNumber);

        // do the stuff
            if ($order &amp;&amp;
                $order-&gt;customer-&gt;userId == craft()-&gt;userSession-&gt;getUser()-&gt;id &amp;&amp;
                $customField != '')
            {
                    $order-&gt;setContentFromPost(['customField'=&gt;$customField]);

                    // Lets also change the Order Status
                        $order-&gt;orderStatusId = 3; // this line changes the Status if wanted. Use the ID of the custom status.
                        $order-&gt;message = "Order status changed to 'To be cancelled' by customer";

                    craft()-&gt;commerce_orders-&gt;saveOrder($order);
            }
    }
}


Front end form:

&lt;form action="" method="POST"&gt;
    &lt;input type="hidden" name="action" value="myplugin/orders/updateOrder"&gt;
    &lt;input type="hidden" name="redirect" value="shop/customer/order?number={{ number }}"&gt;
    &lt;input type="hidden" name="orderNumber" value="{{ number }}"&gt; 

    &lt;label&gt;
        &lt;span&gt;Custo Field&lt;/span&gt;
        &lt;input type="text"
                name="customField"
                value="{{ order.customField }}"
        /&gt;
    &lt;/label&gt;
    &lt;input type="submit" class="button warning" value="Confirm"/&gt;
&lt;/form&gt;