Overview
Custom Fields are a great tool for customizing your Cart.com stores to meet your company's needs. They allow you to save information about customers, orders, products, or save for use elsewhere in Cart.com stores. Here are just a few of the potential uses:
- Your company has multiple departments and must label orders for each department.
- You need to obtain a license/permit number from your customer.
- Your products have a unique number of connecting points that require a dedicated field.
Types of Custom Fields
The primary types of custom fields are for Customers, Orders, Products, and Stores, but custom fields can be used in other areas of Cart.com as well. The following are common use case examples for custom fields:
Customers
- You can request specific information when a customer creates an account with your store.
- The value will also be visible on the "Edit Customer" page in your admin console.
- Custom fields can be displayed in your customer emails by adding the following merge code to your template:
- ##CUSTOMERCUSTOMFIELD[FieldName]##
Orders
- When customers place an order, they'll be asked to provide this information.
- In your administration console, the value will be visible on the "View Order" page.
- To display this field in your order emails, add the following merge code to your template:##ORDERCUSTOMFIELD[FieldName]##
Products
- To assign a value to a product, open the Product Editor and click the "General" tab, then scroll down to the "Custom Fields" section.
- To display this field anywhere that product information is available, use the following merge code: ##PRODUCTCUSTOMFIELD[FieldName]##
Note: Product custom fields are usable only by Admin users and will not be visible to customers.
Stores
- To view or change the value for each store, navigate to Settings > Store Information > Store Custom Fields.
- Store Custom Fields cannot be displayed in other locations.
Note: Product custom fields are usable only by Admin users and will not be visible to customers.
Creating Custom Fields
The Custom Field Editor can be found by navigating to Storefront > Tools > Power Features > Custom Field Setup.
From here you can edit an existing custom field by clicking the Edit button, or create a new one by clicking the New button in the top right corner.
Creating a Custom Field
Clicking the New button will open the New Custom Field window, where all information relating to the custom field can be set.
The following are the settings for custom fields:
Field |
Description |
---|---|
Name |
The title of the custom field. Use a unique name for easy identification. |
Label |
Text that appears next to the field. Can be used as a short description or guidance. |
Field Type |
Custom fields can be set for Orders, Customers, Products, or Stores. |
Input Type |
Custom fields can be set for different input types to fit the context of the data. This affects how the field will be displayed. |
Field Width |
Determines the maximum length of the data that can be entered. This only affects custom fields of the String type. Entering “0” will disable this limit. |
Sort Order |
Controls the order in which each custom field is displayed. Fields with lower numbers appear first. This setting is optional. |
Private |
If set to private the field is only accessible to admin users. |
Required |
Determines if the field is required or optional. If marked as required, the custom field must be filled out for the user action to take place. String: Empty field triggers validation Integer: -999 or empty field triggers validation Boolean: false triggers validation Date fields: Empty field triggers validation |
Searchable |
Allows the data entered in this field to be used for Customer search in the admin console. For example a field labeled “Driver’s License #” is used during customer account creation, an admin can then search users by Driver’s License #. |
Show on Order Edit Page |
Determines if the field shows on the Order Edit Page. |
Show on One Page Checkout |
Determines if the field shows on the One Page Checkout page. |
Display Location |
Applicable to Order type custom fields. Changes the placement of the field on the page to either be in the Shipping Information panel, Billing Information panel, or Default. |
Read Only |
Restricts the places that this field can be written and can be set as Admin writable, API writable, not writable, or off. This disables validation of the field. |
When a new Custom Field is created you’ll see the following message at the top of the Custom Field edit window:
This message gives the mergecode for the custom field so that it can be used within your site.
Using Custom Fields
Custom fields can be used in numerous ways and here are some examples of how they’ve been used in the past.
Adding Custom Fields to an Email Template
Your Custom Fields can be added to your email templates through mergecodes.
For example you have a custom field titled “Pickup Date” for your orders.
To add the “Pick Up Date” to your order confirmation emails you will use the following mergecode:
##ORDERCUSTOMFIELD[PickUpDate]##
Uploading Files with Custom Fields
Custom Fields with “File Upload” input types work similarly to the other custom fields, but they allow users to upload files that can be attached to a customer, order, product, or store.
For example if your store does B2B sales and you receive orders in the form of purchase orders (POs) you can have a custom field titled “PO File Upload” where you can upload PDFs of customer POs and they would be saved to the Customer record.
The field would look like this:
After clicking 'Choose Files' and selecting a file to upload, hit the save button in the upper right-hand corner to save the customer record and initiate the upload. Once a file has been uploaded, a link to the file will appear, and you can also choose another file to upload if you wish.
To access any of these uploaded files through the file manager, navigate to Storefront > Content > Files and open the file manager. Once in the file manager, navigate to 'Shared Directory/customfields/Customers/[CustomerID]' Similarly, for orders, products, and stores, they each will have their own respective folders underneath 'Shared Directory/customfields' if files are uploaded.
Note: If there are no files for a Custom Field yet, the folder will not appear in the File Manager.
Note: Just like other custom fields, if you set the file upload custom field to private, it will only display in the admin. If it is not marked private, it will appear on the front-end of your site where other custom fields would. This allows customers to upload files to an order or to their customer account for example.