Work
-
Jan 31
2011 -
Create customer and order from XML
This was a part of much larger project I’m doing custom developmnet on, but it was the scariest part! I had to develop a system that would accept an XML file containing customer and shopping cart data, and convert that to a regular Magento order with regular Magento customer, as if someone actually browsed the website, created a cart and then went through normal checkout. I first had to create shopping cart, fill it with products, then create a customer (if supplied one doesn’t already exist), add addresses, and after all that, initiate and complete the checkout process. Whew. To complete the process, luckily, one can use the onestep checkout functionality instead of admin order creation described by Inchoo here, but there are still bumps. The trick is to try and simulate regular Magento’s (browser) onestep checkout process as much as possible.

