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.
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?
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.
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.
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
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?
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
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?
(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?
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
is working on a reply...