Search code examples
phptemplatesopencartvqmod

Error in path to OneAll registration template, VQmode,OpenCart 2.2


I'm new to Opencart and CMS development. After I've installed VQmod and OneAll social plugin to my Opencart 2.2.0.0, I've got this error when trying to checkout or register as new customer.

Notice: Error: Could not load template 
.../htdocs/catalog/view/theme/default/template/default/template/module/oneall.tpl! 
in .../htdocs/vqmod/vqcache/vq2-system_library_template_basic.php on line 26

First of all, that template file is on its place, where it MUST be: in .../htdocs/catalog/view/theme/default/template/module/oneall.tpl, but why Opencart expects it to be in catalog/view/theme/default/template/default/template/module/oneall.tpl?

It looks like VQmod or something else just doubles path to the file: default/template is written twice!

Ok, I go to that .php file and see this:

public function render($template) {
    $file = DIR_TEMPLATE . $template;

    if (file_exists($file)) {
        extract($this->data);

        ob_start();

        require(\VQMod::modCheck($file));

        $output = ob_get_contents();

        ob_end_clean();

        return $output;
    } else {
        trigger_error('Error: Could not load template ' . $file . '!');
        exit();
    }
}

So, it just throws an error with filename, contained in that $file variable.

My question is: what should I do with that $file? If anyone has had such errors, help please!


Solution

  • This error has been fixed in the last version of the plugin: http://www.opencart.com/index.php?route=extension/extension/info&extension_id=24825