We compute the basic parameters (dimension, length, minimum distance) of affine evaluation codes defined on a cartesian product of finite sets. Given a sequence of positive integers, we construct an evaluation code, over a degenerate torus, with prescribed parameters. As an application of our results, we recover the formulas for the minimum distance of various families of evaluation codes.