Hello,
I am a newby in the Konakart world, and I would need some help.
I am trying to search for products on the Admin part, and I can not get any of my Products. Only when I look for the inactive products, a get results.
I have a product, which has a custom property "test", but with the following code I can't find it.
AdminDataDescriptor descriptor = new AdminDataDescriptor();
AdminProductSearch adminProductSearch = new AdminProductSearch();
//adminProductSearch.setSearchText("Pluto");
adminProductSearch.setCategoryId(-100);
adminProductSearch.setWhereToSearch(-100);
adminProductSearch.setManufacturerId(-100);
adminProductSearch.setPromotionId(-100);
adminProductSearch.setProductType(-100);
descriptor.setOffset(0);
descriptor.setLimit(100);
descriptor.setShowInvisible(true);
descriptor.setCustom1("test");
AdminProducts adminProducts = port.searchForProducts(sessionId, descriptor, adminProductSearch, -1);
On the other side, when I try the same thing directly on the store like this:
DataDescriptor dataDesc = new DataDescriptor();
dataDesc.setOffset(0);
dataDesc.setLimit(100);
dataDesc.setShowInvisible(true);
dataDesc.setCustom1("test");
ProductSearch prodSearch = new ProductSearch();
//prodSearch.setSearchText("Pluto");
prodSearch.setManufacturerId(-100); // -100 == Search all
prodSearch.setCategoryId(-100); // -100 == Search all
prodSearch.setSearchInSubCats(true);
prodSearch.setSearchAllStores(false);
prodSearch.setProductType(-1); // -1 == Not Set
Products products = port.searchForProducts(sessionId, dataDesc,prodSearch, -1);
=> it works.
Can some one help my understand how these things work and how can I do a search on the admin page?
p.s: I also have problems searching for the name of the product. I've tried all the given examples but somehow I still don't get any products back.
Thank a lot!
Alexandra
I am a newby in the Konakart world, and I would need some help.
I am trying to search for products on the Admin part, and I can not get any of my Products. Only when I look for the inactive products, a get results.
I have a product, which has a custom property "test", but with the following code I can't find it.
AdminDataDescriptor descriptor = new AdminDataDescriptor();
AdminProductSearch adminProductSearch = new AdminProductSearch();
//adminProductSearch.setSearchText("Pluto");
adminProductSearch.setCategoryId(-100);
adminProductSearch.setWhereToSearch(-100);
adminProductSearch.setManufacturerId(-100);
adminProductSearch.setPromotionId(-100);
adminProductSearch.setProductType(-100);
descriptor.setOffset(0);
descriptor.setLimit(100);
descriptor.setShowInvisible(true);
descriptor.setCustom1("test");
AdminProducts adminProducts = port.searchForProducts(sessionId, descriptor, adminProductSearch, -1);
On the other side, when I try the same thing directly on the store like this:
DataDescriptor dataDesc = new DataDescriptor();
dataDesc.setOffset(0);
dataDesc.setLimit(100);
dataDesc.setShowInvisible(true);
dataDesc.setCustom1("test");
ProductSearch prodSearch = new ProductSearch();
//prodSearch.setSearchText("Pluto");
prodSearch.setManufacturerId(-100); // -100 == Search all
prodSearch.setCategoryId(-100); // -100 == Search all
prodSearch.setSearchInSubCats(true);
prodSearch.setSearchAllStores(false);
prodSearch.setProductType(-1); // -1 == Not Set
Products products = port.searchForProducts(sessionId, dataDesc,prodSearch, -1);
=> it works.
Can some one help my understand how these things work and how can I do a search on the admin page?
p.s: I also have problems searching for the name of the product. I've tried all the given examples but somehow I still don't get any products back.
Thank a lot!
Alexandra