Great! Thank you, that helped a lot! Since I’m totally new to this development framework, it’s clear that I have a whole lot to learn if I want to be “real” OFBiz developer, but I have some notion of how the design works now.
Since I’m looking to jump right into this and have some instant customization, I searched for the “createOrder” key term. That lead me to:
In which I found :
<security https="true" auth="false"/>
<event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="createOrder"/>
<response name="error" type="view" value="checkoutreview"/>
<response name="success" type="view" value="checkoutreview"/>
Using Eclipse, I quick jumped to the source of org.ofbiz.order.shoppingcart.CheckOutEvents. That was found in this file:
There I found a method with this signature:
public static String createOrder(HttpServletRequest request, HttpServletResponse response)
And this notable object instantiation:
ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
So, I’m guessing I can evaluate the contents of the cart object to get what products where purchased, and then go off into my own custom code using that?
Here’s two important questions:
Is createOrder() only called after a successfully confirmed transaction? I.e when I’m at this point in the code, can I be certain the customer has paid for their items, or there an additional check to be made for that?
Is there an officially recommended way for me to insert custom code like this, and still permit an easy means for upgrading the system as a whole? Or do I need to just create my own repository and branches and then step through manual merges periodically?