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/
I use Prestashop: 188.8.131.52