#15671·opencart

[4.1.0.4] OCmod fix for models gives an error

Author: nmpetkovCreated Aug 30, 2026Updated Aug 30, 2026

Opencart 4.1.0.4 comes with a fix for the bug in OCmod's handling of modifications in controllers and models (it worked in View before). My tests showed that the problem with controllers is fixed. However, an error occurs if you make a modification in a model file. It is:

Fatal error: Cannot declare class Opencart\Admin\Model\Catalog\Information, because the name is already in use in .../extension/ocmod/admin/model/catalog/information.php on line 10

I did the test on a brand new installation of Opencart 4.1.0.4 and only one modification. I repeated the modification with different models and the error always appears. Analysis of the error shows that the file was actually included initially from the correct location, namely:

... /extension/ocmod/...

but then the error occurs because it is re-included from the original (unmodified) location and the class definition is duplicated.