Product perfect codes have been proven to enhance the performance of the F5 steganographic method, whereas perfect Z2Z4-linear codes have been recently introduced as an efficient way to embed data, conforming to the +/-1-steganography. In this paper, we present two steganographic methods. On the one hand, a generalization of product perfect codes is made. On the other hand, this generalization is applied to perfect Z2Z4-linear codes. Finally, the performance of the proposed methods is evaluated and compared with those of the aforementioned schemes.