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
Hey uCommerce team In my Order confirmation email i need to access the shipping information but the method takes a string of name ?
what i do is :
PurchaseOrder Order = PurchaseOrder.FirstOrDefault(x => x.OrderGuid.ToString() == orderGuid); Order.GetBillingAddress();Order.GetShippingAddress("what to define here");GetBillingAddress works like a charm but my shipping address is not showing. Any hints ?
Regards Troels Larsen
Hey Troels
The string is the shipping "alias" or name. I would use the following code to get all the shippingAddresses:
var test = PurchaseOrder.All().FirstOrDefault(); foreach (var shipment in test.Shipments) { var address = shipment.ShipmentAddress; }
Or hardcode the shipment name you are looking for - you can find it in the uCommerce_Shipment table in the database (under ShipmentName)
(there might be some small errors, don't have an uCommerce database right here)
Best regards
Thx Nickolaj
Works like a charm.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Getting shipping information in order Email
Hey uCommerce team
In my Order confirmation email i need to access the shipping information but the method takes a string of name ?
what i do is :
PurchaseOrder Order = PurchaseOrder.FirstOrDefault(x => x.OrderGuid.ToString() == orderGuid); Order.GetBillingAddress();
Order.GetShippingAddress("what to define here");
GetBillingAddress works like a charm but my shipping address is not showing.
Any hints ?
Regards Troels Larsen
Hey Troels
The string is the shipping "alias" or name. I would use the following code to get all the shippingAddresses:
Or hardcode the shipment name you are looking for - you can find it in the uCommerce_Shipment table in the database (under ShipmentName)
(there might be some small errors, don't have an uCommerce database right here)
Best regards
Thx Nickolaj
Works like a charm.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.