Hi guys,
Is there an easy way to access all options of a specific ProductCategoryField via the API?
Thank you,
Adrian
Hi guys,
Is there an easy way to access all options of a specific ProductCategoryField via the API?
Thank you,
Adrian
Hi Adrian,
Are you looking for something like
var cf = Dynamicweb.Ecommerce.Services.ProductCategoryFields.GetFieldById("[CategoryId]", "[FieldId]"); foreach (var option in cf.FieldOptions) { string name = option.Name; string optionValue = option.Value; }
BR
Snedker
Hi Morten,
Yes!. That should do it.
Is there any reason why this entire Dynamicweb.Ecommerce.Services section is not visible in the API documentation? Or am I looking in the wrong place?
Thank you,
Adrian
Hi Adrian,
It is there. If you navigate to https://doc.dynamicweb.com/api-docs and unfold Dynamicweb 9 > Dynamicweb.Ecommerce, you will find the Services class: https://doc.dynamicweb.com/api-docs#article=33d1e8f0-8a99-1118-98b8-b214644650ef.
BR
Snedker
Hi Morten,
Thank you very much. I am not sure how I have missed it.
Thank you, I will bookmark it :)
Adrian
Hi Morten,
Is there also a way to set the Options of a ProductCategoryField?
Thank you,
Adrian
You must be logged in to post in the forum