/** * Prepare simple select by given parameters * * @param mixed $table * @param string $fields * @param array | string $where * @return string */ protected function _getSimpleSelect($table, $fields, $where = null) { $_where = array(); if (!is_null($where)) { if (is_array($where)) { $_where = $where; } else { $_where[] = $where; } } $likeOptions = array('position' => 'any'); if ($this->getEvent()->getCode() !== 'rollback') { $itemXmlConfig = $this->getConfig(); if ($itemXmlConfig->ignore_nodes) { foreach ($itemXmlConfig->ignore_nodes->children() as $node) { $path = (string) $node->path; /* $helper Mage_Core_Model_Resource_Helper_Abstract */ $helper = Mage::getResourceHelper('core'); $_where[] = 'path NOT LIKE ' . $helper->addLikeEscape($path, $likeOptions); } } } $select = parent::_getSimpleSelect($table, $fields, $_where); return $select; }
/** * Create item table and records, run processes in website and store scopes * * @param string $entityName * @return Enterprise_Staging_Model_Resource_Adapter_Item_Category */ protected function _createItem($entityName) { if (!$this->getStaging()->getMapperInstance()->hasStagingItem('product')) { if (strpos($entityName, 'product') !== false) { return $this; } } return parent::_createItem($entityName); }