first commit

This commit is contained in:
sujan
2024-08-06 18:06:00 +05:45
commit a2fa49071a
2745 changed files with 391199 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?php
namespace Opencart\Catalog\Controller\Extension\OcThemeExample\Startup;
class ThemeExample extends \Opencart\System\Engine\Controller {
public function index(): void {
if ($this->config->get('config_theme') == 'theme_example' && $this->config->get('theme_theme_example_status')) {
// Add event via code instead of DB
// Could also just set view/common/header/before
$this->event->register('view/*/before', new \Opencart\System\Engine\Action('extension/oc_theme_example/startup/theme_example.event'));
}
}
public function event(string &$route, array &$args, mixed &$output): void {
$override = ['common/header'];
if (in_array($route, $override)) {
$route = 'extension/oc_theme_example/' . $route;
}
}
}

View File

@ -0,0 +1 @@
test header