catalog - user defined attribute as a checkbox
Posted: Wed Jul 19, 2006 9:14 pm
Hi!
I am trying to convert a user defined attributte in the Catalkog module to display as a check box but am having trouble...
My Attribute is named special offer and I an trying the code below
This works in that it reads the value and changes the check box to true.. but when I uncheck and submit the values aren't updated.. it always stays as "on"... I am kind-off stumped and spent ages on trying to get ba simple check box updated!
Any ideas Greatly appreciated.
I am trying to convert a user defined attributte in the Catalkog module to display as a check box but am having trouble...
My Attribute is named special offer and I an trying the code below
Code: Select all
if($safeattr=="specialoffer"){
if (strtolower(htmlspecialchars($this->GetPropertyValue($thisAttr),ENT_QUOTES))=="on"){
$checked= ' checked="true"';
} else{
$checked= '';
}
array_push($ret,array($thisAttr,'<input type="checkbox" name="specialoffer" '.$checked.'>'));
}
Any ideas Greatly appreciated.