# Using a grid/matrix field to set stock levels for different colours with CartThrob

I'm working on a fabric store where each entry for a type of fabric has multiple colours: each colour is the same price so I don't really need price modifiers, but they can have different stock levels.

How would I set this up using CT and Grid or Matrix?

Also, the error message that comes up when trying to order an item that doesn't have enough stock is:

There are just X remaining of item 'Y'…

but this site is selling some items which are measured in metres, some in pairs, and some in pieces and the client would like to be able to customise the error message to indicate the type, e.g. 20m of 'Y'. Is that possible?

For the message, you could do it one of two ways. One is that you could update the text in the various language files (third_party/cartthrob/language/english/cartthrob_lang.php and third_party/cartthrob/language/english/cartthrob_errors_lang.php) to be something that's more general and applies to all the products. Alternatively you could write an extension that fires on either CT's add to cart or ordering (or both) hooks that "understands" the product types a bit more and outputs the customized errors for each type. (We can help with this as well if you file a support request!).