Have to update an order afterwards cause the client can choose a retail partner.

<form method="post" name="submitOrder" style="width: 100%" onkeypress="return event.keyCode != 13;">
  <input type="hidden" name="action" value="commerce/cart/update-cart">
    {{ redirectInput('s/partner?number=' ~ number) }}
    {{ csrfInput() }}

    <input type="text" id="retailPartner"
           name="fields[orderCommercePartner][]"
           value="0">

    <input type="submit" 
           class="a-button  a-button--black  a-button--bold js-chooseThisPartner"
           style="margin-bottom: 40px;"
           value="{{ 'Choose this partner' | t }}">
</form>

That's my form I fill the value fields[orderCommercePartner][] via JS and it's filled.

But the order is not updated. Any Ideas what goes wrong here.

Orders can not be updated after they are completed. The only way around this at the moment is if a plugin used it's own controller action to update the order.

Please submit a feature request here: https://github.com/craftcms/commerce/issues

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.