Custom Address fields when building a quote

Alright so I could not use the normal address text fields in the accounts module. So I created new custom fields to replace the address, city, state, and added in a unit number. etc… so that works great. However now I also swapped out the fields on the quote builder and added in the same custom fields there. I then updated the cache file in the suiteP theme folder which uses JavaScript to inject the correct data from the new custom fields. However this cache file seems to keep getting reset which then wipes out my custom code. the file i edit is located here: cache\themes\SuiteP\modules\AOS_Quotes

How can i prevent this file form resetting? so my code stays.

Thank you!

You shouldn’t edit any files in the cache, no. Exactly which file are you editing?

The EditView.tpl specifically the button javascript code which places the customer account information from the pop up window in order to insert the correct custom address information I have. Which makes it so the user can click on the little arrow button and pull in the correct custom fields when building a quote for address, unit number, etc…

I think it’s coming from


if you can create an edited copy in


and it works, that would be great. Your customization would not only survive cache refreshes, but it would be upgrade-safe.

But if the file from “custom” dir doesn’t get picked up (not everything is customizable like that) then you will have to check after each upgrade.

ATTENTION: that’s a generic file for all modules; what you change there will affect all edit views, except if you use smarty conditionals.

hmm yeah so I did that and then reinsert my file into the cache but I won’t know if it works until a day or so goes by if it clears it out. But I wanted to see could there possibly be another way to pull in account info by re-creating this section in studio with a dropdown menu or something that populates the custom fields I want for billing and shipping? so that way I’m not doing these customization like this to the code itself?

hmm perhaps this might work?

The correct approach might be different, maybe customizing the SugarFields that handle addresses. I am not sure of this, but I think that would avoid a lot of these secondary challenges.

Follow this sample:

Thanks for the link! I was actually able to use the add on I mentioned earlier to map the fields from accounts to quotes and then I used a custom js file I created myself to include all my custom code.