Template:Class Precedence
Template page
The product class will take precedence over all other classes. If the product doesn't have a class, then the customer class will be used. If the customer doesn't have a class, then the location group class will be used.