craigchristenson / prestashop-2checkout-api

PrestaShop payment module for 2Checkout Payment API
MIT License
10 stars 16 forks source link

Syntax error #11

Open Makatser opened 2 years ago

Makatser commented 2 years ago

Hello!

I'm trying install the module but Prestashop return error:

" [PrestaShop] Fatal error in module file :/home/gymvisua/public_html/modules/twocheckout/twocheckout.php: syntax error, unexpected '?'

twocheckout (parse error in /modules/twocheckout/twocheckout.php) twocheckout (class missing in /modules/twocheckout/twocheckout.php) "

And the module isn't shown in the modules list. (Prestashop 1.6.1.7, PHP 5.6)

The problem with code of twocheckout.php: $order = $params['order'] ?? null; $cart = $params['cart'] ?? null; $this->smarty->assign( [ 'order' => $order, 'cart' => $cart ] ); Please help

minhhoang0707 commented 2 weeks ago

Hello!

I'm trying install the module but Prestashop return error:

"

[PrestaShop] Fatal error in module file :/home/gymvisua/public_html/modules/twocheckout/twocheckout.php:

syntax error, unexpected '?'

twocheckout (parse error in /modules/twocheckout/twocheckout.php)

twocheckout (class missing in /modules/twocheckout/twocheckout.php)

"

And the module isn't shown in the modules list.

(Prestashop 1.6.1.7, PHP 5.6)

The problem with code of twocheckout.php:

$order = $params['order'] ?? null;

$cart = $params['cart'] ?? null;

$this->smarty->assign( [ 'order' => $order, 'cart' => $cart ] );

Please help