Ejemplo n.º 1
0
    def _information(self):
        """
        """
        shop = IShopManagement(self.context).getShop()
        im = IInformationManagement(shop)

        pvm = IProductVariantsManagement(self.context)

        if pvm.hasVariants() == False:
            information = im.getInformationPagesFor(self.context)
        else:
            product_variant = pvm.getSelectedVariant()

            # First, we try to get information for the selected product variant
            information = im.getInformationPagesFor(product_variant)

            # If nothing is found, we try to get information for parent product
            # variants object.
            if information is None:
                information = im.getInformationPagesFor(self.context)

        return information
Ejemplo n.º 2
0
    def _information(self):
        """
        """
        shop = IShopManagement(self.context).getShop()
        im = IInformationManagement(shop)
        
        pvm = IProductVariantsManagement(self.context)
        
        if pvm.hasVariants() == False:
            information = im.getInformationPagesFor(self.context)
        else:
            product_variant = pvm.getSelectedVariant()

            # First, we try to get information for the selected product variant
            information = im.getInformationPagesFor(product_variant)

            # If nothing is found, we try to get information for parent product 
            # variants object.
            if information is None:
                information = im.getInformationPagesFor(self.context)
            
        return information