Developer forum

Forum » Development » Saving product category fields outside the API

Saving product category fields outside the API

Martin Nielsen
Reply
Hi DW,

I'm trying to save values for the product category fields without using the API, but it's not working very well yet.

I've managed to replicate the exact XML which DW saves to the field ProductCategoryFieldValues when saving a product.
But when i do it, it doesn't apply to the backend.

What else must i do besides creating the correct XML and saving it to the column ProductCategoryFieldValues?


Ps. the reason i'm trying avoid the API, is to gain speed. i've cut of 10-15min of my import of 5000products by using LINQ, and the last bit i need is to get the category fields to work.

Regards
 Martin


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Martin

Do the same fields exist in the EcomProductCategory table? If not then they will not be shown. In other words, you need to import the categories with the correct fields, those categories must then be linked to the EcomGroups for the relevant products. Lastly you need to create the CategoryFieldValues xml and put it into the ProductCategoryFieldValues column in the EcomProducts table.

Hope this helps :)

- Jeppe

 
Martin Nielsen
Reply
 Hi Jeppe,

The same fields exist in the EcomProductCategories, my group is linked to the correct category which contains my fields, and my XML structure is exactly like what DW puts in the column.

When i visit the product i can see all the fields, but their values have not been set based on my import.

Got any other ideas?

Regards
 Martin


 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Sorry for taking so long to get back to you.

The only thing I can think of is language. We have implemented language versioning of Product Categories where the language of the group/product dictates which category is used. Maybe this is the issue? Otherwise I would like to see some examples of what it is you actually do. You can send them to my inbox if you don't want it published on this forum :)

- Jeppe

 

You must be logged in to post in the forum