Topic-icon Country field - Virtuemart

4 years 10 months ago #65446 by венген
Hello Team,

First I want to thank you for the wonderful component. I set everything up and registration works great with Facebook and Google.
But I have a problem that I hope you can help me.

I use a plugin that finds the user's country according to its IP and keeps this information for further processing. Thus, the unregistered user receives information whether the product can be sent to his or her country or not (as in Amazon).
Moreover, when he goes to the sign up page or the shopping cart, the country is auto-filled.
In any case, if the plugin does not make a connection, I have set the default country field (the country of the web site).

When the customer logs on to the site, of course, the state is taken from its account settings.

But when the customer registers through Facebook or Google, his profile does not receive country information. He does not even take the default settings from Virtuemart to a country. The country field is: Select Country.

Can you help me with this problem?
I can write to the plug-in maker, but probably will want some parameters from the component to add them to the plug-in.
Or is it possible for your component not to change the country field?

Thank you for your time!

Best regards,
Ventsislav
The topic has been locked.
4 years 10 months ago #65482 by венген
Does anyone have time to look at this topic?

Because I found another bug in the "Social Profiles - VirtueMart 2.x 3.x" plugin.
My site uses 2 languages.
When the plugin is active, the product names are displayed in the default language. Although the second language is chosen.
This is always the case in the cart (Tested with the default page of Virtutmart and template Protostar).
Or when using a filter (Custom Filters Pro).

If you remove the VmConfig::loadConfig(); from the virtuemart2.php (line 28), there is no problem.

Please help with these 2 issues.
The topic has been locked.
Support Specialist
4 years 10 months ago #65485 by alzander
Replied by alzander on topic Country field - Virtuemart
I'm so sorry for missing this post earlier.

First, for the country being set to "Select Country", the issue shouldn't be that JFBConnect is overwriting the country value set by your other plugin. JFBConnect won't set a profile field to anything specific unless we have a value to set there. So, we shouldn't be 'clearing' another value. The issue is more likely that the other plugin isn't triggering. That can be for a few reasons, like JFBConnect isn't calling the proper plugin trigger that would load that plugin.

Do you know how that plugin works? What step in the profile creation is it triggered on? Is it it a standard Joomla plugin, or is it a Virtuemart add-on that works only within Virtuemart? Any details you can provide will help us understand how best to help get things going.

If you remove the VmConfig::loadConfig(); from the virtuemart2.php (line 28), there is no problem.

That should be fine to remove that line of code. It will be called later during the actual profile import and only as needed. Calling it there is more of a sanity check to make sure that the Virtuemart settings can be loaded. Please try removing it and let us know if there are any issues that you experience. If not, we can remove that extra loadConfig call in the next release so it won't affect you anymore.

Thanks,
Alex
The topic has been locked.
4 years 10 months ago #65486 by венген
Hello Alex,

The plugin is free to download. It works very well. You can look here:
joomla.bypv.org/en/ip2c-detail

But as I wrote above, the component does not even take the default country from the Virtuemart settings.
If your component can get information from the plugin it will be perfect.

About VmConfig :: loadConfig ()
What is your advice? I have to remove only line 28 or the following:

if ($this->componentLoaded())
{
if (!class_exists('VmConfig'))
require(JPATH_ADMINISTRATOR . '/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();
}

Thank you and best regards,
Ventsislav
The topic has been locked.