user900 Posted March 31, 2021 Share Posted March 31, 2021 (edited) Hi guys, Im trying to remove some fields form the checkout page (specifically: postcode, city, address 2) First was a problem to remove the city field, I went to: International / Locations them I selected country and when I tried to remove the field "city" I couldn't, PrestaShop said the following message: "The city field (in tab Address) is required" So after some google, I found out I need to modify: classes/Address.php I commented the whole line 134 that said: 'city' => ['type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64], The problem persisted, and I still got the same message, so I edit the file classes/AddressFormat.php I commented the line 63 that said "city": /** @var array Default required form fields list */ public static $requireFormFieldsList = [ 'firstname', 'lastname', 'address1', // 'city', 'Country:name', ]; Now, I finally was available to remove the field. But the issue still persit. Let me explain my self: If you go to the checkout page, you can see the postal code and city field. But, when I select the country, everything looks like is supposed to look. Any idea? How can I do, so i can remove the postcode and the city field? Btw, my cache is off, but, I had cleaned my cache (in the performance page) and also I cleaned the cache on my browser. Also, I deleted this folder: /var/cache/prod/ Thanks guys I use Prestashop: 184.108.40.206 Edited March 31, 2021 by user900 (see edit history) Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now