hata on line 1915

ada11

OpenCart-TR
Katılım
16 Ocak 2014
Mesajlar
1
Tepkime puanı
0
Puanları
0
Merhaba, sipariş admin paneline düştükten sonra "Göster" e basınca aşığıdaki gibi bir hata veriyor. bir çözümü varmı acaba .

Fatal error: Call to undefined method ControllerSaleOrder::hasAction() in /home/public_html/admin/controller/sale/order.php on line 1915
 

bakitaro

OpenCart-TR
Katılım
17 Haz 2013
Mesajlar
36
Tepkime puanı
0
Puanları
0
Yaş
42
Web sitesi
opencartfx.com
Genelde 1.5.6 versiyonlarda oluşan bir sorun...system\engine\controller.php dosyasında aşağıdaki değişiklikleri yaparsanız sorun büyük ihtimalle çözülecektir. Dosyanın yedeğini almayı unutmayın.

Aşağıdaki kodları bulun:
PHP:
protected function getChild($child, $args = array()) {
                              $action = new Action($child, $args);
                           
                              if (file_exists($action->getFile())) {
                                 require_once($action->getFile());

                                 $class = $action->getClass();

                                 $controller = new $class($this->registry);

                                 if (substr($child, 0, 6) == 'module' && isset($args['position'])) { 
                                        $controller->data['module_position']  = $args['position'];
                                    }
                                 
                                 $controller->{$action->getMethod()}($action->getArgs());
                                 
                                 return $controller->output;
                              } else {
                                 trigger_error('Error: Could not load controller ' . $child . '!');
                                 exit();               
                              }

Bu kodlar ile değiştirin.
PHP:
protected function getChild($child, $args = array()) {
                           $action = new Action($child, $args);
                        
                           if (file_exists($action->getFile())) {
                              require_once($action->getFile());

                              $class = $action->getClass();

                              $controller = new $class($this->registry);

                              $controller->{$action->getMethod()}($action->getArgs());
                              
                              return $controller->output;
                           } else {
                              trigger_error('Error: Could not load controller ' . $child . '!');
                              exit();               
                           }      
                        }
                        
                        protected function hasAction($child, $args = array()) {
                           $action = new Action($child, $args);
                        
                           if (file_exists($action->getFile())) {
                              require_once($action->getFile());

                              $class = $action->getClass();

                              $controller = new $class($this->registry);

                              if(method_exists($controller, $action->getMethod())){
                                 return true;
                              }else{
                                 return false;
                              }
                           } else {
                              return false;            
                           }      
                        }
 

mastike

OpenCart-TR
Katılım
25 Kas 2010
Mesajlar
8
Tepkime puanı
0
Puanları
0
Merhaba kod 1,5,6 da çalışmıyor hocam hata veriyor.
 
Üst