OfficeGroup Posted May 14 Share Posted May 14 Hi everyone, through a module I created I added two new fields to the Address class (fields added to the DB and to the Address class via an override of the module). I would need to display these two new fields in the Addresses grid located in the backoffice in the customer view. Can anyone tell me a hook to use or give me some suggestions? Let me start by saying that I was able to add other custom fields in the customer list (using hookActionCustomerGridDefinitionModifier and hookActionCustomerGridQueryBuilderModifier) but here it seems to me that the approach is different thank you Link to comment Share on other sites More sharing options...
Luisejo Posted May 21 Share Posted May 21 Hello! To display the two new fields in the Addresses grid in the backoffice customer view in PrestaShop, you will need to override specific hooks and modify the templates. Here's a general approach to achieve this: 1. Override the Address Class: Ensure you have already added the new fields to the Address class and database as you've mentioned. 2. Modify the Address Grid: You will need to use hooks related to the address grid. Specifically, you can use hookActionAdminAddressesListingFieldsModifier and hookActionAdminAddressesFormModifier. 3. Update the Template: Modify the backoffice template to include the new fields. If you need further customization or run into specific issues, let me know and we can try to work through the process step by step. Link to comment Share on other sites More sharing options...
OfficeGroup Posted May 23 Author Share Posted May 23 Thank you Luisejo for your suggestions. I modified my module to register and implement the hookActionAdminAddressesListingFieldsModifier hook After reinstalling the module I see it correctly hooked in positions However I see that the hook is not called either in the general address list or in the one within the customer card 1 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