Developer forum

Forum » Development » How to trigger live integration product info fetch outside ProductCatalog?

How to trigger live integration product info fetch outside ProductCatalog?

Wilfred Polderman
Reply

Hi all,

I’m using Swift and trying to show customer-specific tier prices from our ERP via Live Integration on a BlanketOrderDetails page.

On product list pages, this works fine because the ProductCatalog query seems to trigger FetchProductInfos, so ProductManager.GetProductInfo(product, settings, user) returns the expected data.

On the BlanketOrderDetails page, I’m using GetLoop("OrderLinesLoop"), and there GetProductInfo(...) returns null, apparently because no live product info has been fetched yet.

I found that FetchProductInfos does exactly what I need, but it is marked internal in DW 10.4.28.

The ERP response does contain the tier pricing I need, for example:

<column columnName="Recommended_quantity"><![CDATA[1|4|16]]></column>
<column columnName="Recommended_quantity_price"><![CDATA[984.00|934.80|865.92]]></column>
 
In this specific case, the quantity on the BlanketOrderDetails page should result in showing the tier price 865.92.

Is there a supported public way to trigger a Live Integration product info fetch manually outside a ProductCatalog query context when using Swift?

Thanks!

Client_view.png

Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Wilfred,
smilar question was answered before in those threads so should help:
https://doc.dynamicweb.com/forum/integration/integration/get-several-prices-from-live-prices
https://doc.dynamicweb.com/forum/integration/integration/live-integration-of-stock-from-several-locations
The idea is to call the Dynamicweb.Ecommerce.DynamicwebLiveIntegration.TemplatesHelper.UpdateProduct method first that will trigger the Live integtration to send request to ERP to get the missing product info if it is not cached.
BR, Dmitrij

 

You must be logged in to post in the forum