Recently viewed products

Error if Addon is used on Shopping cart page with Clear Cart - Recently viewed products

Error if Addon is used on Shopping cart page with Clear Cart

by zeeshop » Fri Jan 07, 2022 6:11 pm

Hi @raiwa

My Server details:

Installed Version: CE Phoenix v1.0.8.9

Server OS Linux 4.4.284-icpu-077
Database MySQL 5.7.36-log
HTTP Server Apache
PHP Version 7.4.25 (Zend 3.4.0)

Getting an error after uploading to the latest revision as below:
Shopping_cartphp.JPG

Code: Select all

Fatal error: DB: [1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.products_id IN (6792,6228,1574,6210,16,1717,6268,1528) AND pd.la' at line 11 from 
Thanks
zeeshop
Posts: 78
Joined: Sun Jan 10, 2021 11:30 pm
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by raiwa » Fri Jan 07, 2022 6:21 pm

Do you have other recently viewed modules installed and are they working error free? Please try the other shopping cart module and report back.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by zeeshop » Fri Jan 07, 2022 6:47 pm

I think it may be nothing to do with this addon, but now don't know which addon it may be as I installed/ updated a few addons recently.
Don't think I have installed any shopping cart addon recently other than Clear cart and recently viewed one.
This error is coming whenever I am removing the last single product from the cart (not by clear cart):


Fatal error: DB: [1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.products_id IN (6280,7822) AND pd.language_id = 1 ORDER BY F' at line 11 from

can you suggest any solution for above?
Thanks
zeeshop
Posts: 78
Joined: Sun Jan 10, 2021 11:30 pm
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by zeeshop » Fri Jan 07, 2022 7:02 pm

I tried different things.
If a Recently viewed product is installed on the Shopping Cart page, every time I try to clear the cart does not matter which method i.e using the clear cart button or manually removing products, I get a fatal error:

==
Fatal error: DB: [1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.products_id IN (6280,7822) AND pd.language_id = 1 ORDER BY F' at line 11 from
==

However, when I remove "Recently viewed products" from the Shopping cart page, then all works fine, no error, and am able to remove the product using the clear cart button and manually too.

So seems like the problem is with this addon installed on the Shopping cart page.
Hope you will be able to find some solution.
Thanks
Last edited by zeeshop on Fri Jan 07, 2022 7:03 pm
zeeshop
Posts: 78
Joined: Sun Jan 10, 2021 11:30 pm
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by raiwa » Fri Jan 07, 2022 7:43 pm

O.K. I could reproduce the error on a server test installation with MySQL 5.7.32-35-log. On my local test store I use Maria db.
So I'll research tomorrow to find a fix.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by zeeshop » Fri Jan 07, 2022 7:45 pm

Thanks, appreciated.

Is it possible to completely remove the SQL query/tables created during the installation of this module?

I am looking to completely remove this addon (files/ SQL )and then try installing again.

Thanks
zeeshop
Posts: 78
Joined: Sun Jan 10, 2021 11:30 pm
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by raiwa » Fri Jan 07, 2022 7:57 pm

O.K. I got it. Change line 75 to:

Code: Select all

        if ( MODULE_CONTENT_SC_CONTINUE_RECENTLY_VIEWED_SHOW_CURRENT == 'False'  && !empty($ids_in_cart_list) ) {
The same is required in the other shopping cart module line 82:

Code: Select all

        if ( MODULE_CONTENT_SC_RECENTLY_VIEWED_SHOW_CURRENT == 'False' && !empty($ids_in_cart_list) ) {
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by raiwa » Fri Jan 07, 2022 8:02 pm

zeeshop wrote:Thanks, appreciated.

Is it possible to completely remove the SQL query/tables created during the installation of this module?

I am looking to completely remove this addon (files/ SQL )and then try installing again.

Thanks
There are no tables or other entries created other than the proper config entries of the modules. These are removed when the modules are uninstalled.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by raiwa » Sat Jan 08, 2022 7:50 am

Uploaded Version 5.3.3 with the above fix
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Error if Addon is used on Shopping cart page with Clear

by zeeshop » Sat Jan 08, 2022 11:10 am

Raiwa,
All working fine now.
Thanks very much for getting this resolved, very much appreciated.
zeeshop
Posts: 78
Joined: Sun Jan 10, 2021 11:30 pm
Contact: