Price Fieldtypes

CartThrob comes bundled with three different price fieldtypes. Each fieldtype has its own method for determining the price of your product. You can create your own using the Price Fieldtype API.

Simple

The CartThrob Price - Simple fieldtype is a single field that stores the price of your product. It will show your default number format prefix (by default, $) as a prefix to your field. This field accepts numeric values using "." as the decimal point. Even if your locality normally uses "," as the separator between whole numbers and fractional amounts, you must use a "." as your separator when entering your price.

CartThrob Price - Simple

Quantity

The CartThrob Price - Quantity fieldtype allows you to create multiple prices which depend on the quantity being ordered.

CartThrob Price - Quantity

By Member Group

The CartThrob Price - By Member Group fieldtype allows you to create multiple prices which depend on the member group of the customer.

CartThrob Price - By Member Group

Price Fieldtype API

You can create your own CartThrob Price fieldtype by adding a cartthrob_price method to your fieldtype:

/**
 * @param $data The field data
 * @param $item The Cartthrob_item object
 */
public function cartthrob_price($data, $item = NULL)
{
    return $data;
}