O'Reilly logo

ADempiere 3.6 Cookbook by Ajit Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Linking VirtueMart checkout with ADempiere

In this recipe, we will understand what it takes to enable the flow of information from VirtueMart to ADempiere when a user checks out one or more products on the VirtueMart web store.

How to do it...

  1. In the ps_checkout.php file, the add() function creates all the records related to the order after the order confirmation. Modify the add() function to include the following steps after all the records have been created in different tables:
    • Create a $fields array with all the relevant fields related to order, order history, order payment, and order items. Make sure that type is explicitly set on the array to, say, PURCHASEORDER
    • Create XML data from the $fields array by using the getXmlRepresentation() function ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required