Remove Address Formatting



  • 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?





  • Thanks, I’ll have a play



  • @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) preg_match(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) preg_match(Tools::cleanNonUnicodeSupport('/^[^!<>,;?=+()@#"°{}_$%:]*$/u'), stripslashes($name));


  • It would be nice if this were to flow into the core.


Log in to reply
 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.