def getTitlesByIds(product, property_id, option_id): # TODO: This may not be the cleanest way. Rethink it. YAGNI? """A simple wrapper to get the variants options (global options) of a variant. In this way the adapter still works for local properties (price changing) of a variant, which may later used additional to the global ones. """ if IProductVariant.providedBy(product) == True: product = product.aq_inner.aq_parent pm = IPropertyManagement(product) return pm.getTitlesByIds(property_id, option_id)