Reputation: 119
I have a controller (sale/order.php) with a function generateOrder(). In my another controller (settings.php), I need to call/execute generateOrder() function in sale/order.php controller. How is it possible? Thanks in advance.
I tried:
$ordercontroller = $this->load->controller('sale/order');
$this->ordercontroller->generateOrder();
Upvotes: 1
Views: 3042
Reputation: 273
to call a function from sale/order.php use
$this->load->controller("sale/order/generateOrder");
Upvotes: 3