VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: meysam66 on July 19, 2020, 14:30:24 PM

Title: reordering country-state fields issue
Post by: meysam66 on July 19, 2020, 14:30:24 PM
hello, i am using virtuemart 3.6
i like using virtuemart as my ecommerce solution but i have faced some issues with localization of virtuemart.
for example in my language and country, we should first define country, state, city then writing the address, but when i reorder these fields to my desired order at shopper fields.

all of those field get the "address nickname" phrase for their default value, and i get an error saying "vmError: Model Userfields, state with id address nickname not found"
so i have to make a default value for country and state fields which i think it doesn't seem to be a proper solution because user have to select the proper value of his own.

does anyone have a solution to reordering those field without having to make a default value for them.
Title: Re: reordering country-state fields issue
Post by: jjk on July 21, 2020, 21:52:04 PM
I think you need the latest version of VirtueMart and then go to the Shopper field list and enter ascending numbers for the published fields in the order you want to display them. Then click the small 'Save' button left of the ID button. You may try this with a single field first. If the field shows at a position too high in the form, increase the number and save again.
Title: Re: reordering country-state fields issue
Post by: meysam66 on July 22, 2020, 23:03:58 PM
dear fella, i have tried it with latest version 3.8 too, the problem still persists, i do the exact thing that you say, i put the country to order 30, state to 31, city 32, address 1 to 33, address 2 to 34 and zip code to 35 then save whole orders.
but then those field gets a wrong default value. and i get an error on orders billing print pages.

can you do the same thing without any problem?
Title: Re: reordering country-state fields issue
Post by: jjk on July 23, 2020, 20:06:01 PM
Does the error go away if you uncheck the 'Required' icon of the 'Address nickname' in the Shopper Field List?
Title: Re: reordering country-state fields issue
Post by: meysam66 on July 24, 2020, 00:10:21 AM
yes buddy it does, the solution was to unchecking the "required" then reordering those fields, then making them required again.

i was able to solve the issue with your answer, thanks alot  :)