Comments on: How to develop an Opencart 4 custom theme? OpenCart 4 theme development tutorial https://webocreation.com/how-to-develop-opencart-4-custom-theme-opencart-4-theme-development-tutorial/ Opencart tips and tricks, OpenCart programmer Wed, 24 Jan 2024 16:09:59 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: Jomarie Janer https://webocreation.com/how-to-develop-opencart-4-custom-theme-opencart-4-theme-development-tutorial/#comment-77584 Thu, 23 Nov 2023 13:49:18 +0000 https://webocreation.com/blog/?p=9884#comment-77584 I am using OC4.0.2.3
I downloaded the theme and installed, enabled the theme but it doesn’t override the default header. Any idea to resolve this issue?

]]>
By: Martin https://webocreation.com/how-to-develop-opencart-4-custom-theme-opencart-4-theme-development-tutorial/#comment-76528 Mon, 16 Oct 2023 10:30:31 +0000 https://webocreation.com/blog/?p=9884#comment-76528 I was trying to change admin footer and add a widget there, but failed to overwrite it with new footer. The version is v4.0.2.1. Code like this:

config->get(‘module_widget_status’)){
$this->event->register(‘view/*/before’, new \Opencart\System\Engine\Action(‘/extension/vendor_name/startup/widget.event’));
}
}

public function event(string &$route, array &$args, mixed &$output): void
{
$override = [
‘common/footer’,
];

if(in_array($route, $override)){
$route = ‘extension/vendor_name/’ . $route;
}
}

]]>
By: Roman https://webocreation.com/how-to-develop-opencart-4-custom-theme-opencart-4-theme-development-tutorial/#comment-73756 Thu, 03 Aug 2023 08:25:22 +0000 https://webocreation.com/blog/?p=9884#comment-73756 founded OpenCart Version 4.0.2.2
$this->event->register(‘view/*/before’, new \Opencart\System\Engine\Action(‘extension/webocreation4/startup/theme_standard|event’));
change “| “to “.”, now working
$this->event->register(‘view/*/before’, new \Opencart\System\Engine\Action(‘extension/webocreation4/startup/theme_standard.event’));

]]>
By: Roman https://webocreation.com/how-to-develop-opencart-4-custom-theme-opencart-4-theme-development-tutorial/#comment-73755 Thu, 03 Aug 2023 08:15:43 +0000 https://webocreation.com/blog/?p=9884#comment-73755 Lastest OpenCart Version 4.0.2.2
header.twig – code not overwrites default theme template, but looks like event added in admin panel.

]]>
By: J Raj https://webocreation.com/how-to-develop-opencart-4-custom-theme-opencart-4-theme-development-tutorial/#comment-65357 Tue, 18 Oct 2022 06:17:31 +0000 https://webocreation.com/blog/?p=9884#comment-65357 Hello Rupak,

I want to Overwrite Controller like
namespace Opencart\Catalog\Controller\Common;
class Header extends \Opencart\System\Engine\Controller {
To
namespace Opencart\Catalog\Controller\Extension\new_theme\Common;
class Header extends \Opencart\System\Engine\Controller {

How way we can do this?

Please help me

Thank you

]]>