We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can see that PropertyValues was depreciated for the CatalogProduct class in V3:
[Obsolete("it's for importing data from v.2, need to use values in Properties")] public ICollection<PropertyValue> PropertyValues { get; set; }
So what is the way to just add values to the product without necessary creating corresponding property?
The text was updated successfully, but these errors were encountered:
So to change a property value for the product you need to use the product.properties collection instead
product.properties
product.Properties.FirstOrDefault(x => x.Name.EqualsInvariant("color"))?.Values = new [] { new PropertyValue { Value = "foo" };
We need to add some better fluent syntax to do that from code, I'll create some task into our internal backlog.
Ween need to do it something like this
product.Properties["color"] = "foo"; product.Properties["some_array"] = new [] { "foo", "boo" }; product.Properties["some_dict"] = new PropertyDictionaryItem { ... } product.Properties["some_flag"] = true product.Properties["some_datetime"] = DateTime.UtcNow(); product.Properties["some_muti_lang"] = new LocalizedString { Lang = "en-US", Value = "red" }
Sorry, something went wrong.
tatarincev
No branches or pull requests
I can see that PropertyValues was depreciated for the CatalogProduct class in V3:
So what is the way to just add values to the product without necessary creating corresponding property?
The text was updated successfully, but these errors were encountered: