Developer forum

Forum » Ecommerce - Standard features » Checkbox order field doesn't return boolean

Checkbox order field doesn't return boolean

Mafalda Correa
Mafalda Correa
Reply

Hi,

I have a custom order field (type checkbox) in my solution and I need to get the value of the field to change my Cart accordingly. However, when I try to get the value of the field as a boolean, it doesn't working (it returns false every time). As a work around I'm getting the value and comparing it with "yes" to get the true/false value. But since the order field is a checkbox shouldn't I be able to get a boolean? Or am I doing something wrong?

I recorded a video to better illustrate the problem: 

https://www.screencast.com/t/8rOkwffh6PW9

Regards


Replies

 
Viktor Letavin Dynamicweb Employee
Viktor Letavin
Reply

Hi,

Can you please instead of

GetBoolean()

try 

Dynamicweb.Core.Converter.ToBoolean(GetValue("IsBillHoldRelease"))

BR,Viktor.

 

You must be logged in to post in the forum