Abandoned / Live carts Error after upgrade

[font=arial,helvetica,sans-serif][size=4]After i upgrade from cscart 2 to 3.0.5 When i click the “Abandoned / Live carts” gives me these error"



Database error:[color=#000000] Unknown column 'ip_address' in 'field list' [/color]b[/b]

Invalid query:[color=#000000] SELECT SUM(amount) as count, SUM(amount) as sum, SUM(amount * price) as total, ip_address FROM cscart_user_session_products WHERE user_id = 3059890791 AND item_type IN ('P', 'C', 'G') AND type = 'C' GROUP BY cscart_user_session_products.user_id[/color]



[color=#000000]Anyone had the same problem? any suggestion?[/color]



[color=#000000]Appreciate your help[/color]



[color=#000000]Thanks[/color][/size][/font]

cscart live cart problem.png

[quote name='cloddi' timestamp='1360124680' post='154551']

[font=arial, helvetica, sans-serif][size=4]After i upgrade from cscart 2 to 3.0.5 When i click the “Abandoned / Live carts” gives me these error"



Database error:[color=#000000] Unknown column 'ip_address' in 'field list' [/color]b[/b]

Invalid query:[color=#000000] SELECT SUM(amount) as count, SUM(amount) as sum, SUM(amount * price) as total, ip_address FROM cscart_user_session_products WHERE user_id = 3059890791 AND item_type IN ('P', 'C', 'G') AND type = 'C' GROUP BY cscart_user_session_products.user_id[/color]



[color=#000000]Anyone had the same problem? any suggestion?[/color]



[color=#000000]Appreciate your help[/color]



[color=#000000]Thanks[/color][/size][/font]

[/quote]



Confirmed, I am recieving this same exact error just after the upgrade from 2.2.5 to 3.0.5 when attempting to view abandoned carts.

Hello all,



Thank you for your message.



I am sorry to hear that you have experienced this problem. It is a well-known bug in the Store Import add-on when you upgrade the database of your store to version 3.0.5 from version 2.2.x. In order to resolve this problem you should execute the SQL query from the file attached in the database of your CS-Cart store. You can use the following instructions to implement it:


  1. Put the restore.sql file attached to this message (unpack this file first in order to get the restore.sql file) to the var/database/backup directory of your CS-Cart installation.
  2. In the CS-Cart administration panel, go to Administration > Database > Restore.
  3. Select the restore.sql file and click the Restore button.



    I strongly recommend you to create a database backup before implementing it. Please check it.



    Thank you.





    Pavel Zyukin

    CS-Cart Support team

    restore.zip

I am having a similar issue. However, I just get the message “Error_occurred” when choosing “Live/Abandoned Carts.”



I've followed the instructions above to see if that would fix it, but am still getting the error.

Put your store in “Development mode” and you will see the database error. Or you can add the following to your config.local.php file,


if( !defined('DEVELOPMENT') ) define('DEVELOPMENT', true);

I [quote name='CS-Cart Support team' timestamp='1360325219' post='154728']

Hello all,



Thank you for your message.



I am sorry to hear that you have experienced this problem. It is a well-known bug in the Store Import add-on when you upgrade the database of your store to version 3.0.5 from version 2.2.x. In order to resolve this problem you should execute the SQL query from the file attached in the database of your CS-Cart store. You can use the following instructions to implement it:


  1. Put the restore.sql file attached to this message (unpack this file first in order to get the restore.sql file) to the var/database/backup directory of your CS-Cart installation.
  2. In the CS-Cart administration panel, go to Administration > Database > Restore.
  3. Select the restore.sql file and click the Restore button.



    I strongly recommend you to create a database backup before implementing it. Please check it.



    Thank you.





    Pavel Zyukin

    CS-Cart Support team

    [/quote]



    I tried but have still the same Error.



    Any other suggestion?

Hello cloddi,



Thank you for your message.



In this case the problem requires the examination on your server. Please contact us via Customer Help Desk and provide temporary access to your server by clicking on the Add record link on the Access information page of your Help Desk account so that we could examine the issue.



Thank you.





Pavel Zyukin

CS-Cart Support team

Shouldn't this fix have been included in the 3.0.6 maintenance release? I am still receiving this abandoned cart error even after upgrading…



On second thought, perhaps it should not have been included in 3.0.6 as it only effects those which previously used the “Store Import Tool” ?



Guess I will just have to apply the patch seperately.

I’m assuming some code changes were made in 3.0.5 or 3.0.6 because I imported a 2.2.5 store into 3.0.4 and had this problem, yet the site I’ve just imported from 2.2.5 to 3.0.6 doesn’t have the problem.



Maybe it’s a win for me this time as I couldn’t recreate the problem so it must be user error and not a bug :shock:

Still No Workey!



Currently running 3.0.6



Applied restore.sql patch as provided above



Still receiving error message as follows:


<br />
Error: Unknown column 'ip_address' in 'field list' <b>(1054)</b><br />
Query: SELECT SUM(amount) as count, SUM(amount) as sum, SUM(amount * price) as total, ip_address FROM cscart_user_session_products WHERE user_id = 1584702542 AND item_type IN ('P') AND type = 'C' GROUP BY cscart_user_session_products.user_id<br />

```<br />
<br />
This is not a critical issue for us, however, I don't like to ignore issues like this which may lead to other undiscovered problems. <img src="upload://ssT9V5t45yjlgXqiFRXL04eXtqw.gif" class="bbc_emoticon" alt=";-)">

Struck, I have barely even messed with 3.x but on my test 3.0.4 install, there is no ip_address field in table cscart_user_session_products so I would look for the field in that table and if it doesn't exist, add it.

Thanks Tool,



Suppose I might as well just go ahead & do a db compare to a fresh 3.0.6 db to see what else needs tweaked from the last few upgrades performed.



Gotta say, 3.0.6 is pretty sweet overall, actually running like a top ! ;-)


[quote][color=#282828][font=arial, verdana, tahoma, sans-serif]I have barely even messed with 3.x[/font][/color][/quote]



I got tired of waiting for 3.1.1 and decided to create some drama and just dove into 3.0.5 head first, ended up pulling an all-nighter getting everything back in place and re-americanized to my liking’s (meaning a few added language file tweaks, field positioning,etc) so that we could start receiving orders by day break! Must admit, it did turn out to be a very, very long night! :shock:

Imported from 2.2.5 to 3.0.6 and now receiving this error. Surely if the fix (February 8th) was known before the release of 3.0.6 (February 14th), the fix should have been included in 3.0.6.



Applied the fix and the error remains the same because the ip_address field is empty when a value is expected. I solved it by applying the IP address from cscart_users to match the user_id and all others (presumably visitors, not registered users nor guests) with a localhost IP. No more errors.

I am getting this same error with new install of 3.06



Database error: Unknown column 'ip_address' in 'field list' (1054)
Invalid query: SELECT SUM(amount) as count, SUM(amount) as sum, SUM(amount * price) as total, ip_address FROM cscart_user_session_products WHERE user_id = 1671391081 AND item_type IN ('P', 'C', 'G') AND type = 'C' GROUP BY cscart_user_session_products.user_id




How can I fix this or should I file a bug report?