Developer forum

Forum » Development » getAllProducts() not returning all products

getAllProducts() not returning all products


Reply

I'm using this method to read out all products from Ecom and deleting them with DeleteAll().

 

When all products are deleted getAllProducts() returns a collection of 0 products, which is fine, however there are still products in the shop when browsing eCommerce. A sql count of rows in EcomProducts also returns 1100 rows.

 

Am I missing something?


Replies

 
Reply
jonas@zuport.dk wrote:

I'm using this method to read out all products from Ecom and deleting them with DeleteAll().

 

When all products are deleted getAllProducts() returns a collection of 0 products, which is fine, however there are still products in the shop when browsing eCommerce. A sql count of rows in EcomProducts also returns 1100 rows.

 

Am I missing something?

 

 

I solved the issue by using             Dynamicweb.eCommerce.Products.Product.Delete(ProductID);
 

on each of the remaining products in the database.

 

You must be logged in to post in the forum