Post by chulcha » Tue Jan 17, 2017 6:48 pm

2.1
index.php

Code: Select all

$query = $db->query("SELECT * FROM " . DB_PREFIX . "event");

foreach ($query->rows as $result) {
	$event->register($result['trigger'], $result['action']);
}
2.3
system/framework.php

Code: Select all

// Event Register
if ($config->has('action_event')) {
	foreach ($config->get('action_event') as $key => $value) {
		$event->register($key, new Action($value));
	}
}
Only those events that are described in config

Where or When to register events that are added through

Code: Select all

$this->model_extension_event->addEvent('my_theme', 'catalog/controller/catalog/product/before', 'my_theme/product');
https://github.com/opencart/opencart/wi ... s)-2.2.x.x

Active Member

Posts

Joined
Fri Jul 18, 2014 4:39 pm

Post by JNeuhoff » Wed Jan 18, 2017 4:29 am

The only 2 places I can think of are:

1) In the install.php, which is part of an .ocmod.zip extension installed via OpenCart's extension installer.

2) Or you could create a dummy module, e.g.

admin/controller/extension/module/mytheme.php

which has an install method.

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 10 guests