Developer forum

Forum » Development » Get inactive products

Get inactive products


Reply
Hi!

How can I get all products?
I have tried: Products.Product.getAllProducts(), Product.getProductBySQL("Select * FROM EcomProducts"), Product.getAllProductsFromShop("SHOP1") and many more but I cant get the inactive (ProductActive = 0)

Kind regards
/Magnus

Replies

 
Reply
Hi Magnus,

You can use:

Product.getProductBySQL(sql, false);

to get all active and inactive products. The default overload for Product.getProductBySQL which only accepts the SQL statement passes true for the doRefactor argument which filters out inactive products.

Hope this helps,

Imar
 
Reply
It works.
Didn't test that one, my bad =).

Thanks for fast response.

/Magnus

 

You must be logged in to post in the forum