Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Cart errors after upgrade to 9.3.12

Cart errors after upgrade to 9.3.12

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

We have recently upgraded a solution from the latest 8.9 to the latest (at that point) 9.3 version.

We have since started to see a few Cart/Order errors.
Specifically, conversion from Cart to Order fails pratially. By partial, I mean that the cart is converted into an Order but in the order table we still have isCart=1 and on the User, we have the ID of the cart still present.

This is causing the users to edit the previous order when they get back in the cart. Pretty weird.

Moreover, in the logs I have found quite a lot of asssortment related errors:

2018-04-18 16:14:37.6528|ERROR|eCom/CartV2/Errors|Order <No order>: Unexpected exception GetContent() with the message: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
  at Dynamicweb.Ecommerce.Assortments.AssortmentPermission.GetAllAssortmentPermissions()
  at Dynamicweb.Ecommerce.Assortments.AssortmentPermission.GetAssortmentIDsByUser(User user)
  at Dynamicweb.Ecommerce.Assortments.AssortmentPermission.HasAccessToProduct(Product product, User user)
  at Dynamicweb.Ecommerce.Assortments.AssortmentPermission.HasAccessToProduct(Product product)
  at Dynamicweb.Ecommerce.Products.ProductCollection.ReFactorProductList(Boolean useAssortments)
  at Dynamicweb.Ecommerce.Products.ProductCollection.Load(String query, Boolean doRefactoring, Boolean bulkFill, Boolean useAssortments)
  at Dynamicweb.Ecommerce.Products.Product.GetProductsByProductIDs(String[] productIds, Boolean doRefactoring, String productLanguageId, Boolean bulkFill, Boolean useAssortments)
  at Dynamicweb.Ecommerce.Cart.Frontend.RemoveNonExistingProductsFromCart(Order order)
  at Dynamicweb.Ecommerce.Cart.Frontend.GetContent()

Anybody encountered something similar?

Thanks,
Adrian


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

This would be the other error we started seeing in the Log after the update. And this is related with the orders that failed to convert properly:

2018-04-18 16:26:11.1561|eCom/CartV2/Errors|ERROR|WEBORDER51662|Order WEBORDER51662: Trying to render step 2, but stepvalidation failed - showing empty paragraph
 
Nicolai Pedersen
Reply

We have no records on this.

Does this happen on all orders/carts? Do you have assortments and how are the assortments created?

And have you tested on 9.4 to see if the problem is the same?

Thanks, and sorry about the inconvenience.

Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

It is very weird because it is not happening to all orders and not even for all orders of the same customer.

We had a lot of trouble upgrading to 9.3. When we finally went live with it I wanted to avoid potential issues when upgrading to 9.4. We will probably upgrade anyway because of the GDPR modules.

One other thing that we have noticed was that all OrderContexts were plased in the cookies of the user resulting in a cookie size that exceeded the limit of the server and the user could no longer login.

We ended up deleting all OrderContexts for the time being just to avoid this issue.

The error I am talking about, surfaced after this deletion. And we don't have any mention or setting involving Contexts anymore.

We have noticed the change in the source code and it seems to be the same in both 9.3 and 9.4.

I am unsure how to describe a way to reproduce it. There seems to be too many changes that generates different behavior than before.

Bottom line, what happens in our situation, is that the customer finalises the order but the order is kept as a cart. Then, when the user adds something new to cart, it will basically add to the previous order causing an edit of the previous order instead of a separate order.

In our case, the site is B2B and there are hundreds of orders a day. Yesterday we have noticed around 20 of those situations. It's not a high percentage from the total daily orders but it causes a lot of frustration for both the customers and the admins.

Adrian

 

 
Oscar Romin
Oscar Romin
Reply

This is also happening to me.

After an order is completed, the OrderComplete field in the EcomOrders table is not set to 1 for me and when adding new products to the cart they are added to the old order.

On the AccessUser the field AccessUserCartId is now still the ID of the old order, and when adding a new product a new row is created in EcomOrders with that id, for example ORDER143.

So for clarification, an order is created as ORDER143. That Id is still saved on the AccessUser afterwards. Then when you go to add a new product a new row with that ID is created, and it has the same EcomOrderLines as before, at least I think that's what's happening.

We haven't done anything with cookies though, as Adrian seem to have done. We had an issue with a payment option, which didn't allow the order to go through. When I went in to edit our payment options (Settings -> Ecommerce -> Orders -> Payment), there was an error in dw admin saying that one of our AccessUsers was invalid (not the same user I was using to make orders with) because it didn't have an email attached to it. I added an email to it and I could then enter the paymentsection to edit the payment and save, which then allowed me to create orders again. Maybe this somehow has something to with this issue, even though it's farfetched?

Nicolai, have you been able to recreate this issue internally?

Hopefully this all made some sense. DW version 9.4.14 btw

 
Nicolai Pedersen
Reply

We cannot reproduce this.

We need a link to solution and your payment gateway information in order to see what happens.

On 9.4.14 if a cart is no longer a cart, you get an exception when trying to add a product to it. So I do not understand how this would happen on 9.4.14. So need a link and video of the issue.

BR Nicolai

 
Oscar Romin
Oscar Romin
Reply

It would seem that we fixed this error for now. The fault was that in the payment options we had set its checkout handler to AuthorizeNet but not registered any information for it. Even though I remember it being set to 'None' in that dropdown it still changed somehow?! I can't set it to 'None' now either, it defaults to 'AltaPay' instead? So weird...

Instead we created a new payment option with Cart Type set to 'None', and then the order is created correctly. 

Maybe this will aid you in your search for recreating the issue? We don't have a public solution ready yet and creating a video seems like too much of a hassle right now unfortunately.

 
Nicolai Pedersen
Reply

Hi Oscar

Thank you for the information - that is helpful, and explains what happenede. Will see if we need to change anything related to this.

BR Nicolai

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi all,

I’ve run the tests to find the issues but seen that all performs as expected:

Solution based on last DW94 (9.4.15)

1. Try to create payment with type=checkout handler and ‘None’ in checkout type – it’s unable, payment has Type=’None’ after saving (OK);

2. Create payment has Type=None – OK;

3. Create new payment has AutorizeNet type, all appropriate fields are left by default (empty);

4. Login by user in frontend, try to go thru checkout using the payment – it’s unable with appropriate notice (attached). Order is not completed. Added new product is placed to the order can be completed with valid payment (from point 1-2 below or has valid data, OK);

Solution based on last DW89 (8.9.2.21)  

5. Perform 1 above – there are the same results (OK);

6. Perform 2 – there are the same results (OK);

7. Perform 3 - there are the same results (OK);

8. Move to last DW94 (9.4.15), check payment form point 5 - ‘None’ option exists, is first one in the drop-down list of providers, can be selected and available after storing (OK)

9. Perform 4 - there are the same results (OK)

 

So, please correct my scenario if it doesn’t fit the case mentioned in one from last posts.

BR, Oleg QA

2018-06-28_1627.png

 

You must be logged in to post in the forum