VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: hazael on November 05, 2024, 00:36:22 AM

Title: List of countries in the form
Post by: hazael on November 05, 2024, 00:36:22 AM
I noticed that countries that are unpublished nevertheless show up on the registration form list or on the shopping cart page when filling out the shipping address

VirtueMart 4.2.18
Title: Re: List of countries in the form
Post by: iWim on November 05, 2024, 09:39:27 AM
I cannot confirm this.
In my installs only the published countries are listed.
Title: Re: List of countries in the form
Post by: hazael on November 05, 2024, 13:46:03 PM
Thanks for the information. You're right - it does work, but only for people who are not logged in.

I also have this problem in the admin panel. There is clearly some bug. look at the user edit in the admin panel - I have the same problem even though countries such as Afghanistan have been disabled
Title: Re: List of countries in the form
Post by: hazael on November 05, 2024, 22:27:14 PM
It seems that countries that are unpublished only display for the logged in vendor. I understand that this was intentional for some reason.  But this logic is nonsensical! After all, if a vendor hides certain countries in the store, it doesn't make sense for them to see them as a logged-in user in forms that are supposed to reflect what customers see. In addition, it makes it difficult to search for the right country in this long list for a rule to block or unblock a payment or shipping plugin.

Just comment on the fragment below in
administrator/components/com_virtuemart/models/userfields.php

                                //if($vmUserTable->user_is_vendor){
                                //    $attrib['unpublished'] = 1;
                                //}