Developer forum

Forum » Integration » Issue with Live prices in product feed

Issue with Live prices in product feed

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a solution that was upgraded from 9.9.x to 9.13.x.

On this solution, we have implemented a product feed (not the PIM one) that is using some logic (suggested by Dmitrij) to authenticate the user based on a property from URL.

We are using that value to determine the user, then change its password, authenticate the user, retrieve products then change the password back.
All this worked very well on 9.9.x. As soon as we have upgraded, it does not work anymore.

The behavior is different on the first request. On the first request (with the same URL and parameters as before) the call does not go all the way to the LivePrice call.

The second attempt though, makes it all the way to the Liveprice call.

I have checked if the authentication method authenticates the user and it does. Somehow, it just does not authenticate it as it did before.
We are using:

security.LogOn(user.UserName, user.UserPassword);

 I am sure a lot has been changed between 9.9 and 9.13 but I can;t figure out how to solve this issue. I am not sure if it;s a live integration issue or an authentication issue.

Can somebody shed a light on this?

Thank you,
Adrian


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,

can you try to download the last version for the Live integration dll from Nuget and try with that?
In the 6.2.17 version there were some issues fixed to get the live prices using the dw api requests, so maybe you don't need to do
any custom users logins calls.

If that will not help can you provide more details on your setup and urls and users/logins/custom code/etc.
Do you use the Dynamicweb.Frontend.LogOnHandler.LogOn(string username, string password)?

BR, Dmitrij

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Dmitrij,

Yes, I am using Dynamicweb.Frontend.LogOnHandler.LogOn(string username, string password and I am also using DW 9.13.6.
Maybe my issue is in the way I get the products.

I am using a ProductCatalog module and in the template I am using Model.Products to get all products.

Maybe this way of getting the products hits the price provider before the user is authenticated.

I will also try with the latest DLL as you have mentioned.

Thank you,

Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Dmitrij,

I have tried your suggestion but I don't see any difference.

I have also tried the dwapi calls for getting products with UserID parameter. It still does not retrieve live prices from the ERP.

Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Any news or suggestions here?

A quick recap, I am trying to build a product feed using a Query and Live prices. The authentication of the user should be based on some user token (different than the PasswordToken).

The regular feed logic, even when passing the USerID in the encrypted format, does not make the LiveCalls for prices not does the dwapi.

I have created a simple page with a ProductCatalog (I have tried both the regular ProductCatalog and the ProductViewModel) module and I have tried authenticating the user through the API (using the Dynamicweb.Frontend.LogOnHandler and LogOn method). The user is authenticated but the request for prices was already made. Which means no LivePrices for my result.

If I use the lazyLoading option, the behavior is almost the same except that the LivePrice request is not bulk, it is individual for each product.

For now, I have forced a reload of the page after authenticating the user but it's just a hack that creates a lot of other issues for situations where the feed is loaded using curl or other similar methods.

I am running out of ideas. :)

Thank you,
Adrian

 

You must be logged in to post in the forum