diff --git a/lfs/catalog/models.py b/lfs/catalog/models.py index 6cb46eea7..05420c51e 100644 --- a/lfs/catalog/models.py +++ b/lfs/catalog/models.py @@ -1527,6 +1527,16 @@ def get_manufacturer(self): else: return self.manufacturer + def get_sku_manufacturer(self): + """ + Returns the manufacturer sku. Takes care whether the product is a + variant. + """ + if self.is_variant() + return self.parent.sku_manufacturer + else: + return self.sku_manufacturer + def has_related_products(self): """ Returns True if the product has related products.