<commit_before><?php

class Tritac_ChannelEngine_Helper_Feed extends Mage_Core_Helper_Abstract {
	
	private $helper;
	private $feedDir;
	private $stores;

	const ATTRIBUTES_LIMIT = 30;
	
	public function __construct()
	{
		$this->feedDir = Mage::getBaseDir('media') . DS . 'channelengine' . DS;
		$this->stores = [];
		$this->config = [];

		$this->helper = Mage::helper('channelengine');
		$this->stores = Mage::app()->getStores();
		$this->config = $this->helper->getConfig();
	}

	/**
	 * Generate products feed for ChannelEngine
	 */
	public function generateFeeds()
	{
		@set_time_limit(15 * 60);
		
		foreach($this->stores as $store)
		{
			$this->generateFeed($store, $categories);
		}

		return true;
	}

	public function generateFeed($store, $categoriesArray)
	{
		Mage::app()->setCurrentStore($store);<commit_msg>Apply catalog price rules by loading frontend area<commit_after><?php

class Tritac_ChannelEngine_Helper_Feed extends Mage_Core_Helper_Abstract {
	
	private $helper;
	private $feedDir;
	private $stores;

	const ATTRIBUTES_LIMIT = 30;
	
	public function __construct()
	{
		$this->feedDir = Mage::getBaseDir('media') . DS . 'channelengine' . DS;
		$this->stores = [];
		$this->config = [];

		$this->helper = Mage::helper('channelengine');
		$this->stores = Mage::app()->getStores();
		$this->config = $this->helper->getConfig();

		Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_FRONTEND, Mage_Core_Model_App_Area::PART_EVENTS);
	}

	/**
	 * Generate products feed for ChannelEngine
	 */
	public function generateFeeds()
	{
		@set_time_limit(15 * 60);
		
		foreach($this->stores as $store)
		{
			$this->generateFeed($store, $categories);
		}

		return true;
	}

	public function generateFeed($store, $categoriesArray)
	{
		Mage::app()->setCurrentStore($store);
{'fraction_non_alphanumeric': 0.1561628555493586, 'fraction_numerical': 0.006692693809258227, 'mean_word_length': 4.75, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4551368', 'n_tokens_mistral': 670, 'n_tokens_neox': 594, 'n_words': 112}