4

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.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mike
  • 61
  • 2
  • 3
  • 9
  • You should add your code or at least name the extension if it is publicly available. However, if this question is not about *your* code, consider migrating it to [ServerFault @ SE](http://serverfault.com). – Anton Samsonov Dec 28 '16 at 10:07
  • the name of the extension is booking and reservation, the extension is a paid one. – Mike Dec 28 '16 at 10:17
  • @Mike Your issue is fixed or not? How you fixed it? I am getting this Notice: Undefined property: Proxy::getTemplate vqmod/vqcache/vq2-catalog_model_checkout_order.php on line 660 Can you please guide me to fix this :) – Sandeep Pattanaik Mar 09 '17 at 08:07

2 Answers2

7

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.

adudley
  • 902
  • 10
  • 24
0

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']);
Nɪsʜᴀɴᴛʜ ॐ
  • 2,756
  • 4
  • 33
  • 57