Shopperfields gather user input
Usually a shopper must provide data to be able to buy, pay, and retrieve the goods. Most shops need different forms according to the country, language, cultural habits, and items being sold.
VirtueMart provides different types of shopperfields and the possibilty to extend them by plugins.
Any shopperfield can be set to required and the views in which they should be displayed can be selected.
Shopperfield defaults can be set. In case of the country or state field, it is possible to use an id for the default. When the shopper sees the user input field - the default value will be shown. Shoppers can still change this if required.
The userfield "custom" allows you to create customised shopperfields, which use as the layout file the name of the shopperfield. For example, the shopperfield tos, uses the layout file tos.php in /components/com_virtuemart/sublayouts
Technical background
Shopperfields are handled as rows in the "userfields" table, and create columns in the userinfo and order_userinfo tables.
Adding and deleting shopperfields
If you add a new shopperfield with the name "xyz", a new column "xyz" is created in the releavnt tables (userinfo and order_userinfo).
Because these tables keep sensitive user information, deleting a shopperfield does not remove the column in the tables as data would be lost as a result, instead the column field is renamed.
Any accidently added shopperfield with already existing name should be renamed. This should prevent the worst case problems
Note: Working on the shopperfields must be done with caution.
Sample Shopper field list.