Hello!
I have customfield type string. I need put in this field numbers, including zero. All OK, but zero does not saves in database - if i reopen product, this field has nothing. Even if i make new customfield, type text, same thing happening - zero does not saves in database, field empty after saving product...
Hi, you need to check for strlen
Change
if (!empty($selected['comment'])) {
to
if (strlen($selected['comment'])) {
I tested it on my own plugin, i have do the same mistake in my enhanced textinput plugin.
But how make STRING customfield to work with zero?
Hello
Somehow this type understands the digit zero as no input. I am not sure that this is intended. Could You insert the Word ZERO instead ?
Or are You using the field for calculations ?
regards
Jörgen @ Kreativ Fotografi
I have products with parameters and this parameters i use in CustomFilters. And i need parameter 0 (zero) for filtering products. I cant use o (letter) because in filters where all parameters are numbers goes this o (letter) to bottom of number list...
Have you try -1 ?
-1 works, -0 works too, but 0 does not
OK, zero is not number and i can nothing to do?
use another char, eg - or + that are before 0 in the ascii table should ordering correctly