yuxblank Posted August 5, 2017 Share Posted August 5, 2017 I want to change the behaviour for a store, in order to display a list of cities for the customer address (instead of an input text). Cities are stored in a custom table. Looks like prestashop 1.7.x is using Formatters class to produce a form. I need then to override the getFormat() method of CustomerAddressFormatterCore in order to fill the city list as a select and with a custom list. I tried to put the /form/classname class in overrides but doesn't seem to work. any idea on how to achieve this? Link to comment Share on other sites More sharing options...
nextpointer.gr Posted February 18, 2019 Share Posted February 18, 2019 copy the CustomerAddressFormatter from classes/form/CustomerAddressFormatter.php and paste this file into override/classes/form/ open with text editor the filename CustomerAddressFormatter.php from override folder and near line 30 change from class CustomerAddressFormatterCore implements FormFormatterInterface { } to class CustomerAddressFormatter extends CustomerAddressFormatterCore { } dont forget to clear cache from backoffice Link to comment Share on other sites More sharing options...
Shaimy Posted October 2, 2019 Share Posted October 2, 2019 Hello, I have a issue with override The change has been changed, you can see it on the front end (I added next to "Mobile Phone" (for the carrier)). However, it cannot be found in the Back Office to translate it into other languages. Maybe there's a problem with visibility (public/private) Thanks for your help CustomerAddressFormatter.php 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