Developer forum

Forum » Ecommerce - Standard features » EcomProducts.ProductHidden

EcomProducts.ProductHidden

Kenneth Radoor
Reply

In DW 9.17.x

What is the field "EcomProducts.ProductHidden" used for.

How is it set ?

Is it just some legacy stuff, that is not in use anymore?

BR

Kenneth


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Seems like it is products that is in the database and not being queried by some parts of the API.

 
Kenneth Radoor
Reply

thanks. 

But how are the value set (true/false) in the interface.

I think I remember from years ago that i was set as a combination of other setting.

We have quite a few of products where the value is null. And I wonder if it is save throug the firehose to set it to false. 

the case is that i have to import a huge amount of prices into DW and i want to make sure that we only import prices to product that actually is in DW.

and yo avoid looking up product one of a time i want to use a cache like

var cacheAllProducts = Dynamicweb.Ecommerce.Services.Products.GetAllProducts("LANG1", false);

that method only return the products where the ProductHidden field in the database if set to false.

Is there a better way to get all products than using the above method.

BR

Kenneth

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

It is not set in the interface. The only thing setting it is "Deactivate missing products" on the Dynamicweb provider.

You can set it to false in the firehose - no issues on that.

In the current code base null is handled - so as long it is not set to true, the product should show up. So false or null is both good.

But calling GetAllProducts sounds 'dangerous' as it loads a LOT of data you do not need. So probably better to do "select productid from ecomproducts" and look at the result of that when importing the prices.

 

 

You must be logged in to post in the forum