Author Topic: table_customers, field_cart what's suppose to be in there  (Read 5079 times)

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
In tracing out the issue that I've post about over the last week -  I have finally found that it seems to be with input in to the db table_customers, field_cart. 

If I delete what is in that field,  the stuck cart items that won't let us remove them disappear.
I believe this is a holder from the 1.1.9 to 1.2.0  upgrade that was lacking some areas for a good upgrade.

My question now is what is the field in a 1.2.1 or 1.2.2 cart suppose to have in it?
I have some with NULL (which is the structure default), some with a:0:{}   and some with entries like this
a:6:{i:544;a:2:{s:3:"qty";i:2;s:7:"options";a:0:{}...

which I assume is the info for when a customer comes back and wants to continue on.

What do I need to have in the column to clear it all out?   is it NULL?

I have 210 entries of 1129  that have something in that field other then NULL,  and I need to clear them out.  Is NULL what I need in that field?

Next question -  with the 1.2.0+ versions are we cleaning out the cart when they leave with items in their cart?  Have you changed the process since 1.1.9?

Thanks
Lee



Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: table_customers, field_cart what's suppose to be in there
« Reply #1 on: June 17, 2015, 11:20:16 AM »
column "cart" contains serialized array with customer's products.
It contains products only for registered customers and can be all variants that you wrote (null, empty and non-empty arrays). They are all correct.
When customer adds some product in the cart it appends into this column. When he leave site and then come back again as guest, he can add products in session cart but after click "checkout"
 he needs to login. His session cart and table cart will merge after login.

During upgrade cart column not change.
Cart-saving process did not changed since abantecart birthday.:)
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: table_customers, field_cart what's suppose to be in there
« Reply #2 on: June 17, 2015, 12:18:43 PM »
Thanks for this reply. 

but can you please clarify the guest part -  how does a guest login?  OR are you using guest as a returning visitor that has a cookie set for the Hello - message?

When he leave site and then come back again as guest, he can add products in session cart but after click "checkout"
 he needs to login. His session cart and table cart will merge after login.


also with this "problem" site I made another post  http://forum.abantecart.com/index.php/topic,3688.msg15907.html#msg15907  that reports I can't get the any new imput into the "cart" field -  any ideas?

Thanks Lee


Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: table_customers, field_cart what's suppose to be in there
« Reply #3 on: June 18, 2015, 12:03:10 PM »
abantecart saves guest customer's cart into session as array. We do not store cart for anonymous users.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod