User Feedback
FlexiOcmodSort - OCMOD Execution Order Manager
What the Module Does
Adds a Sort Order column to the Extensions → Modifications page with inline editing capability. The sort order value affects the actual execution order of OCMOD modifications when the Refresh button is clicked.
How OCMOD Execution Order Works (Default Behavior)
First - the file system/modification.xml (built into OpenCart)
Then - files system/*.ocmod.xml (alphabetically by filename)
Last - records from the oc_modification table (alphabetically by the name field)
The order described in step 3 is not controlled by standard OpenCart tools. This module solves that problem.
How the Module Works
-
Creates a separate table
oc_modification_sort_order(does not modify theoc_modificationtable) -
During modification cache refresh - database results are sorted by
sort_order(ascending), and by name when values are equal -
Default value = 0 (all modifications have equal priority)
-
Negative values - execute earlier
-
Higher values - execute later
Installation
-
Upload
flexi_ocmod_sort_x.x.x.ocmod.zipvia Extensions → Installer -
Go to Extensions → Modifications and click Refresh (blue button)
-
Go to Extensions → Modules, find FlexiOcmodSort, and click Install (green + button)
-
Refresh the theme cache (gear icon on the dashboard)
Important: Step 3 creates the database table. Without it, the Sort Order column will be displayed but values will not be saved.
Usage
-
Go to Extensions → Modifications
-
A new Sort Order column will appear next to the actions column
-
Change a value in the field - it is saved automatically (AJAX, debounce 500ms)
-
Green highlight = saved, red = error
-
After configuring the order, click Refresh to rebuild the modification cache
-
Use Enter to navigate between fields
Technical Details
-
Does not modify the
oc_modificationtable - uses a separate table -
Does not modify
model/setting/modification.php- avoids the Cannot redeclare class issue -
Sorting is implemented via
usort()in the controller after retrieving data from the model -
Compatibility: OpenCart 3.0.x (tested on 3.0.3.x Maintenance)
-
Requirements: PHP 7.0+ / 8.0+
Compatibility with Other Modules
The module uses OCMOD to modify the controller and template of the modifications page. If you already have extensions installed that modify the same page (for example, OCMOD Editor, OCMOD Downloader), conflicts may occur.
Характеристики
-
1
-
Recently Browsing 0 members
- No registered users viewing this page.