Skip to content

Add composer support #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Adminhtml_Log_View extends Mage_Adminhtml_Block_Widget_Grid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Adminhtml_Map_Additional extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
8 changes: 2 additions & 6 deletions app/code/community/Doofinder/Feed/Block/Banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Banner extends Mage_Core_Block_Template
Expand All @@ -33,11 +33,7 @@ public function _construct()
*/
public function getBanner()
{
$banner = $this->helper->getBanner();
if ($banner !== null) {
$this->helper->registerBannerDisplay($banner['id']);
}
return $banner;
return $this->helper->getBanner();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Doofinder/Feed/Block/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Integration extends Mage_Core_Block_Abstract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Buttons_Generate extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Buttons_ViewLog extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Doofinder/Feed/Block/Settings/Locks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Locks extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Panel_AtomicUpdates extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Panel_CronDescription extends Doofinder_Feed_Block_Settings_Panel_Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Panel_Datetime extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Panel_Description extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Panel_DynamicFeedUrl extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Panel_File extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Panel_LayerDescription extends Doofinder_Feed_Block_Settings_Panel_Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Block_Settings_Panel_Message extends Mage_Adminhtml_Block_System_Config_Form_Field
Expand Down
15 changes: 2 additions & 13 deletions app/code/community/Doofinder/Feed/Helper/Banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Helpers
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Data helper for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
class Doofinder_Feed_Helper_Banner extends Mage_Core_Helper_Abstract
Expand Down Expand Up @@ -46,17 +46,6 @@ public function getBanner()
return $banner;
}

/**
* Register Banner Display in Doofinder API.
*
* @param integer $bannerId
* @return void
*/
public function registerBannerDisplay($bannerId)
{
$this->searchHelper->getSearchClient()->registerBannerDisplay($bannerId);
}

/**
* Register Banner Click in Doofinder API.
*
Expand Down
4 changes: 2 additions & 2 deletions app/code/community/Doofinder/Feed/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Helpers
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Data helper for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
class Doofinder_Feed_Helper_Data extends Mage_Core_Helper_Abstract
Expand Down
4 changes: 2 additions & 2 deletions app/code/community/Doofinder/Feed/Helper/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Helpers
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Log helper for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
class Doofinder_Feed_Helper_Log extends Mage_Core_Helper_Abstract
Expand Down
10 changes: 10 additions & 0 deletions app/code/community/Doofinder/Feed/Helper/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Doofinder_Feed_Helper_Search extends Mage_Core_Helper_Abstract

protected $_lastSearch = null;
protected $_lastResults = null;
protected $_searchError = false;

/**
* @var \Doofinder\Api\Management\SearchEngine[]
Expand Down Expand Up @@ -70,6 +71,7 @@ public function performDoofinderSearch($queryText)
// @codingStandardsIgnoreEnd
} catch (\Doofinder\Api\Search\Error $e) {
$results = null;
$this->_searchError = true;
Mage::logException($e);
}

Expand All @@ -80,6 +82,14 @@ public function performDoofinderSearch($queryText)
return $results ? $this->retrieveIds($results) : array();
}

/**
* @return boolean
*/
public function getSearchError()
{
return $this->_searchError;
}

/**
* Retrieve ids from Doofinder Results
*
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Doofinder/Feed/Helper/Tax.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category Helpers
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Helper_Tax extends Mage_Tax_Helper_Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Model_Adminhtml_System_Config_Backend_Cron extends Mage_Core_Model_Config_Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ public function prepareResult($object, $queryText, $query)
return parent::prepareResult($object, $queryText, $query);
}

/** @var Doofinder_Feed_Helper_Search $helper */
$helper = Mage::helper('doofinder_feed/search');

// Fetch initial results
$results = $helper->performDoofinderSearch($queryText);
if ($helper->getSearchError()) {
return parent::prepareResult($object, $queryText, $query);
}

$adapter = $this->_getWriteAdapter();

Expand Down
4 changes: 2 additions & 2 deletions app/code/community/Doofinder/Feed/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Config model for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Config extends Mage_Core_Model_Config_Data
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Doofinder/Feed/Model/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Model_Cron extends Mage_Core_Model_Abstract
Expand Down
4 changes: 2 additions & 2 deletions app/code/community/Doofinder/Feed/Model/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Generator model for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
if (!defined('DS'))
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Doofinder/Feed/Model/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

class Doofinder_Feed_Model_Log extends Mage_Core_Model_Abstract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Abstract Product Map Model for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Abstract extends Varien_Object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Associated Product Map Model for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Associated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Bundle Product Map Model for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Bundle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
* @version 1.8.31
* @version 1.8.33
*/

/**
* Configurable Product Map Model for Doofinder Feed
*
* @version 1.8.31
* @version 1.8.33
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Configurable
Expand Down
Loading