Opencart 2.3 Notice: Undefined property: Proxy:: function_name

17.1k Views Asked by At

I am working on Opencart 2.3, I have installed a new extension into the system and since then I am getting an error in the product description page in the front end:

Undefined property: Proxy:: function_name**

The uploaded extension is in the admin section, the product description page was working fine before installing the new extension.

Note: The extension has vqmod file and modification folder has the files related to the extension.

2

There are 2 best solutions below

0
On BEST ANSWER

I had this. My problem was the path to my extension was

extension\module\name_here

but since I just upgraded it from 1.5.6, which just had module\name_here. I forgot to change the class name to match the new path.

class Model**Extension**Modulename_here extends Model {

Extension word was missing. The error is really obscure, and only upon finding it on github did it make sense what my mistake was.

0
On

I had faced this issue in the Live Server. But the thing is I had loaded the module and called it correctly. But still, it didn't do any favor for me.

$this->load->model('catalog/product');
$this->model_catalog_product->addmyproducts($myproducts);

class Model**Extension**Modulename_here extends Model {

The solution to getting around this problem was to figure out
How does the Architecture in OpenCart Framework works?
Follow the below solution:

  • Find under the Opencart directory for /system/storage/modification/admin.
    Here you'll be able to see the MVC directory
  • Under the modification folder, you'll find all the codes written on to it
  • You need to identify the calling part of the module in the model that has been defined or not?
  • After identifying you'll come to see that function definition will not exist that's the reason!
  • Further if you define the same function under the directory /system/storage/modification/admin/.../...you'll never see Undefined property: Proxy::module_name

Update

Irrespective of the functions defined, if there are two functions with the same name called twice under a single file raises ambiguity in vqmod module

For Eg. Calling method getWarehouseDetails() if it lies under index() & another one in warehousedetails() in a single file with two different calls with two different file names while loading $this->load->model(../..); you'll get

Notice: Undefined property: Proxy::getWarehouseDetails in /var/www/html/bluemb/vqmod/vqcache/vq2system_storage_modification_system_engine_action.php on line 51

In the below eg. getWarehouseDetails() called in index() & another one in warehousedetails()

$this->load->model('tool/upload');
$warehouse_details = $this->model_tool_upload->getWarehouseDetails($seller_id);

$this->load->model('catalog/information');
$this->data['warehouse_details'] = $this->model_catalog_information->getWarehouseDetails($seller['seller_id']);