Forums / All Other Contributions/Addons / Products Filters, anybody using this plugin with 157?

Products Filters, anybody using this plugin with 157?

Views: 523

Results 1 to 4 of 4
10 May 2021, 7:26 PM
#1
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Products Filters, anybody using this plugin with 157?

I am using 157, responsive classic, PHP7.4

It says it OK for 155.
Zen Cart v1.5.5 is compatible with PHP 7.1 so I have hopes for 157.

I have an sql failure when I run the sql install on my xampp test site.

--> PHP Fatal error: 1067:Invalid default value for 'last_modified' :: CREATE TABLE IF NOT EXISTS addon_filters ( filter_id int(11) unsigned NOT NULL AUTO_INCREMENT, filter_name varchar(128) NOT NULL, active tinyint(1) NOT NULL DEFAULT '1', sort_order int(11) NOT NULL DEFAULT '0', created_by int(11) NOT NULL, created_on timestamp NOT NULL, modified_by int(11) NOT NULL, last_modified timestamp NOT NULL, PRIMARY KEY (filter_id) ); ==> (as called by) C:\xampp73a\htdocs\Zencart157b\catalog\"Admin"\sqlpatch.php on line 291 <== in C:\xampp73a\htdocs\Zencart157b\catalog\includes\classes\db\mysql\query_factory.php on line 170.

I am surprised the sql install worked for other people as the first sql line is

--DELETE ANY PREVIOUS INSTALATION

and the book says
" MYSQL; the -- (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on). This syntax differs slightly from standard SQL comment syntax."
I did fix this -- but still have the error.

10 May 2021, 7:38 PM
#2
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Products Filters, anybody using this plugin with 157?

marton_1:

I am using 157, responsive classic, PHP7.4

It says it OK for 155.
Zen Cart v1.5.5 is compatible with PHP 7.1 so I have hopes for 157.

I have an sql failure when I run the sql install on my xampp test site.

--> PHP Fatal error: 1067:Invalid default value for 'last_modified' :: CREATE TABLE IF NOT EXISTS addon_filters ( filter_id int(11) unsigned NOT NULL AUTO_INCREMENT, filter_name varchar(128) NOT NULL, active tinyint(1) NOT NULL DEFAULT '1', sort_order int(11) NOT NULL DEFAULT '0', created_by int(11) NOT NULL, created_on timestamp NOT NULL, modified_by int(11) NOT NULL, last_modified timestamp NOT NULL, PRIMARY KEY (filter_id) ); ==> (as called by) C:\xampp73a\htdocs\Zencart157b\catalog"Admin"\sqlpatch.php on line 291 <== in C:\xampp73a\htdocs\Zencart157b\catalog\includes\classes\db\mysql\query_factory.php on line 170.

> 
> I am surprised the sql install worked for other people as the first sql line is 
> ```
--DELETE ANY PREVIOUS INSTALATION

and the book says
" MYSQL; the -- (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on). This syntax differs slightly from standard SQL comment syntax."
I did fix this -- but still have the error.

this plugin is here https://www.zen-cart.com/downloads.php?do=file&id=2177

10 May 2021, 10:28 PM
#3
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Products Filters, anybody using this plugin with 157?

marton,
you can try changing the create table command as so:

CREATE TABLE IF NOT EXISTS addon_filters ( filter_id int(11) unsigned NOT NULL AUTO_INCREMENT, filter_name varchar(128) NOT NULL, active tinyint(1) NOT NULL DEFAULT '1', sort_order int(11) NOT NULL DEFAULT '0', created_by int(11) NOT NULL, created_on timestamp NOT NULL default CURRENT_TIMESTAMP, modified_by int(11) NOT NULL, last_modified timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (filter_id) );

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

11 May 2021, 6:33 AM
#4
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Products Filters, anybody using this plugin with 157?

carlwhat:

marton,
you can try changing the create table command as so:

CREATE TABLE IF NOT EXISTS addon_filters ( filter_id int(11) unsigned NOT NULL AUTO_INCREMENT, filter_name varchar(128) NOT NULL, active tinyint(1) NOT NULL DEFAULT '1', sort_order int(11) NOT NULL DEFAULT '0', created_by int(11) NOT NULL, created_on timestamp NOT NULL default CURRENT_TIMESTAMP, modified_by int(11) NOT NULL, last_modified timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (filter_id) );

> 
> best.

Many thanks that fixed the error, there was another table with the same issue that I fixed, and the SQL now completes.
Great!