Try our conversational search powered by Generative AI!

Enable SerializableCart not enabled/working? [11.3]



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 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)
        SetCartCurrency(cart, _currencyService.GetCurrentCurrency());

    return cart;

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?



Nov 10, 2017 17:09

Are you sure the setting was enabled in both frontend (CMS) site, and Commerce manager?

How does you look like?

Nov 10, 2017 19:43

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 also needs to updated.

Now I get a row in the db table!



Nov 10, 2017 20:08
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.