Developer forum

Forum » Development » RE: Public method to get Products and Variants filtered

RE: Public method to get Products and Variants filtered

Mario Santos
Reply

Hi,

 

I'm currently using Product.GetProductByID(productID, variantID) inside an orderlines loop, but I want to optimize that to a single DB call.

I've checked the method Product.GetProductsByProductIDs(productsIDs) but this retrieves all products and variants.

I've found the GetProductsByProductIDsAndVariantIDs() but is not a public function.

Is there any public method that I can send a list of productsIDs and variantIDs and get a filtered colletion already?

 

BR, Mário

 

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Mario

We can just make it public.

But why do you call GetProductByID in the orderline loop? You have the data right there...

 
Mario Santos
Reply

Hi Nicolai,

I'm using 8.8.1.6, can you make it public on the next release?

I know that the product data on the loop but I'm having issue with the orderline tag Ecom:Product.Stock.I've created a post for that already (http://developer.dynamicweb.com/forum.aspx?ThreadID=48001).

Thank you, Mário

 

You must be logged in to post in the forum