I am trying to inherit the address from the customer in the quote (same as if one selects an account). Could somebody point me into the right direction on what I’m missing? I changed the AOS_Quotes/controller.php code in the the following way:
Maybe I didn’t explain it well enough. In the quote module, when you select the contact, I would like the shipping address to be filled with the contact’s address and not the accounts as it currently is. I attached a screenshot to this post to visualize this. Is the AOS_Quotes/controller.php not the correct place for this?
The fields just stay empty. If I select an account, the address is filled, but with a customer they stay empty. I also attached the whole controller.php from AOS_Quotes.
Does the first name and last name populate correctly?
Maybe this code only puts the data into the bean, maybe it needs to be made (some other place) to load the bean in to the screen fields. if you can find a place where it does that for the first name and last name, stored in $this->bean->billing_contact, then you can add the other fields there.
But I’m not sure you’ll find it, maybe a more generic mechanism is at work there…
I searched for hours, sadly no luck. I deleted every billing_contact one by one in the quote module php files, with various effects, however the field always filled (except when it was no longer present at all).
With more research I tried to populate it by adding the following to the viewdefs.php in the quotes module, however its not working either.