PCAPredict/magento2

Unable to create order for non-UK address in Magento Admin

driskell opened this issue · 7 comments

Hi

With PCA Predict enabled, in Magento Admin when creating an order, it is impossible to select a non-UK country. It just switches back to UK.

What seems to happen is PCA Predict is configured to set a default country. So every time Magento calls loadArea to reload address areas due to a country change for example then PCA re-initializes on those forms and overwrites the country.

Is there a fix? I can see there is a JS option setCountryByIp but I'm unsure where to modify to do this and would prefer some help.

Jason

(On a side note - we see same on front-end when we checkout as non-UK address... the country field in delivery address flicks to United Kingdom when we reach the payment step, presumedly this is where Magento is bringing in the payment billing address form and so PCA predict is reloading - and it seemingly causes the shipping address country to get reset to United Kingdom and then Magento does it's thing and propagates that change through to the customer's data, meaning they can never checkout as non UK. Will raise another issue for this is needed.)

I managed to fix this by changing the PCA Predict settings under the Control tab.

I changed "Default country" from "Find country by visitor IP" to an actual country, in my case "United Kingdom".

Can this be changed in the extension to be the default when it sets everything up for you?

Thanks for this and apologies it's taken a while to get back to you. I'll revisit the best way to set the country field again, as we definitely don't want to be blocking people from selecting a different country than the one that has been auto-selected by using their IP address.

Hi @henrikvalve

Did you ever get to the bottom of this? I'm having the same issue.

We're experiencing this issue too but couldn't find where to set the default country away from by IP, can you advise?

UPDATE: Loqate have given us this custom code to add in Magento as their dashboard doesn't have this option at the moment

pca.on("options", function(type, id, options){
if (type == "capture+"){
options.setCountryByIP = false;
    };
});

We're experiencing this issue now too. It's been two years since this was initially logged and we had to discover this issue after loading our account with credit!! Can we please get this looked at.

Just in case anyone else comes to this page hoping to find a fix. We get this fixed by jumping on livechat with Loqate support and they make an update their end for us