Developer forum

Forum » Integration » Live stock lookup for anonymous users

Live stock lookup for anonymous users

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have a LI setup where I want to use local prices. To accomplish that, I set "Live product info for anonymous users" to false in the Live Integration settings.

However, it seems that this now also skips the stock check that uses live integration. Is that by design? And if so, can this be split somehow so I don't use LI for the catalog, but it does use it when performing the stock check at checkout?

Imar


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Imar,
yes, the problem that it is not disigned like that. So we can consider to create a new feature for that, but using some custom api can help.
You can suppy the encoded UserId (Security.SystemTools.Crypto.Encrypt) to the http Request and then Live integration will find that user by decoded id and act as this user is logged in.
Or create a custom StockLevelProvider and use LiveIntegration public api methods to make a request, but it will also require some user entity to be supplied into that.
BR, Dmitrij

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Dmitrij,

Yeah, having this as a feature would be nice. Also, maybe just do the stock check at checkout and not on the PDP would be a good option to have.

I'll fiddle with your ideas and see how far I get. I was also thinking about an alternative: turn on prices and product info for anonymous users, but skip the requests to the ERP when on a list or details page using the OnBeforeCommunication subscriber or so. Lots of options... :-)

Thanks!

Imar

 

You must be logged in to post in the forum