I am using OpenCart and installed the module sizes.xml, it edits the catalog/product/model/catalog/product.php file

It adds a class method;

I have an issue with some code where in a function I have:

```
class ModelCatalogProduct extends Model {

    public function getSizes($product_id) { 
      ...
    } // end function

} // end class

```

We always get an error saying that we cannot redeclare getSizes method.

I want to either force redeclaration, or alternatively check whether the function exists before calling the method but I cannot use function\_exists in a class.

ie, this seems illegal;

```
class ModelCatalogProduct extends Model {

    // This throws up an error
    if (function_exists('getSizes')==FALSE) {
       public function getSizes($product_id) {
       } // end function
    }// end if

} // end class

```

It will throw up an error issue. But I need the function in there.

I would like to use function\_exists in this class or alternatively force the method to be redeclared.

How would I make function\_exists work inside a class?