Hello,
Im trying to upgrade my extension from opencart 3 to opencart 4.
Let's say I have this directory structure:
module_name/admin/view/image/my.png
How can I access this image?
I am trying to display it in a twig file.
In opencart 3 it could access it at {admin_url}/view/image/my.png
This does not seem to work in oc 4.
I looked at the example modules but none of them show an example for this....
Please help,
Thanks in advance =)!
Hi!
Try to use path like this:
Try to use path like this:
Code: Select all
$this->document->addStyle('/extension/menu_manager/admin/view/javascript/menu_manager.css?v=' . $this->_version);
$this->document->addScript('/extension/menu_manager/admin/view/javascript/menu_manager.js?v=' . $this->_version);
My FREE extensions in marketplace. [ security | flexibility | speedup ]
Thank you, this works!halfhope wrote: ↑Wed Aug 07, 2024 4:26 amHi!
Try to use path like this:Code: Select all
$this->document->addStyle('/extension/menu_manager/admin/view/javascript/menu_manager.css?v=' . $this->_version); $this->document->addScript('/extension/menu_manager/admin/view/javascript/menu_manager.js?v=' . $this->_version);
Who is online
Users browsing this forum: No registered users and 3 guests