Correctly retrieve product class for variant products

Variant products don't have an own product class but use that of their
parent product instead.