how to add purchase order number in kentico automatically.

giridhar Addagalla asked on November 26, 2018 05:24

Hi currently i am working with kentico 11, I am automating my order with apis so it need an purchase order number which will track the data, this process will be done automatically once the checkout is done by the user but i have observed that there is no purchase order number in the system but there is an order custom data it is also empty, so i want to add the purchase order number where this number will be getting by the payment gate way once the payment is done, and can you say how to get the number from the gateway.

Correct Answer

Zach Perry answered on November 26, 2018 16:23

Can't understand the last few sentences, are you getting a Purchase Order Number from the gateway to store on the order? If so, you can just add a field to the Order class, and then update the order after payment.

If not, then why not just use OrderID? It is already unique.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Suneel Jhangiani answered on November 26, 2018 12:26

You can add fields to the Order class in the E-commerce module which is probably where you would want to store the Purchase Order Number. It won't be auto-increment in the database, but it is trivial to extend the OrderInfoProvider.SetOrderInfo() method to see what the last used value is and then increment by one.

0 votesVote for this answer Mark as a Correct answer

giridhar Addagalla answered on November 26, 2018 16:57

Thanks perry i am pretty much doing the same by adding the store name and order id result to dancinggoat1123 and pushing to api as a purchase order number and the other thing you said that you not able to understand is actually after payment is done the response is stored in the xml format where that can be called by its item name but i tryed to do the same but throwing error,https://docs.kentico.com/k11/e-commerce-features/customizing-and-developing-your-store/payment-related-customizing/working-with-payment-results this is the link of it.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.