Custom processing after order complete

Hi all,

I’d need to process basket and user information after order is complete (when everything is confirmed).
The reason for this is that the invoice and stock handling system is a completely different one and I need to send a CSV file to an FTP server with order details after each order complete.
So I guess I need to create a backend module that is executed on order complete callback?
Sorry, I am completely new to oxid dev, I hope you can point me the right direction.

Thanks a lot
Greg

Hi Greg,
if you are new to oxid development, i would suggest to look here: https://github.com/OXIDprojects for examples on how modules look like. There is also a book about programming for oxid, but it is in german language only: http://www.marmalade.de/shop/unsere-Lieblinge/OXID-eShop-Kochbuch.html. There are also examples here: http://wiki.oxidforge.org/Tutorials but some of them are outdated.

Maybe you would better have a look into the oxorder table in the database. Then you only need sql an not the oxid programming skills. Just an idea.

[QUOTE=Firefax;132522]Maybe you would better have a look into the oxorder table in the database. Then you only need sql an not the oxid programming skills. Just an idea.[/QUOTE]

Well yeah, that would be ok, the only thing is that how do I know from the DB when an order is inserted without comparing mechanisms.

But thanks for the ideas and the tutorial links. Will look around.

Greg

I noticed there is an example ‘ocb_ftporderdata’ in the oxid cookbook:

‘Submit your orders as XML-File to a remote server using the File Transfer Protocol.’

The code is available here: GitHub - OXIDCookbook/Cookbook_GER1: All code examples from the german book. The official repo of edition 1.

[QUOTE=leofonic;132530]I noticed there is an example ‘ocb_ftporderdata’ in the oxid cookbook:
The code is available here: https://github.com/OXIDCookbook/Cookbook_GER1[/QUOTE]

Great thank you! Looking into it now.

Greg

Thanks to the module example I could do this custom export so thanks a lot for your help!

One last thing though. When I hit finalize order it does its export but it doesn’t redirect to thankyou page. It stays blank with the following URL: shopDev/index.php?
If I get back to index.php I see the articles are still in the basket and I need to go through ordering again to make the basket empty and be ready for the next order.

So I guess somehow at the end of the export it desn’t give back correctly the hand to the finalizing process. What could be missing at the end of the custom module so that it finishes correctly the process?

Thanks
Greg

I am going to open a new thread since it might not be the same problem.