Rupin L
Rupin L

Reputation: 51

E-Commerce Product Custom Field Kentico 10

I am using E-commerce module of Kentico portal and it has two fields for Products pricing : SKUPrice and SKURetailPrice.

I needed one more field to show sell price and I added a new field in Modules application of the portal.(Modules->E-Commerce->Classes->SKU->Fields->New Field)

Now, I need to access this field in my code,but SKUInfo class doesn't show me the newly added field.What I need to do so that the newly added field reflects in my project code ?

I have already build the entire solution multiple times.Any other solutions please.

Upvotes: 0

Views: 197

Answers (2)

Trevor F
Trevor F

Reputation: 1437

JanH has the answer for custom fields you set, also keep in mind though that there is a "SKUCustomData" for other information that you want to store. It takes a Name-Value pair dictionary if memory serves me correctly, and useful if you need to store configuration information or other things that won't be located on the normal SKU table.

Upvotes: 0

JanH
JanH

Reputation: 519

You can use GetValue and SetValue methods for such fields like this:

SKUInfo sku = ...;
string a = sku.GetValue("field").ToString();
sku.SetValue("field", "value");

Upvotes: 1

Related Questions