Opencart
Filerobot Opencart plugin
The Filerobot Plugin is an extension which adds Asset Management to Opencart.
There are 3 simple steps for enabling the Filerobot plugin on your Opencart admin:
- Install the Filerobot module for Opencart;
- Add your security configuration parameters to access your Filerobot library.
Currently, the plugin supports the default WYSIWYG editor from Opencart - Summernote, but the native "Image resize" function is disabled. You can change the image size by removing the previous one then add it with new dimensions (a dedicated function will be added in the next version).
- Upload the
admin
folder inupload/admin
to your Opencart source code. - Login to the Admin Dashboard, navigate to Extensions/Installers and upload the
scaleflex_filerobot.ocmod.zip
file. Then, go to Modification and click Reload to update the installer.
Navigate to Extensions/Extensions, choose Modules from the drop-down menu, select Filerobot and update all configurations.
- Filerobot Token: Your Filerobot token from the Asset Hub interface;
- Security Template Identifier: Security template ID, found in the Developers top menu;
- Filerobot upload directory: This is the top storage folder for your assets.Please create the folder in Filerobot first to prevent error.

You need to enable the extension in order to use Filerobot in all pages.
With Summernote:

With Image field:

If you are on Summernote: You can select multiple images for insertion.
If you are in an Image Field: You should select only one. If you selected multiple items, it will use the last one, as Opencart's Image Field inserts only one image at a time.

This extension is 100% compatible with the default theme.
If you use another theme (stock or custom), you should verify that the image is indeed from Filerobot before returning data to the view. An examples for banners would be:
foreach ($banner_images as $key => $value) {
foreach ($value as $banner_image) {
if (strpos($banner_image['image'], 'filerobot')) { // Check if image URL contain "filerobot"
$data['banner_images'][$key][] = array(
'title' => $banner_image['title'],
'link' => $banner_image['link'],
'image' => $banner_image['image'],
'thumb' => $banner_image['image'] . '&width=100&height=100', // return with dimensions
'sort_order' => $banner_image['sort_order']
);
} else {
if (is_file(DIR_IMAGE . $banner_image['image'])) {
$image = $banner_image['image'];
$thumb = $banner_image['image'];
} else {
$image = '';
$thumb = 'no_image.png';
}
$data['banner_images'][$key][] = array(
'title' => $banner_image['title'],
'link' => $banner_image['link'],
'image' => $image,
'thumb' => $this->model_tool_image->resize($thumb, 100, 100),
'sort_order' => $banner_image['sort_order']
);
}
}
Last modified 1mo ago