Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gordon Saxby 1444 posts 1855 karma points
    Oct 11, 2018 @ 09:10
    Gordon Saxby
    0

    set order Customer ID

    Is there an API call that will set the value of CustomerId on an order?

    We want to give admins the ability to assign an order to an Umbraco member, after the order has been placed.

    I have seen addOrUpdateOrderProperties which will update custom properties, but can't (obviously) see if there is anything to update the order itself.

  • Rune Grønkjær 1371 posts 3102 karma points
    Oct 11, 2018 @ 11:55
    Rune Grønkjær
    0

    Hi Gordon,

    The property will automatically be set to the current member when the order is created. If a member is logged in of course.

    You can always change it on the fly and save the order after that.

    /Rune

  • Gordon Saxby 1444 posts 1855 karma points
    Oct 11, 2018 @ 12:08
    Gordon Saxby
    0

    No, the issue is that we may need to set the member Id FOR a member / order, after they have made the order (and not created an account).

    They can potentially create an account later on, but then their order is not related / linked to their account.

    As a site admin function, how do I set the member Id or a specific order?

  • Rune Grønkjær 1371 posts 3102 karma points
    Oct 11, 2018 @ 12:21
    Rune Grønkjær
    0

    Yes, and you can allways use the .NET api to add the customer id later on.

    The javascript api cannot do it. So if you want someone to be able to add it manually, you have to make your own controller and use the .NET api to do it.

    /Rune

  • Gordon Saxby 1444 posts 1855 karma points
    Oct 11, 2018 @ 14:06
    Gordon Saxby
    0

    The javascript api cannot do it

    Ah, so that means I can't update the admin order details page to do it then, (edit-order.cshtml in macroScripts) as that uses javascript to save the changes, I think?

  • Gordon Saxby 1444 posts 1855 karma points
    Oct 11, 2018 @ 14:10
    Gordon Saxby
    0

    (my other response didn't appear?!?)

    I was hoping to edit the edit-order.cshtml template in macroScripts, but that uses javascript to save the changes, doesn't it?

    So, I'll need to create my own separate page?

  • Rune Grønkjær 1371 posts 3102 karma points
    Oct 11, 2018 @ 14:12
    Rune Grønkjær
    0

    I got an email with your other response. Weird.

    Anyways. Yes you can (edit the edit-order.cshtml template), but you will need your own ajax call to your own controller, to update the CustomerId on the order. It's closed for the Tea Commerce javascript api for security reasons.

    Otherwise you can always use the custom properties on the order to change the customer number. The JavaScript can edit those, if they are not set to read only or server side only.

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft