Jump to content

Edit History

skinnybloke

skinnybloke


Issue solved

I have a problem with a payment module on the order confirmation page with Prestashop v9.0. The following error is displayed:

Fatal error: Uncaught Error: Call to undefined method Tools::displayPrice() in /home/testsites/testnewversion/modules/opayo/opayo.php:519 Stack trace: #0 /home/testsites/testnewversion/classes/Hook.php(1251): Opayo->hookPaymentReturn(Array) #1 /home/testsites/testnewversion/classes/Hook.php(462): HookCore::coreCallHook(Object(Opayo), 'hookPaymentRetu...', Array) #2 /home/testsites/testnewversion/classes/Hook.php(1143): HookCore::callHookOn(Object(Opayo), 'paymentReturn', Array) #3 /home/testsites/testnewversion/controllers/front/OrderConfirmationController.php(255): HookCore::exec('displayPaymentR...', Array, 130) #4 /home/testsites/testnewversion/controllers/front/OrderConfirmationController.php(232): OrderConfirmationControllerCore->displayPaymentReturn(Object(Order)) #5 /home/testsites/testnewversion/classes/controller/Controller.php(330): OrderConfirmationControllerCore->initContent() #6 /home/testsites/testnewversion/classes/Dispatcher.php(487): ControllerCore->run() #7 /home/testsites/testnewversion/index.php(78): DispatcherCore->dispatch() #8 {main} thrown in /home/testsites/testnewversion/modules/opayo/opayo.php on line 519

The order is processed, the payment is taken and order confirmation emails are sent. THe probelm is just in the display of this page.

I can't find where I bought this module from. The module is 'Opayo (Formerly Sagepay) v4.0.0 - by Nethues Technology Pvt Ltd'

The problem code is:

 if ($this->ps_below_7) {
            $total_to_pay = Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false);
            $order = $params['objOrder'];
        } else {
            $total_to_pay = Tools::displayPrice(
                $params['order']->getOrdersTotalPaid(),
                new Currency($params['order']->id_currency),
                false
            );
            $order = $params['order'];
        }

 

Tools::displayPrice() has been deprecated in v9.0

Is there a simple workaround to this?

skinnybloke

skinnybloke


Additional information

I have a problem with a payment module on the order confirmation page with Prestashop v9.0. The following error is displayed:

Fatal error: Uncaught Error: Call to undefined method Tools::displayPrice() in /home/testsites/testnewversion/modules/opayo/opayo.php:519 Stack trace: #0 /home/testsites/testnewversion/classes/Hook.php(1251): Opayo->hookPaymentReturn(Array) #1 /home/testsites/testnewversion/classes/Hook.php(462): HookCore::coreCallHook(Object(Opayo), 'hookPaymentRetu...', Array) #2 /home/testsites/testnewversion/classes/Hook.php(1143): HookCore::callHookOn(Object(Opayo), 'paymentReturn', Array) #3 /home/testsites/testnewversion/controllers/front/OrderConfirmationController.php(255): HookCore::exec('displayPaymentR...', Array, 130) #4 /home/testsites/testnewversion/controllers/front/OrderConfirmationController.php(232): OrderConfirmationControllerCore->displayPaymentReturn(Object(Order)) #5 /home/testsites/testnewversion/classes/controller/Controller.php(330): OrderConfirmationControllerCore->initContent() #6 /home/testsites/testnewversion/classes/Dispatcher.php(487): ControllerCore->run() #7 /home/testsites/testnewversion/index.php(78): DispatcherCore->dispatch() #8 {main} thrown in /home/testsites/testnewversion/modules/opayo/opayo.php on line 519

The order is processed, the payment is taken and order confirmation emails are sent. THe probelm is just in the display of this page.

I can't find where I bought this module from. The module is 'Opayo (Formerly Sagepay) v4.0.0 - by Nethues Technology Pvt Ltd'

The problem code is:

 if ($this->ps_below_7) {
            $total_to_pay = Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false);
            $order = $params['objOrder'];
        } else {
            $total_to_pay = Tools::displayPrice(
                $params['order']->getOrdersTotalPaid(),
                new Currency($params['order']->id_currency),
                false
            );
            $order = $params['order'];
        }

 

Tools::displayPrice() has been deprecated in v9.0

Is there a simple workaround to this?

skinnybloke

skinnybloke

I have a problem with a payment module on the order confirmation page with Prestashop v9.0. The following error is displayed:

Fatal error: Uncaught Error: Call to undefined method Tools::displayPrice() in /home/testsites/testnewversion/modules/opayo/opayo.php:519 Stack trace: #0 /home/testsites/testnewversion/classes/Hook.php(1251): Opayo->hookPaymentReturn(Array) #1 /home/testsites/testnewversion/classes/Hook.php(462): HookCore::coreCallHook(Object(Opayo), 'hookPaymentRetu...', Array) #2 /home/testsites/testnewversion/classes/Hook.php(1143): HookCore::callHookOn(Object(Opayo), 'paymentReturn', Array) #3 /home/testsites/testnewversion/controllers/front/OrderConfirmationController.php(255): HookCore::exec('displayPaymentR...', Array, 130) #4 /home/testsites/testnewversion/controllers/front/OrderConfirmationController.php(232): OrderConfirmationControllerCore->displayPaymentReturn(Object(Order)) #5 /home/testsites/testnewversion/classes/controller/Controller.php(330): OrderConfirmationControllerCore->initContent() #6 /home/testsites/testnewversion/classes/Dispatcher.php(487): ControllerCore->run() #7 /home/testsites/testnewversion/index.php(78): DispatcherCore->dispatch() #8 {main} thrown in /home/testsites/testnewversion/modules/opayo/opayo.php on line 519

I can't find where I bought this module from. The module is 'Opayo (Formerly Sagepay) v4.0.0 - by Nethues Technology Pvt Ltd'

The problem code is:

 if ($this->ps_below_7) {
            $total_to_pay = Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false);
            $order = $params['objOrder'];
        } else {
            $total_to_pay = Tools::displayPrice(
                $params['order']->getOrdersTotalPaid(),
                new Currency($params['order']->id_currency),
                false
            );
            $order = $params['order'];
        }

 

Tools::displayPrice() has been deprecated in v9.0

Is there a simple workaround to this?

×
×
  • Create New...