Loading...
Blueprint

How To Remove The Company Field From The Checkout Page

Emilian F. Published on 09 September, 2014

There is no need to ask for a company name during the checkout process if your store sells directly to non-business customers. While the field is optional a better, cleaner choice is to remove it from the checkout form altogether. However, that is not currently possible. It is a built-in address field which means that it cannot be deleted from the control panel. The alternative is to use the Javascript code below to remove the field from the customer registration form.

Instructions

  1. Login to your control panel and navigate to Design -> Theme Files/Edit HTML & CSS and open the checkout_express.html file.

  2. Add the following code at the end of the file, right before the </body> tag:

    
    <script type="text/javascript">
    $(document).ajaxComplete(function(event, request, settings) {
    
    $(".FormContainer dt:contains('Company Name')").remove();
    $(".FormContainer #FormField_6").remove();
    $(".FormContainer #FormField_16").remove();
    
    });
    </script>
    
    

    The code should look like this:

  3. Press Save in the top left corner.

How It Works

The code automatically removes the company name form fields and the associated label text on the express checkout page from the billing and shipping addresses. This code will not work for the multi-page checkout.

Troubleshooting

If you added the code and the company field still shows ...then make sure you did not change the input field's label text from the control panel. The text has to be Company Name. If it is not then you have two options: the first is to change the :contains selector in the code above to match the modified label text. The second option is to change the label text back to Company Name from the control panel by going to Tools > Form Fields > Address Fields.

If you added the code and the label text is hidden but the input field still shows up...then you have most likely modified the address fields from the control panel. This means the input field selectors (#FormField_6 and #FormField_16) from the script no longer match up with the actual elements in the checkout page. The fix for this is more complicated, and will vary from store to store so I recommend contacting us to get it resolved.

Emilian F. Published on 09 September, 2014