Developer forum

Forum » Development » Old carts and new fields/values.

Old carts and new fields/values.

Jeppe Jakobsen
Reply

Hello everyone

We recently made a some changes and did some refactoring of our cart-implementation, and during that we added some new fields and values, which works just fine. We then started having some issues with some users that still had old carts. These carts contained old products with missing values and orderlines, and they need to be present/updated as they are used later in the buying-process. 

So my question is: Is there a way update active carts with these values automaticly, or do we have to make custom code handles this? Another solution could be that we somehow ask the users to rebuild old carts, and if that is the case, can we deactivate carts through a database update?

Best regards, Jeppe.

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Jeppe

It depends on your setup what is the best option. All the carts are in the EcomOrders table, and you can change them there, including the missing fields. You can also delete them, change how long they are valid (MC setting), or build templates so they default to some value if it is missing.

 
Martin Grønbekk Moen
Reply

Hi Nicolai

Our customer really want to make sure the old baskets work without deleting them.
Is it possible to lets say add the missing order line field to all open baskets created before 1/7?
If that is possible, are there any examples on how to do an operation like this?

 
Nicolai Høeg Pedersen
Reply

It is possible, I have no example off doing that, but you can take a look at the new carts and see the difference to the old ones, and fix the data... Sherlock :-).

BR Nicolai

 
Martin Grønbekk Moen
Reply

Thanks Dr. Watson we will look into it :P

 

You must be logged in to post in the forum