Post by totinaples » Thu Oct 18, 2018 10:28 pm

Hello everyone
I have an Opencart 2.0.1.1 shop and I'm trying to execute a POST action after an order is completed. Practically I want to send the order shipping informations (name, address, etc...) to my external order management tool that accepts some REST API. I was able to send some static infos by editing the controller/checkout/success file. Anyway I have some strange problems of visualization due to an error regarding breadcrumbs and other unknown(for me) things. I read a lot of things and I think I should do something with the model/checkout/order file but I tried many things without success.

Does anyone know what should I try?
Thanks for your help


OC Version: 2.0.1.1
Theme: Journal2

Newbie

Posts

Joined
Wed Nov 11, 2015 12:12 am

Post by straightlight » Sun Oct 21, 2018 1:38 am

I would consider to upgrade OC at this point since recent OC versions uses a feature called: events which is way more easier to achieve the goal of your request. Even with a use of an API, it could still be adapted on that level.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by danishmagic » Sun Oct 21, 2018 11:42 am

I think you should perform this action on success page, and this can be possible using Javascript/Ajax + php, you need to create a form on success page which will be auto submitted using JavaScript/Ajax on window load and your information will be sent to the page you are looking for.

I hope it helps.

High Quality Website Designing and Development | Indian Matrimonial Sites | Software Development India :dance:


Newbie

Posts

Joined
Sun Oct 21, 2018 11:13 am
Location - India

Post by straightlight » Sun Oct 21, 2018 7:48 pm

Even though an Ajax request would be created, the order_id key gets unset in the success page. With an event, the output can be used from a module called from the database in order to create last action events before the order_id gets officially unset.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 17 guests