/** * @magentoConfigFixture global/catalog/product/flat/add_child_data 1 */ public function testIsAddChildData() { $this->assertEquals(1, $this->_helper->isAddChildData()); }
/** * Whether an attribute available for matching or not * * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute * @param Mage_Catalog_Helper_Product_Flat $productFlatHelper * @param bool $before * @return bool */ protected function _isAttributeEnabled($attribute, $productFlatHelper, $before = true) { $method = $before ? 'getOrigData' : 'getData'; return $attribute && ($attribute->{$method}('backend_type') == 'static' || $productFlatHelper->isAddFilterableAttributes() && $attribute->{$method}('is_filterable') > 0 || $attribute->{$method}('used_in_product_listing') == 1 || $attribute->{$method}('is_used_for_promo_rules') == 1 || $attribute->{$method}('used_for_sort_by') == 1); }