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
Hi Matt, do you know if it is possible to use the SearchOrder method to find an order which has a certain custom property?
I added to a order the following property:
var p = context.Order.AsWritable(uow).SetProperties(new Dictionary<string, string> { { "axervePaymentId", capr.payload.paymentID } });
wich is a unique property and I'd like to retrieve the order by paymentId.
I'm completely a noob on lambda and linq so, if it is possible, a little snippet would be greatly appreciated.
Thanks
Hi Alessandro,
I think something like this should work
var orders = _orderService.SearchOrders((where) => where.FromStore(STOREID) .And(where.IsFinalized()) .And(where.HasProperty("axervePaymentId", "VALUE")));
Hope this helps
Matt
hello Mat, thanks a lot. It definitely works!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
use SearchOrder for custom properties
Hi Matt, do you know if it is possible to use the SearchOrder method to find an order which has a certain custom property?
I added to a order the following property:
wich is a unique property and I'd like to retrieve the order by paymentId.
I'm completely a noob on lambda and linq so, if it is possible, a little snippet would be greatly appreciated.
Thanks
Hi Alessandro,
I think something like this should work
Hope this helps
Matt
hello Mat, thanks a lot. It definitely works!
is working on a reply...