Jurist Posted September 24, 2020 Share Posted September 24, 2020 Hello, We have a store where customer enters company and vat details during checkout and account opening (b2b option enabled). However immediately after that company field is empty, which means he needs to insert it again. Is there any way to automatically add company name to the new address? Link to comment Share on other sites More sharing options...
prestacoco Posted December 14, 2023 Share Posted December 14, 2023 Hello, i'm also interested by this feature. It would be handy if the company name was automatically copied. Link to comment Share on other sites More sharing options...
prestacoco Posted December 15, 2023 Share Posted December 15, 2023 Finally I overrode the CustomerAddressForm::getTemplateVariables() method public function getTemplateVariables() { $context = Context::getContext(); $tv = parent::getTemplateVariables(); $formFields = $tv['formFields']; if (empty($formFields['company']['value'])) { $formFields['company']['value'] = $context->customer->company; } return array( 'id_address' => (isset($this->address->id)) ? $this->address->id : 0, 'action' => $this->action, 'errors' => $this->getErrors(), 'formFields' => $formFields, ); } Link to comment Share on other sites More sharing options...
Nickz Posted December 15, 2023 Share Posted December 15, 2023 Don't you have any issues with fraudsters buying products of you? Link to comment Share on other sites More sharing options...
prestacoco Posted December 15, 2023 Share Posted December 15, 2023 13 minutes ago, Nickz said: Don't you have any issues with fraudsters buying products of you? Is this question related with the feature of copying company name from one field to another? Link to comment Share on other sites More sharing options...
Nickz Posted December 15, 2023 Share Posted December 15, 2023 (edited) 1 hour ago, prestacoco said: Is this question related with the feature of copying company name from one field to another? It is related to my enquiry about if you do not have troubles with fraudsters. Its a forum, a message board dedicated to people interchanging opinions, solving problems, problems which could could up also counts. . Edited December 15, 2023 by Nickz (see edit history) Link to comment Share on other sites More sharing options...
prestacoco Posted December 15, 2023 Share Posted December 15, 2023 1 minute ago, Nickz said: It is related to my enquiry about if you do not have troubles with fraudsters. Its a forum, a message board dedicated to people interchanging opinions, solving problems, problems which could could up also counts. . OK but it would be smarter to create your own topic. Link to comment Share on other sites More sharing options...
Nickz Posted December 15, 2023 Share Posted December 15, 2023 1 hour ago, prestacoco said: OK but it would be smarter to create your own topic. Would you answer? 😉 I'm pretty sure hardly anyone looks further than their issues when coming into this message board. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now