Jump to content
thirty bees forum
  • 0

Question

Posted

Is there a way to stop thirty bees altering the addresses when orders come in from marketplaces?

We get quite a lot of people, on Amazon in particular, who put the first line of their address in the name field by mistake. Because you are not allowed numbers in the name field, thirty bees removes these and we end up sending out the parcel without the house number so the delivery company has no idea where to deliver it to. The parcels then end up back with us.

Sometimes people also put special characters in the address like a slash or hashtag which also seem to get removed.

Basically, is there any way of stopping the addresses being changed at all when orders are imported into thirty bees?

5 answers to this question

Recommended Posts

  • 0
Posted

@spidawebs You could allow numbers in the name field by altering classes/Validate.php

If you look for this part

``` /** * Check for name validity * * @param string $name Name to validate * * @return bool Validity is ok or not * * @since 1.0.0 * @version 1.0.0 Initial version */ public static function isName($name) {

return (bool) pregmatch(Tools::cleanNonUnicodeSupport('/^[^0-9!<>,;?=+()@#"°{}$%:]*$/u'), stripslashes($name));

}

```

just remove 0-9 from the characters that are not allowed so that the line inside the function reads

``` return (bool) pregmatch(Tools::cleanNonUnicodeSupport('/^[^!<>,;?=+()@#"°{}$%:]*$/u'), stripslashes($name));

  • 0
Posted

@marci123 Thanks for your suggestion. I implemented this last week, but since I made the change it broke the API link to the despatch company we use to print our shipping labels and dispatch the orders. None of the orders were being marked as despatched in Prestashop.

So I had to put it back to how it was and now it is working again.

I have no idea why removing 0-9 should have this knock on effect, but is there any other way I can solve this problem without it causing other things to break?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...