Developer forum

Forum » Integration » Liveintegration - disable on productlist

Liveintegration - disable on productlist

Claus Kølbæk
Claus Kølbæk
Reply

Hey

I am attempting to disable the liveintegration (running through a codeunit on a dw10) on the productlist only, as the connected BC takes to long to generate priceinfo with multiple products and their variants. Is there a simple way to achieve this? I have tried the subscriber OnBeforeGenerateProductInfoXml and by cleaning out the XML in certain scenarios I sorta get the solution I want, but it seems it kinda blocks my ability to then use the default price in the database when doing it this way.


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Claus,

 

The only way I can think of is to enable the "Lazy load product info" but then you'd need to add getproductinfo=true to the request whenever you want Live Integration to kick in.

 

In most of the projects I was involved with, that's how we did it, and then calling either a service page or dwapi with that querystring parameter and then hydrate the page accordingly.

 

The reason is because Live Integration is essentially a Price Provider. And it has no context of a product list, product detail page, product called from an orderline or any other scenario, so currently it's either called "everytime" (and caching prevents it from reaching out to the ERP) or it checks for getproductinfo=true (in which case if not available will revert to the default Price Provider - DW standard functionality).

 

Hope that helps you.

Nuno Aguiar

 
Claus Kølbæk
Claus Kølbæk
Reply

Hi Nuno

Thank you for the suggestion, I might look into that, thought I fear that through a swift solution the amount of edits I need to make to do that instead, might be alot. Would have been lovely if there were more ways to simply hook into the liveintegration event and cancel it from firing in the first place.

For now I have gotten around my current issue by clearing the XML, and then awoid using the viewtemplate price and instead find the price through the ecommerce service, I sorta achieve what I want in a terrible way :)

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Would it work when you inherit the LI price provider with a custom one and return (null) from the methods that load prices when you're on a product list?

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

It that doesn't work, it would be nice if the core team could add subscribers for this that would let you back out programmatically. I've seen the need for this on other solutions too.

Imar

 

You must be logged in to post in the forum