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?

1 Answer 1


You should be able to setup a product modifier field as a regular grid or matrix that allow counting the inventory of each item separately but don't make a difference on price, or are priced in the same way.

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!).

Is that helpful?

  • Yep, that's sorted things on both counts.
    – Tyssen
    Commented Jul 31, 2015 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.