Hey Dr Byte and Team!
I am trying to create a plug-in so that users who sell on Amazon can easily import their orders into the ZenCart database. I basically will have a CSV file from Amazon with all the order information, but I am stuck on the actual MySQL commands to INSERT a new record into the database.
For example, if I were to just create an INSERT INTO ORDERS command, that puts a record in there, but it still can't be seen in the admin panel.
So is it possible to respond with the actual COMMAND to insert a generic order to a customer account? Or at the very least, let me know what tables need to be updated for an order to be successfully attached to a customer. I know the Orders table needs a record, and I'm sure the Orders_Products and Orders_Total tables. Anything else?
And to keep this simple, I am NOT worrying about attributes, downloadable items, etc. I just want to start off by creating a dummy test PHP page where I can copy/paste the customer shipping address, product purchased, and shipping paid, and when submitted, I run the MySQL command to insert the order into a preexisting customer in our store.
I would really appreciate any feedback you can give me on this!
Bookmarks