Developer forum

Forum » Integration » Liveintegration - only works in cart

Liveintegration - only works in cart

René Poulsen
Reply

Hi,

I'm working in a shop for one of out customers. We've set up live integration on the solution and it works just fine when I am on a cart page - then it sends the "CalculateOrder" request and i get data back from NAV.

I also want it to work on when I'm just on a product list page or a product detail page, when I haven't added anything to the cart. This is working on another solution I've been working on and the setup is almost the same. The only difference is that anonymous users is not allowed on the one where it's not working.

In the one where it's working it sends the "Request GetProductsInfo" and I get back a response with prices etc. This doesn't happen at all on the other one.

Any clues anyone?


Replies

 
Jonas Krarup Dam
Reply

Hey,

The only thing I can think of right now is that you can have "live prices disabled" for the specific user that is logged in. This is a setting that's only visible on the user if you have the live integration module installed.

If that's not the case, I don't know right now, but if you have a url for the website, I can take a look, and see if I can figure it out.

/Jonas

 
René Poulsen
Reply

Hmmm, this is really weird. Today it's working every time i show a product list or product details.

What would happen if there was no connection to the NAV? Would the log file still be created? (the one in files > system > log > liveintegration)

 
René Poulsen
Reply

I just tried to add something to the cart and remove it again. I remove the products with the cartcmd=emptycart url paramater. When I do that I get a .NET error saying:

Collection was modified; enumeration operation may not execute.
[InvalidOperationException: Collection was modified; enumeration operation may not execute.] System.Collections.Generic.Enumerator.MoveNextRare() +14271579 Dynamicweb.eCommerce.Frontend.Cart.CartCatch.CatchCart(Int32 pageId, PageView Pageview) +3426 Dynamicweb.eCommerce.Frontend.EcomPageLoadNotificationSubscriber.LoadedPage(PageView page) +48 Dynamicweb.Frontend.PageView.SetID() +4345 Dynamicweb.Frontend.PageView.Load() +1459 Dynamicweb.Frontend.PageviewControl.get_Pageview() +71 Dynamicweb.Admin.DefaultAspx.Page_Load(Object sender, EventArgs e) +106 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

 
Jonas Krarup Dam
Reply

Hi Rene,
Logging depends on your setting in the Live Integration. If you have all logging enabled, it will write a logmessage on every request, no matter if the NAV connection is available or not.

I haven't seen that error message in that situation before. Does it show up consistently?

The notification subscriber on "pageLoaded" doesn't access the order collection, so I don't see how an Empty cart command would cause that exception.

If the problem persists, let me know, and I'd be happy to take a look

/Jonas

 
René Poulsen
Reply

It happens every time I empty the cart.

 
Jonas Krarup Dam
Reply

ok - where can I take a look?

 
René Poulsen
Reply

I've sent you a mail with link and username and password for one of the users on the site.

 
René Poulsen
Reply

Btw. - after I get the above error, the liveintregration stops sending request to NAV (there is nothing in the log file). If i delete all cookies from the site it starts working again.

 
Morten Snedker
Reply
This post has been marked as an answer

An odd combination of live integration + cookies + empty cart may result in unwanted behaviour. This has been fixed in Live Integration. The updated DLL and its full VS project can be found at the download section,

 

BR
Snedker

Votes for this answer: 1

 

You must be logged in to post in the forum