Post by mijomedia » Sun May 17, 2015 5:36 pm

I have installed an extension called "Extra positions max 50" on my OpenCart installation, it works fine right away. But when I do put the store to maintenance mode i get this error message:
Fatal error: Call to a member function getModule() on a non-object in /www/webvol6/am/a65lzzhbhu9jtfo/my_site/public_html/catalog/controller/common/column_header.php on line 51
This can also sometimes be even when I click on any modal popup on the store. I have been searching for an answer everywhere but can't get a solution. I've also asked the extension developer for help but they also doesn't seems to have a solution for this.

This error does also come up even if I make my own positions. I've made some positions that is IDENTICALLY of the built in ones on OpenCart (content_top) etc. But still get the same error.

Code from the affected file:

Code: Select all

<?php  class ControllerCommonColumnHeader extends Controller {
public function index() {
    $this->load->model('design/layout');
    $this->load->model('catalog/category');
    $this->load->model('catalog/product');
    $this->load->model('catalog/information');

    if (isset($this->request->get['route'])) {
        $route = (string)$this->request->get['route'];
    } else {
        $route = 'common/home';
    }

    $layout_id = 0;

    if ($route == 'product/category' && isset($this->request->get['path'])) {
        $path = explode('_', (string)$this->request->get['path']);

        $layout_id = $this->model_catalog_category->getCategoryLayoutId(end($path));            
    }

    if ($route == 'product/product' && isset($this->request->get['product_id'])) {
        $layout_id = $this->model_catalog_product->getProductLayoutId($this->request->get['product_id']);
    }

    if ($route == 'information/information' && isset($this->request->get['information_id'])) {
        $layout_id = $this->model_catalog_information->getInformationLayoutId($this->request->get['information_id']);
    }

    if (!$layout_id) {
        $layout_id = $this->model_design_layout->getLayout($route);
    }

    if (!$layout_id) {
        $layout_id = $this->config->get('config_layout_id');
    }

    $data['modules'] = array();

    $modules = $this->model_design_layout->getLayoutModules($layout_id, 'column_header');

    foreach ($modules as $module) {
        $part = explode('.', $module['code']);

        if (isset($part[0]) && $this->config->get($part[0] . '_status')) {
            $data['modules'][] = $this->load->controller('module/' . $part[0]);
        }

        if (isset($part[1])) {
            $setting_info = $this->model_extension_module->getModule($part[1]);

            if ($setting_info && $setting_info['status']) {
                $data['modules'][] = $this->load->controller('module/' . $part[0], $setting_info);
            }
        }
    }

    if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/column_header.tpl')) {
        return $this->load->view($this->config->get('config_template') . '/template/common/column_header.tpl', $data);
    } else {
        return $this->load->view('default/template/common/column_header.tpl', $data);
    }
}
} ?>
I have been trying to get the files other permissions and i tried to put
if (isset($part[1])) {
$setting_info = $this->model_extension_module->getModule($part[1], true);
On line 51 but no luck. Please help me out here. What am i doing wrong?

Webbutveckling, Sökmotoroptimering, E-handel, Mobilskal, Tillbehör för surfplattor och tillbehör för mobiler


User avatar
New member

Posts

Joined
Fri May 17, 2013 7:54 am

Post by scizers » Thu Jun 11, 2015 1:24 pm

Hi,
this is problem in OpenCart.


how to fix it:
Path :/catalog/controller/common/headertop.php

Add on the line 41:
$this->load->model('extension/module');

Newbie

Posts

Joined
Fri Sep 05, 2014 6:39 pm
Who is online

Users browsing this forum: paulfeakins and 461 guests