Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How can I associate logged In user to ordersLines before got to checkout page.
Thanks
Hey,
You can call order.AssignToCustomer(member.Key.ToString()) to manually assign the order to a customer before Vendr does at the review stage.
order.AssignToCustomer(member.Key.ToString())
Hope this helps
Matt
The best support ever, Thank you for your quick answer.
I'm current get order by var order = VendrApi.Instance.GetCurrentOrder(content.GetStore().Id);
var order = VendrApi.Instance.GetCurrentOrder(content.GetStore().Id);
Now I'm doing order.AssignToCustomer(member.Key.ToString()) and getting an error because order is type of OrderReadOnly.
order
OrderReadOnly
Sorry, I just gave you the key part of the API, but you'll need to convert the read only entity to a writable one first.
You can find out how by following the docs here https://vendr.net/docs/core/2.1.0/umbraco-v9/key-concepts/readonly-and-writable-entities/#converting-a-readonly-entity-into-a-writable-entity
Hi Matt,
Thank you for the support. It help me a lot.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Vendr Checkout
How can I associate logged In user to ordersLines before got to checkout page.
Thanks
Hey,
You can call
order.AssignToCustomer(member.Key.ToString())
to manually assign the order to a customer before Vendr does at the review stage.Hope this helps
Matt
The best support ever, Thank you for your quick answer.
I'm current get order by
var order = VendrApi.Instance.GetCurrentOrder(content.GetStore().Id);
Now I'm doing
order.AssignToCustomer(member.Key.ToString())
and getting an error becauseorder
is type ofOrderReadOnly
.Thanks
Sorry, I just gave you the key part of the API, but you'll need to convert the read only entity to a writable one first.
You can find out how by following the docs here https://vendr.net/docs/core/2.1.0/umbraco-v9/key-concepts/readonly-and-writable-entities/#converting-a-readonly-entity-into-a-writable-entity
Hope this helps
Hi Matt,
Thank you for the support. It help me a lot.
is working on a reply...