Developer forum

Forum » Development » When updateing category field value on product, doesnt update DW 10

When updateing category field value on product, doesnt update DW 10

Theodor Perrier
Reply

When updateing a specific category field value on products different than the defualt language. it seems that the value is only set if its different from the master.
But when the product is indexed, the field is null on the language variant.

The field is set to be editable on languages versions


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Theodor.

Not sure I fully understand your question.

When you have that checkbox set for a field, you have to edit the value for each language if it should have a value - also when indexed. No inheritance will exist. Do you mean that you cannot edit the value for the field on a given language?

If you remove the checkbox, you can only edit the value on the master and it will be copied to language versions.

BR Nicolai

 
Theodor Perrier
Reply

Hi Nicolai,

Sorry, I'll rephrase the issue.

The issue is, the solution im working on, has a webapi, that recieves an update for products.
When populating the productcategory fields for translated products, if the value of the field is the same as the master product, it doesnt create a row in the database.
This causes the field to not be populated in the productindex.
The method for setting the field is the SetCategoryValue, on the product entity.

This issue is also true for fields with the checkbox not checked and read only checked.

 

If any additional information is needed, I'll try and provide it.
Best regards
Theodor

 
Viktor Letavin Dynamicweb Employee
Viktor Letavin
Reply

Hi,

Could you please specify what exactly you trying to achive and why you want the values be duplicated on langauge, when the value actually follow inheritance rules, so when you ask for a category value for that field and product langauge version it will give you a correct one. Because I don't think it is a bug, but the way it works and if you need a different behaviour I probably may look up for a workaround, if you tell what exactly you want to achive.

BR, VIktor.

 
Theodor Perrier
Reply

Hi Viktor.

 

The issue is, that when the product index builder creates the document for the lucene index, it doesnt populate the field in the index, with the inherited value from the category field value.
With this behavior, the facets for the specific language is missing the values to facet by.


Hope this clarifies.
Theodor.

 

You must be logged in to post in the forum