HIde unnecessary countries on checkout page and cart address



  • Hello All,

    I want to display only one county on checkout page and customer address form.

    Also hide the Zip/Postal code for the same.

    Could you please guide us how to do it?



  • Hi, @Nayan7030,

    1. For countries, you need to check the countries table in the database.
    2. For zip/postal, there are two themes default and velocity. For velocity, you need to check in this file packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php and for default, you need to check this file packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php.
    3. Important note, you need to handle the validation part also because in backend postal code is required. So for that, just comment the line in the file i.e. packages/Webkul/Checkout/src/Http/Requests/CustomerAddressForm.php you don't require.

    After that you need to run php artisan vendor:publish --all --force. This will reflect all your changes to the resources folder. Before hitting this command I would suggest you take back up of resources folder first.



  • @devansh-webkul, Thank you so much for your quick help.


Log in to reply