Skip to content

Commit

Permalink
Only sync active cms pages belonging to current store
Browse files Browse the repository at this point in the history
  • Loading branch information
RBech committed Jun 6, 2018
1 parent 5c3ab70 commit 35fdc24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ public function categoryAction()
}

if (Mage::getStoreConfigFlag('clerk/general/sync_cms_pages')) {
$pages = Mage::getModel('cms/page')->getCollection();
$pages = Mage::getModel('cms/page')
->getCollection()
->addFieldToFilter('is_active', '1')
->addStoreFilter(Mage::app()->getStore()->getId());

foreach ($pages as $page) {
$data = array(
Expand Down

0 comments on commit 35fdc24

Please sign in to comment.