November Happy Hour will be moved to Thursday December 5th.

Simplify API's to handle carts, OrderGroups, OrderForms etc.

Vote:
 

...one should simply be able to retrieve a specific cart by either OrderFormId or OrderGroupId (or both?). At the moment, you need things like metadata context, user-ID, cart name etc. As these carts are retrievable like this, but this seems horribly complicated for such a menial task. 

What about something nice, like an ICartRepository with methods like GetCart(int orderFormId) or GetCart(int orderGroupId). This would tremendously improve how cart handling works.

#89942
Aug 28, 2014 22:09
Vote:
 

Hi,

Didn't we provide OrderContext.GetPurchaseOrderById(purchaseOrderId) and OrderContext.LoadByCustomerAndOrderGroupId(customerId, orderGroupdId)? I think while it's not perfect, but it's quite enough for daily use.

In another node, ICartRepository is a good idea of making our API:s inline with each other. We might consider that in the future.

Regards.

/Q

#89973
Aug 29, 2014 11:20
Vote:
 

Yes, for PurchaseOrders you are absolutely right. But I needed the same for carts.

Carts should be retrievable from ICartRepository by:

  • OrderGroupID : Cart
  • OrderFormID : Cart
  • Customer-ID + Name : Cart
  • Customer-ID : IEnumerable

Purchase orders from IOrderRepository by:

  • OrderGroupID : PurchaseOrder
  • OrderFormID : PurchaseOrder
  • CustomerID : IEnumerable
  • From-CreatedDate + to-CreatedDate : IEnumerable
  • Status + From-CreatedDate + to-CreatedDate : IEnumerable
#89975
Aug 29, 2014 13:33
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.