Jump to content

Adding a new Custom Adressfield


Recommended Posts

I wanna add a new cutom Adress field i can add under the national setting to different countries. I tryed this for over a week now and in my desperation I now come to you for help.

I tryed different Hooks like AdditionalCustomerFormFields or DisplayAdditionalCustomerAddressFields but nether of these are the solution i want.
I even tryed overriding the Address-Class and the AdminController but coudnt get it to work.

Please helpme, I would be very thankful.
Leo

Link to comment
Share on other sites

Okay finally figured it out.

 

    public function hookAdditionalCustomerAddressFields($params)
    {
        $field = new FormField();
        $field->setName('hype');
        $field->setType('text');
        $field->setLabel($this->l('HYPE_but_you_see_it'));

        $fields[] = $field;

        return $fields;
    }

when i found the right hook it was easy.

  • Thanks 1
Link to comment
Share on other sites

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...