Post by micool » Tue Mar 12, 2019 8:21 pm

Hi, I'm trying to make OpenCart call an API after checking out the orders, is there a trigger that allows me to do this? Currently I modified a payment module in order to achieve what I wanted to happen.

Newbie

Posts

Joined
Tue Mar 12, 2019 7:04 pm

Post by DigitCart » Tue Mar 12, 2019 10:01 pm

Hi
you did not mention your OpenCart version.
check this file:
catalog\controller\checkout\success.php

This part:

Code: Select all

if (isset($this->session->data['order_id'])) {
	// Do something here
}
or you can use Event system:

OpenCart 2.0, 2.1
trigger: post.order.history.add
action: path-to-your-controller/your-function

OpenCart 2.2, 2.3, 3.0
trigger: catalog/model/checkout/order/addOrderHistory/after
action: path-to-your-controller/your-function

My Extensions / DigitCart


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm

Who is online

Users browsing this forum: No registered users and 3 guests