VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Kuubs on February 21, 2025, 01:11:02 AM

Title: Ordering custom fields is not woorking on 4.4.6
Post by: Kuubs on February 21, 2025, 01:11:02 AM
See title. You cannot set the order of the custom fields anymore. It doesnt get saved.
Title: Re: Ordering custom fields is not woorking on 4.4.6
Post by: hazael on February 21, 2025, 15:08:58 PM
Has it ever had such a possibility?  ???
Title: Re: Ordering custom fields is not woorking on 4.4.6
Post by: Kuubs on March 06, 2025, 15:12:26 PM
Quote from: hazael on February 21, 2025, 15:08:58 PMHas it ever had such a possibility?  ???
Most definitely.
Title: Re: Ordering custom fields is not woorking on 4.4.6
Post by: waeron on March 08, 2025, 18:28:52 PM
I found an error. in the file customfields.php in administrator\components\com_virtuemart\models\ on line 1758

change

if(!empty($customfield->ordering)){

to

if(isset($customfield->ordering)){

caused by the fact that php empty() also takes zero as empty and each new inserted field has ordering 0 :/
Title: Re: Ordering custom fields is not woorking on 4.4.6
Post by: Kuubs on March 12, 2025, 14:33:20 PM
Thanks mate
Title: Re: Ordering custom fields is not woorking on 4.4.6
Post by: hazael on March 12, 2025, 22:21:45 PM
Acctually I don't need it, but as I remember well, someone already wrote about this problem once and it was solved exactly the same way. It's just strange that the Virtuemart authors don't read this forum to use user comments to fix these bugs :)