So I have now done all work with IPaymentPlugin and IShippingPlugin work and removed the CartHelper and so on. Workflows is no more and the site works just fine but without SerializableCarts, step 1 is taken.
Next step was to enable the SerializableCart so I looked into the ecf.app.config and to my surprise the line was already there!?
It has been true for a long time as it seems but workflows and CartHelper has still been used.Now they are all removed so the ICart object is used every where, for example:
public ICart LoadOrCreateCart(string name)
var cart = _orderRepository.LoadOrCreateCart(_customerContext.CurrentContactId, name, _currentMarket);
if (cart != null)
Looks good to me. I guess with the feature enabled and with this way of creating carts I would get a row in SerializableCart table?
When adding item to the cart this is used.
lineItem = cart.CreateLineItem(code);
//lineItem = _orderGroupFactory.CreateLineItem(code, cart);
lineItem.Quantity = quantity;
I have tried both ways of creating lineItems.The site still works just fine but nothing is created in SerializableCart the OrderGroup/OrderForm tables are still used.
I have tried the migration job but I get only this message:
"The site is using legacy cart system, no need to migrate."
I made a copy of the job and tried to run my own version but the I got the exception that a cart with this information already exists. Probably it tries to save the cart to the OrderGroup instead of the SerializableCart table.
What am I missing?
Are you sure the setting was enabled in both frontend (CMS) site, and Commerce manager?
How does you ecf.app.config look like?
That is so strange, I know I changed in both config files, but obviosly not...The feature was not enable in the CMS and even do I enabled the feature with code it looks like the ecf.app.config also needs to updated.
Now I get a row in the db table!