v1.0.8.2
MySQL 10.3.28-MariaDB
PHP Version: 7.4.16 (Zend 3.4.0)
I am trying to install the discount code and I get Blank Screen (HTTP ERROR 500) when try to install it
Code: Select all
This page isn’t working www.XXXX.fi is currently unable to handle this request.
HTTP ERROR 500
and here is the error on the log file
Code: Select all
[02-May-2021 14:24:25 Europe/Helsinki] PHP Notice: Undefined variable: db in /home/xxxx/public_html/test/includes/modules/order_total/ot_discount.php on line 424
[02-May-2021 14:24:25 Europe/Helsinki] PHP Fatal error: Uncaught Error: Call to a member function query() on null in /home/xxxx/public_html/test/includes/modules/order_total/ot_discount.php:424
Stack trace:
#0 /home/xxxx/public_html/test/kirje2/modules.php(84): ot_discount->install()
#1 {main}
thrown in /home/xxxx/public_html/test/includes/modules/order_total/ot_discount.php on line 424
Code: Select all
function install($parameter_key = null) {
parent::install($parameter_key);
// CREATE NEEDED TABLES INTO DB
$db->query("
CREATE TABLE IF NOT EXISTS customers_to_discount_codes (
customers_id int(11) NOT NULL default '0',
discount_codes_id int(11) NOT NULL default '0',
KEY customers_id (customers_id),
KEY discount_codes_id (discount_codes_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
");
Br
Omar