View Product Page

Checkout fields

Checkout fields

In the tab Checkout Fields, you can edit the checkout-related fields.

These fields are divided into three subcategories:

  • “Billing Fields” – Allows you to edit the “Billing” fields.
  • “Shipping Fields” – Allows you to edit the “Shipping” fields.
  • “Additional Fields” – Allows you to edit additional fields such as customer notes.

Editing existing fields

The default WooCommerce fields cannot be deleted but only disabled. You can still edit them by clicking on the “Edit” button that you will find in each field.

In this form, you will find:

  • “Label” – Choose the title related to a specific field.
  • “Placeholder” – Choose the text shown to customers within the field.
  • “Tooltip” – (This field only shows if you have chosen to “Enable Tooltip” in the “Settings” page). Choose the text that will be displayed in the field tooltip.
  • “Position” – Choose the position of the field based on the line in which it’s inserted. “First” to set it on the left, “Last” to set it on the right, and “Wide” if you want it to take up the whole line space.
  • “Class” – Allows you to set graphical CSS rules related to the field.
  • “Label Class” – Allows you to set graphical CSS rules related to the label.
  • “Validation” – Choose whether the field requires any kind of validation since it may require information such as phone number, VAT, country, email, or zip code.

At the bottom of this panel you will find two checkboxes:

  • “Required” – Set field as required.
  • “Clear Row” – For the fields to work correctly, when a field is entered as First (in Position) and followed by the Last field, this second field needs to have the Clear Row option checked.

Create a new field

Add field

On the same page, you will also find the option to create new fields by entering the name and clicking on Add Field.

The newly created form will have the same features as the editing form, with a few extra fields:

Add new field - form
  • “Type” – Allows you to choose the type of the field you are going to create: text, number, password, phone, textarea, radio button, checkbox, select (dropdown), multi-select, date, time, and heading.
  • “Display in emails” – Choose whether to display the field you are creating in the order email or not.
  • “Display in Order detail pages” – Choose whether to display the field you are creating on the summary page or not.

Conditional fields

Do you want to show the checkout fields with conditional logic? And so, make sure that only if a condition is met, a specific field will appear? Or that a specific field in shown only if one or more specific products are in the cart? Now, you can!

Whenever you set up a new field, you will be able to set up if it has to be linked to any other field in the checkout and what has been selected in it.

How to?

You can simply set up this in the field that will be shown or hidden conditionally, in the last section:

Conditional fields

Here, you can set the following options:

  • Field: select the field that will work as a condition. As a condition you can also check the cart contents, so select either Products in cart or one of the existing checkout fields.
  • Condition: select the condition for the field to show. You can select one among the following:
    • Is set
    • Is empty
    • Value is
    • Value is not
    • All selected products in cart
    • At least one selected product in cart
    • All selected categories in cart
    • At least one selected category in cart
  • Value: enter the value of the field to trigger the conditional behavior. Please note that if the condition regards products or categories, you should enter here the product/category IDs separated by commas.
  • Action: choose whether to show or hide the current field if the condition is fulfilled.
  • Required: check if the current field has to be set as Required only if the condition is fulfilled. Make sure the default Required value (above) is not checked, otherwise, this setting will not take effect.
  • More conditions: you can set up more than one condition for the same field. Simply click on the + (plus) sign to add more or on the X to remove some.

Let’s give a couple of examples to show how to set up a conditional field.

Example 1. Required VAT for Company billing

You want to let users choose between Private and Company billing. Only if they choose Company, you will show a required VAT field, otherwise, the field won’t show.

How to set it up?

Go to YITH > Checkout Manager > Checkout fields and create a radio-button field where your customers can choose if they are Private or Company and save.

Then, create another field where the user can enter the VAT number. This field has to appear only if Company has been selected first. So, configure it like this:

  • Field: select the above-created field: Are you purchasing as a private or company?
  • Condition: Value is
  • Value: Company
  • Action: show
  • Required: checked

Example 2. Products in cart

You might want to offer free wrapping for products belonging to a specific category only, which can be optionally checked by the user in checkout.

To do that, you can configure the condition like this:

Where Value is the category ID (T-shirts category ID is 18)