Try our conversational search powered by Generative AI!

How to retrive purchaseorder using cart id not with order groupid. Version 10.7.3


How to retrive purchaseorder using cart id not with order groupid.

If I load the purchaseorder with contactid. which purchase order it will loaded if I have more that  one inprogress purchase order.

After creating the purchase order using SaveAsPurchaseOrder,  is that possible to update the purchase order.

Note:- I am new to episerver

Jun 29, 2017 10:51

If you load with contactid, all placed purchase orders will be return. So probably you can look into the latest one?

The common practice is to delete the cart after the PO was created, so it's impossible to get the PO from the cart id.

Jun 29, 2017 11:12

Commonly when do we create the purchase order?

Is it after the payment success?

Our situation the payment is happing on the Adyen payment gateway.

We didn’t create the purchaseorder on the checkout page. We created the purchaseorder after the payment

Notification comes from adyen.

If we create purchase order before redirecting to adyen gateway, then how do we update the payment reference number received from adyen to purchase order?

It will appreciate if give me the right way of implementation when to create purchase order.

Jun 29, 2017 11:20

I would recommend creating the purchaseorder before going to the payment gateway.

To go to the payment gateway while you still have the cart opens up for possibilities to alter the cart while the payment is being processed.

There is no problem updating a purchaseorder after it has been created, works in same way as the cart.

I am not familiar with Adyen but most payment gateways allow you to send in your own identification(order group id) and will return that together with their new payment reference number, so you can easily find you order and update the payment with their ref.

Jun 30, 2017 15:06

How do we update the PurchaseOrder for the same cart.

if i use the SaveAsPurchaseOrder for the same cart it creates new purchase order.

what is method to update the purchase order.

Jun 30, 2017 15:17

It is the new purchase order created by SaveAsPurchaseOrder that you use, once you created that one the cart is no longer interesting and can/should be deleted.

IOrderRepository.Save(purchaseOrder); //saves the updated purchase order.

Jun 30, 2017 15:33

How would you handle the customer changing their mind and wanting a different payment method? Such as sending them to DIBS (credit card payment gateway), they click cancel, and then want to be invoiced or something else?

I'm upgrading a 7.5 site to 11.*, and the old site doesn't create a purchase order until payment has been made, i.e. the customer is redirected to the cart checkout page if they fail/cancel DIBS payment. The added benefit to this is that the customer can change the cart before re-trying the checkout process.

Oct 03, 2018 13:44

In that scenario I would cancel the purchase order and restore the cart. Whenever they are on the checkout page the customer should have a cart but as soon as they start the checkout process you should create a PO.

Oct 03, 2018 14:22
* 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.