How to deal with an attribute including a lot of character or factor values when using caret package in R
Yeah, some (not all) libraries have that numeric input limitation.

What you're looking for is called "one-hot encoding" which can basically convert an N level factor like your product categories to N binary columns. Here is a post describing a few ways of doing that:

https://discuss.analyticsvidhya.com/t/how-to-do-one-hot-encoding-in-r/6982/5