Skip to content

Commit c925d26

Browse files
Allowed "force enabling" of flat tables use for a product collection (#2954)
Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
1 parent 5ab1fd6 commit c925d26

File tree

1 file changed

+14
-0
lines changed
  • app/code/core/Mage/Catalog/Helper/Product

1 file changed

+14
-0
lines changed

app/code/core/Mage/Catalog/Helper/Product/Flat.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,20 @@ public function isAddChildData()
164164
return (int) Mage::getConfig()->getNode(self::XML_NODE_ADD_CHILD_DATA);
165165
}
166166

167+
/**
168+
* Enable Catalog Product Flat
169+
*
170+
* @param bool $save
171+
*/
172+
public function enableFlatCollection($save = false)
173+
{
174+
if ($save) {
175+
$this->_forceFlatStatusOld = $this->_forceFlatStatus;
176+
}
177+
178+
$this->_forceFlatStatus = false;
179+
}
180+
167181
/**
168182
* Disable Catalog Product Flat
169183
*

0 commit comments

Comments
 (0)