Developer forum

Forum » Integration » IceCat Import ProductPortionSize issue?

IceCat Import ProductPortionSize issue?

Arnór Halldórsson
Arnór Halldórsson
Reply

Oy laddies,

We're trying to use the built-in IceCatIntegrationScheduledTaskAddIn in Dynamicweb and we're running into an issue.

We have created a query which returns just over 9000 (hehe) products, and we have the Product portion size to process set to 100 but we always seem to get the same 100 products.

We took a look at the source code for the Scheduled Task, looked into it's parent class: Dynamicweb.Ecommerce.Integration.OpenCatalogIntegrationScheduledTaskBase.cs and saw that when getting the products using the query, the class adds a QuerySetting with Take = ProductPortionSize to the mix:

Am I wrong, but doesn't that mean, that the amount of products returned from the query is equal to the ProductPortionSize, or to be more specific, the first ProductPortionSize'th products in the query?

Meaning that in the Run method, GetProducts will always return the same products and when the task loops through the list and tries to batch the lot into portions, it only runs through the loop a single time, because the amount of products in products is always less than or equal to ProductPortionSize:

Best regards,
Arnór


Replies

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply
This post has been marked as an answer

Hi,

You need to implement a method, to set state on these products, there has been in the "fetched loop", and the Query are using these information.

Defining of these two fields, are done in the ScheduleTask, running the ICECAT process (see below)

 

So you have to create these two as ProductCustomFields (eg. call them Icecat_Date & Icecat_State), and define them in your Icecat SheduleTask

Then setup your Query, using these fields, eg. using check "Icecat Date" is empty ..

Hope above information help's you ..

/Søren

 

 

Votes for this answer: 1

 

You must be logged in to post in the forum