Add product to an existing order programatically

Can someone either point me to the file/code/function that adds products to an order?

I am working on syncing our orders in our ERP with our orders in Cs-Cart so when an update

is made in the ERP it will update in CS-Cart.

/schemas/exim/orders.php may be what you're looking for.

Found it. Thanks.


your project seems interesting, what ERP do you use ?

We are using Everest ERP and its been a lot of work but so far I have gotten 90% of the work done I need to:

- Exports Orders, and Order Items to be imported into Everest

  • Updates order status to In Process

    - Imports New Orders, and Updates to existing Orders, and Order Items.
  • Updates Personalization notes (when the option type was an input on the website)
  • Updates Taxes
  • Updates items quantity, pricing, discounts, and removed if they do not exist in ERP anymore.
  • Updates Shipping Method, and Shipping Cost
  • Imports Shipments (Invoices from ERP).
  • Import Payment Method
  • When new order is created from the ERP updates order status to in process status and emails confirmation to customer.