The Problem With User Input
By allowing customers to enter data into a textbox we open an array of problems. One of these problems show up in shipping requests. The shippers (UPS, FedEx, etc) require very specific information with state names, country codes, etc. By allowing the customer to type in the data we open the door for typos, incorrect abbreviations, and other such typographical errors.
When customers type data incorrectly they get frustrated and this hurts your sales. For this reason, a method of regulating input needs to exist.
(Note: A KB article with all the countries and states lists is available in the same category as this article.)
How Cart32 Solves The Problem
Cart32 allows you to create dropdown lists for any of your customers' checkout fields. You can make state, country, or anything else you want a dropdown list. By using dropdown lists you dictate which choices are available. For example, the customer can't enter USA for the shipping country when USPS is expecting to see US.
Creating A Dropdown With Cart32
Use the following steps to turn a field into a dropdown for the customer to choose from (we'll be making a US state dropdown in our example):
- Log into your Cart32 Administration
- Navigate to the Shopping Cart category-->Billing, Shipping and Checkout subcategory--> Shipping Information tab
- Click on the field name you wish to change in the listbox (in our example, State/Province)
- To change State/Province to a dropdown, we create a semi-colon separated list of options after the field name. In our case the field name is State/Province, so our text will be like so: State/Province;AL;AK;AR;AZ;CA;CO;CT;et cetera...
- Change the field labeled Type to Drop Down List
- Click Save
You're done! The option will now be a drop down. Two important notes:
- Make sure your billing and shipping fields match if you want to use the checkbox for Shipping info same as billing during checkout
- Any field can be a dropdown. You can use the steps above for country, zip code, or anything else you need
Displaying Different Options Than What Is Passed
We know how to make a dropdown list now, but the list of options may not always be understood. The classic example is country codes. Each shipper is particular about their country abbreviations. If, for example, you are using USPS you have to use US for United States. While US is pretty obvious to many, to others it may not be. Furthermore, the abbreviation has to be US, not U.S.
For this reason Cart32 allows you to display one value in the dropdown, but pass a different value to the shippers. The format is similar to our states example above; we'll use a semi-colon separated list of countries. However, after each country name we'll put a colon followed by the value we'd like to pass to the shippers. Here's how the string of countries would look:
Country;United States:US;Argentina:AN;Australia:AU;Belgium:BE;Brazil:BR;et cetera...
(Here is an example image of my test cart with these countries in it)