Version Notes
[+TASK] removed documentation from module
[~TASK] Updated FF PHP framework
[~TASK] Replaced magic __call method with explicit implementations.
[+BUGFIX] avoid strict notice, because of static member access in non static way.
[+BUGFIX] Added default value for ffversion config value.
[+BUGFIX] Fixed segmentation fault - Assoc array was given to DB select. We need only the keys.
[+BUGFIX] Fixed TODO: Used constants insteat of hard coded values for visibility
[+BUGFIX] Removed unused $productIndexes variable
[+BUGFIX] Fix for "undefined" in suggestions
[+BUGFIX] make scic also work with urls that have appended parameters
Download this release
Release Info
Developer | Magento Core Team |
Extension | Flagbit_Factfinder |
Version | 3.4.7 |
Comparing to | |
See all releases |
Code changes from version 3.4.6 to 3.4.7
- app/code/community/Flagbit/FactFinder/Block/Layer.php +4 -5
- app/code/community/Flagbit/FactFinder/Helper/Search.php +3 -3
- app/code/community/Flagbit/FactFinder/Model/Export/Product.php +8 -3
- app/code/community/Flagbit/FactFinder/Model/Facade.php +101 -76
- app/code/community/Flagbit/FactFinder/Model/Observer.php +10 -1
- app/code/community/Flagbit/FactFinder/controllers/ExportController.php +8 -3
- app/code/community/Flagbit/FactFinder/documentation/Installation_FACT-Finder_Magento_de.pdf +0 -0
- app/code/community/Flagbit/FactFinder/documentation/Installation_FACT-Finder_Magento_en.pdf +0 -0
- app/code/community/Flagbit/FactFinder/etc/config.xml +8 -2
- app/design/frontend/base/default/template/factfinder/campaign/product/advisory.phtml +13 -0
- app/design/frontend/base/default/template/factfinder/campaign/product/feedback.phtml +7 -0
- app/design/frontend/base/default/template/factfinder/form.advancedsuggest.phtml +64 -64
- js/factfinder/scic.js +1 -1
- js/factfinder/suggest.js +167 -167
- lib/FACTFinder/Abstract/CompareAdapter.php +0 -96
- lib/FACTFinder/Abstract/ProductCampaignAdapter.php +0 -107
- lib/FACTFinder/Abstract/RecommendationAdapter.php +0 -111
- lib/FACTFinder/Abstract/SimilarRecordsAdapter.php +0 -128
- lib/FACTFinder/Curl.php +99 -0
- lib/FACTFinder/CurlHandle.php +8 -0
- lib/FACTFinder/CurlInterface.php +25 -0
- lib/FACTFinder/CurlStub.php +379 -0
- lib/FACTFinder/Default/CompareAdapter.php +105 -0
- lib/FACTFinder/{Abstract → Default}/ImportAdapter.php +20 -16
- lib/FACTFinder/Default/ProductCampaignAdapter.php +114 -0
- lib/FACTFinder/Default/RecommendationAdapter.php +115 -0
- lib/FACTFinder/{Abstract → Default}/ScicAdapter.php +10 -6
- lib/FACTFinder/{Abstract → Default}/SearchAdapter.php +100 -48
- lib/FACTFinder/Default/SimilarRecordsAdapter.php +137 -0
- lib/FACTFinder/{Abstract → Default}/SuggestAdapter.php +10 -6
- lib/FACTFinder/{Abstract → Default}/TagCloudAdapter.php +10 -6
- lib/FACTFinder/Http/DataProvider.php +22 -9
- lib/FACTFinder/Http/ParallelDataProvider.php +12 -1
- lib/FACTFinder/Http/ScicAdapter.php +1 -1
- lib/FACTFinder/Http/SuggestAdapter.php +1 -1
- lib/FACTFinder/Loader.php +11 -4
- lib/FACTFinder/Util.php +1 -1
- lib/FACTFinder/Xml65/ImportAdapter.php +1 -1
- lib/FACTFinder/Xml65/RecommendationAdapter.php +1 -1
- lib/FACTFinder/Xml65/SearchAdapter.php +2 -7
- lib/FACTFinder/Xml65/TagCloudAdapter.php +1 -1
- lib/FACTFinder/Xml66/CompareAdapter.php +2 -2
- lib/FACTFinder/Xml66/SimilarRecordsAdapter.php +1 -1
- lib/FACTFinder/Xml67/ProductCampaignAdapter.php +1 -1
- lib/FACTFinder/Xml67/SearchAdapter.php +4 -2
- package.xml +14 -7
app/code/community/Flagbit/FactFinder/Block/Layer.php
CHANGED
@@ -38,15 +38,14 @@ class Flagbit_FactFinder_Block_Layer extends Flagbit_FactFinder_Block_Layer_Abst
|
|
38 |
$this->_searchHandler = Mage::getSingleton('factfinder/handler_search');
|
39 |
$this->_usesAsn = Mage::helper('factfinder/search')->getIsEnabled(false, 'asn');
|
40 |
|
41 |
-
if(!$this->_usesAsn){
|
42 |
-
return parent::_prepareLayout();
|
43 |
-
}
|
44 |
-
|
45 |
// Make this block globally known so that initializeAfterSearchNavigation can be called on this instance
|
46 |
// when the controller_action_layout_generate_blocks_after event is fired
|
47 |
Mage::register(Flagbit_FactFinder_Model_Observer::_asnBlockRegistryKey, $this);
|
48 |
|
49 |
-
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
public function handleCampaignRedirect()
|
38 |
$this->_searchHandler = Mage::getSingleton('factfinder/handler_search');
|
39 |
$this->_usesAsn = Mage::helper('factfinder/search')->getIsEnabled(false, 'asn');
|
40 |
|
|
|
|
|
|
|
|
|
41 |
// Make this block globally known so that initializeAfterSearchNavigation can be called on this instance
|
42 |
// when the controller_action_layout_generate_blocks_after event is fired
|
43 |
Mage::register(Flagbit_FactFinder_Model_Observer::_asnBlockRegistryKey, $this);
|
44 |
|
45 |
+
// Same for handling campaign redirects
|
46 |
+
Mage::register(Flagbit_FactFinder_Model_Observer::_campaignRedirectRegistryKey, $this);
|
47 |
+
|
48 |
+
return parent::_prepareLayout();
|
49 |
}
|
50 |
|
51 |
public function handleCampaignRedirect()
|
app/code/community/Flagbit/FactFinder/Helper/Search.php
CHANGED
@@ -108,14 +108,14 @@ class Flagbit_FactFinder_Helper_Search extends Mage_Core_Helper_Abstract {
|
|
108 |
|
109 |
protected function _enableFallback($delay)
|
110 |
{
|
111 |
-
|
112 |
$nextRetryTimestamp = intval(time() / 60) + $delay;
|
113 |
Mage::app()->saveCache($nextRetryTimestamp, $this->_getCacheId('nextRetryTimestamp'), array(self::CACHE_TAG));
|
114 |
}
|
115 |
|
116 |
protected function _disableFallback()
|
117 |
{
|
118 |
-
|
119 |
$nextRetryTimestamp = 0;
|
120 |
Mage::app()->saveCache($nextRetryTimestamp, $this->_getCacheId('nextRetryTimestamp'), array(self::CACHE_TAG));
|
121 |
}
|
@@ -413,4 +413,4 @@ class Flagbit_FactFinder_Helper_Search extends Mage_Core_Helper_Abstract {
|
|
413 |
{
|
414 |
return Mage::helper('catalogsearch')->getQueryText();
|
415 |
}
|
416 |
-
}
|
108 |
|
109 |
protected function _enableFallback($delay)
|
110 |
{
|
111 |
+
self::$_skipFactFinder = true;
|
112 |
$nextRetryTimestamp = intval(time() / 60) + $delay;
|
113 |
Mage::app()->saveCache($nextRetryTimestamp, $this->_getCacheId('nextRetryTimestamp'), array(self::CACHE_TAG));
|
114 |
}
|
115 |
|
116 |
protected function _disableFallback()
|
117 |
{
|
118 |
+
self::$_skipFactFinder = false;
|
119 |
$nextRetryTimestamp = 0;
|
120 |
Mage::app()->saveCache($nextRetryTimestamp, $this->_getCacheId('nextRetryTimestamp'), array(self::CACHE_TAG));
|
121 |
}
|
413 |
{
|
414 |
return Mage::helper('catalogsearch')->getQueryText();
|
415 |
}
|
416 |
+
}
|
app/code/community/Flagbit/FactFinder/Model/Export/Product.php
CHANGED
@@ -195,8 +195,7 @@ class Flagbit_FactFinder_Model_Export_Product extends Mage_CatalogSearch_Model_M
|
|
195 |
}
|
196 |
}
|
197 |
|
198 |
-
$
|
199 |
-
$productAttributes = $this->_getProductAttributes($storeId, $productAttributes, $dynamicFields);
|
200 |
foreach ($products as $productData) {
|
201 |
if (!isset($productAttributes[$productData['entity_id']])) {
|
202 |
continue;
|
@@ -436,7 +435,13 @@ class Flagbit_FactFinder_Model_Export_Product extends Mage_CatalogSearch_Model_M
|
|
436 |
null
|
437 |
)
|
438 |
->columns(array('e.path' => new Zend_Db_Expr('GROUP_CONCAT(e.path)')))
|
439 |
-
->where(
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
->where('main.store_id = ?', $storeId)
|
441 |
->where('e.path LIKE \'1/' . Mage::app()->getStore()->getRootCategoryId() .'/%\'')
|
442 |
->group('main.product_id');
|
195 |
}
|
196 |
}
|
197 |
|
198 |
+
$productAttributes = $this->_getProductAttributes($storeId, array_keys($productAttributes), $dynamicFields);
|
|
|
199 |
foreach ($products as $productData) {
|
200 |
if (!isset($productAttributes[$productData['entity_id']])) {
|
201 |
continue;
|
435 |
null
|
436 |
)
|
437 |
->columns(array('e.path' => new Zend_Db_Expr('GROUP_CONCAT(e.path)')))
|
438 |
+
->where(
|
439 |
+
'main.visibility IN(?)',
|
440 |
+
array(
|
441 |
+
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_SEARCH,
|
442 |
+
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH
|
443 |
+
)
|
444 |
+
)
|
445 |
->where('main.store_id = ?', $storeId)
|
446 |
->where('e.path LIKE \'1/' . Mage::app()->getStore()->getRootCategoryId() .'/%\'')
|
447 |
->group('main.product_id');
|
app/code/community/Flagbit/FactFinder/Model/Facade.php
CHANGED
@@ -65,98 +65,112 @@ class Flagbit_FactFinder_Model_Facade
|
|
65 |
FF::setLogger($arg);
|
66 |
$this->_logger = $arg;
|
67 |
}
|
68 |
-
|
69 |
-
|
70 |
-
* Used to allow and delegate generic methods.
|
71 |
-
* Valid signatures:
|
72 |
-
*
|
73 |
-
* @method FACTFinder_Abstract_<$type>Adapter get<$type>Adapter($channel = null, $id = null)
|
74 |
-
* get adapter class from the factfinder library; this is not recommended, but some cases this might be necessary.
|
75 |
-
*
|
76 |
-
* @method null configure<$type>Adapter(array $params, $channel = null, $id = null)
|
77 |
-
* @param array $params the parameters which should be set
|
78 |
-
* set parameters for the specified adapter
|
79 |
-
*
|
80 |
-
* this applies to both kind of methods:
|
81 |
-
* - the (correct) implementation of the specified adapter will be determined automatically, depending on configuration and which adapters acutally exit
|
82 |
-
* - $type will be fetched out of the method name, so for example for the call "getSearchAdapter" $type is "search"
|
83 |
-
* - this are the two last (optional) accepted parameters:
|
84 |
-
* @param string $channel the factfinder channel which should be requested by this adapter. if channel is null, the primary channel from the configuration is used [default: null]
|
85 |
-
* @param string $id optional id to enable multiple adapters of the same type and for the same channel [default: null]
|
86 |
-
*
|
87 |
-
* @param string $function
|
88 |
-
* @param array $arguments
|
89 |
-
* @return FACTFinder_Abstract_Adapter|null depending on which type is called
|
90 |
-
* @throws Exception if such an adapter does not exist or an non-existing method is called
|
91 |
-
*/
|
92 |
-
public function __call($function, $arguments)
|
93 |
{
|
94 |
-
$
|
95 |
-
|
96 |
-
$channelArgPos = 0;
|
97 |
-
if (preg_match('/^get(.+)Adapter$/', $function, $matches))
|
98 |
-
{
|
99 |
-
// We have a get______Adapter($channel = null, $id = null) method!
|
100 |
-
$channelArgPos = 0; // The first argument (if any) will be treated as a channel
|
101 |
-
$idArgPos = 1; // The second argument (if any) will be treated as $id
|
102 |
-
}
|
103 |
-
elseif (preg_match('/^configure(.+)Adapter$/', $function, $matches))
|
104 |
-
{
|
105 |
-
// We have a configure_____Adapter(array $params, $channel = null, $id = null) method!
|
106 |
-
$configureAdapter = true;
|
107 |
-
// The first argument (if any) will be treated as an array of params as key-value pairs
|
108 |
-
$channelArgPos = 1; // The second argument (if any) will be treated as a channel
|
109 |
-
$idArgPos = 2; // The third argument (if any) will be treated as $id
|
110 |
-
}
|
111 |
-
else
|
112 |
-
{
|
113 |
-
throw new Exception("Call to undefined method ".$function."() in file ".__FILE__." on line ".__LINE__);
|
114 |
-
}
|
115 |
|
116 |
-
|
117 |
-
|
|
|
|
|
118 |
|
119 |
-
|
|
|
|
|
|
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
$adapter = $this->_getAdapter($format, $type, $channel, $id);
|
130 |
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
{
|
140 |
-
return $adapter;
|
141 |
-
}
|
142 |
}
|
143 |
|
144 |
-
|
145 |
{
|
146 |
-
$
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
|
155 |
/**
|
156 |
* @return FACTFinder_Abstract_Adapter
|
157 |
*/
|
158 |
-
protected function _getAdapter($
|
159 |
{
|
|
|
|
|
160 |
if(!$id)
|
161 |
$id = '';
|
162 |
if(!$channel)
|
@@ -180,6 +194,17 @@ class Flagbit_FactFinder_Model_Facade
|
|
180 |
return $this->_adapters[$hashKey][$channel];
|
181 |
}
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
public function configureStatusHelper($channel = null)
|
184 |
{
|
185 |
if(!$channel)
|
65 |
FF::setLogger($arg);
|
66 |
$this->_logger = $arg;
|
67 |
}
|
68 |
+
|
69 |
+
public function getSearchAdapter($channel = null)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
{
|
71 |
+
return $this->_getAdapter("search", $channel);
|
72 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
public function getScicAdapter($channel = null)
|
75 |
+
{
|
76 |
+
return $this->_getAdapter("scic", $channel);
|
77 |
+
}
|
78 |
|
79 |
+
public function getSuggestAdapter($channel = null)
|
80 |
+
{
|
81 |
+
return $this->_getAdapter("suggest", $channel);
|
82 |
+
}
|
83 |
|
84 |
+
public function getRecommendationAdapter($channel = null)
|
85 |
+
{
|
86 |
+
return $this->_getAdapter("recommendation", $channel);
|
87 |
+
}
|
88 |
|
89 |
+
public function getTagCloudAdapter($channel = null)
|
90 |
+
{
|
91 |
+
return $this->_getAdapter("tagCloud", $channel);
|
92 |
+
}
|
|
|
93 |
|
94 |
+
public function getCompareAdapter($channel = null)
|
95 |
+
{
|
96 |
+
return $this->_getAdapter("compare", $channel);
|
97 |
+
}
|
98 |
|
99 |
+
public function getImportAdapter($channel = null)
|
100 |
+
{
|
101 |
+
return $this->_getAdapter("import", $channel);
|
|
|
|
|
|
|
102 |
}
|
103 |
|
104 |
+
public function getProductCampaignAdapter($channel = null)
|
105 |
{
|
106 |
+
return $this->_getAdapter("productCampaign", $channel);
|
107 |
+
}
|
108 |
+
|
109 |
+
public function getSimilarRecordsAdapter($channel = null)
|
110 |
+
{
|
111 |
+
return $this->_getAdapter("similarRecords", $channel);
|
112 |
+
}
|
113 |
+
|
114 |
+
public function configureSearchAdapter($params, $channel = null, $id = null)
|
115 |
+
{
|
116 |
+
$this->_configureAdapter($params, "search", $channel, $id);
|
117 |
+
}
|
118 |
+
|
119 |
+
public function configureScicAdapter($params, $channel = null, $id = null)
|
120 |
+
{
|
121 |
+
$this->_configureAdapter($params, "scic", $channel, $id);
|
122 |
+
}
|
123 |
+
|
124 |
+
public function configureSuggestAdapter($params, $channel = null, $id = null)
|
125 |
+
{
|
126 |
+
$this->_configureAdapter($params, "suggest", $channel, $id);
|
127 |
+
}
|
128 |
+
|
129 |
+
public function configureRecommendationAdapter($params, $channel = null, $id = null)
|
130 |
+
{
|
131 |
+
$this->_configureAdapter($params, "recommendation", $channel, $id);
|
132 |
+
}
|
133 |
+
|
134 |
+
public function configureTagCloudAdapter($params, $channel = null, $id = null)
|
135 |
+
{
|
136 |
+
$this->_configureAdapter($params, "tagCloud", $channel, $id);
|
137 |
+
}
|
138 |
+
|
139 |
+
public function configureCompareAdapter($params, $channel = null, $id = null)
|
140 |
+
{
|
141 |
+
$this->_configureAdapter($params, "compare", $channel, $id);
|
142 |
+
}
|
143 |
+
|
144 |
+
public function configureImportAdapter($params, $channel = null, $id = null)
|
145 |
+
{
|
146 |
+
$this->_configureAdapter($params, "import", $channel, $id);
|
147 |
+
}
|
148 |
+
|
149 |
+
public function configureProductCampaignAdapter($params, $channel = null, $id = null)
|
150 |
+
{
|
151 |
+
$this->_configureAdapter($params, "productCampaign", $channel, $id);
|
152 |
+
}
|
153 |
+
|
154 |
+
public function configureSimilarRecordsAdapter($params, $channel = null, $id = null)
|
155 |
+
{
|
156 |
+
$this->_configureAdapter($params, "similarRecords", $channel, $id);
|
157 |
+
}
|
158 |
+
|
159 |
+
protected function _configureAdapter($params, $type, $channel = null, $id = null)
|
160 |
+
{
|
161 |
+
$adapter = $this->_getAdapter($type, $channel, $id);
|
162 |
+
|
163 |
+
foreach($params as $key => $value)
|
164 |
+
$adapter->setParam($key, $value);
|
165 |
}
|
166 |
|
167 |
/**
|
168 |
* @return FACTFinder_Abstract_Adapter
|
169 |
*/
|
170 |
+
protected function _getAdapter($type, $channel = null, $id = null)
|
171 |
{
|
172 |
+
$format = $this->_getFormat($type);
|
173 |
+
|
174 |
if(!$id)
|
175 |
$id = '';
|
176 |
if(!$channel)
|
194 |
return $this->_adapters[$hashKey][$channel];
|
195 |
}
|
196 |
|
197 |
+
protected function _getFormat($type)
|
198 |
+
{
|
199 |
+
$format = 'http';
|
200 |
+
if ($type != 'scic' && $type != 'suggest') {
|
201 |
+
$version = $this->_getConfiguration()->getFactFinderVersion();
|
202 |
+
$format = 'xml' . $version;
|
203 |
+
return $format;
|
204 |
+
}
|
205 |
+
return $format;
|
206 |
+
}
|
207 |
+
|
208 |
public function configureStatusHelper($channel = null)
|
209 |
{
|
210 |
if(!$channel)
|
app/code/community/Flagbit/FactFinder/Model/Observer.php
CHANGED
@@ -21,6 +21,7 @@
|
|
21 |
class Flagbit_FactFinder_Model_Observer
|
22 |
{
|
23 |
const _asnBlockRegistryKey = 'FACTFINDER__asnBlock';
|
|
|
24 |
|
25 |
/**
|
26 |
* Observer method.
|
@@ -339,8 +340,16 @@ class Flagbit_FactFinder_Model_Observer
|
|
339 |
$asnBlock = Mage::registry(self::_asnBlockRegistryKey);
|
340 |
if($asnBlock instanceof Flagbit_FactFinder_Block_Layer)
|
341 |
{
|
342 |
-
$asnBlock->handleCampaignRedirect();
|
343 |
$asnBlock->initializeAfterSearchNavigation();
|
344 |
}
|
345 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
}
|
21 |
class Flagbit_FactFinder_Model_Observer
|
22 |
{
|
23 |
const _asnBlockRegistryKey = 'FACTFINDER__asnBlock';
|
24 |
+
const _campaignRedirectRegistryKey = 'FACTFINDER__campaignRedirectBlock';
|
25 |
|
26 |
/**
|
27 |
* Observer method.
|
340 |
$asnBlock = Mage::registry(self::_asnBlockRegistryKey);
|
341 |
if($asnBlock instanceof Flagbit_FactFinder_Block_Layer)
|
342 |
{
|
|
|
343 |
$asnBlock->initializeAfterSearchNavigation();
|
344 |
}
|
345 |
}
|
346 |
+
|
347 |
+
public function handleCampaignRedirect()
|
348 |
+
{
|
349 |
+
$redirectBlock = Mage::registry(self::_campaignRedirectRegistryKey);
|
350 |
+
if($redirectBlock instanceof Flagbit_FactFinder_Block_Layer)
|
351 |
+
{
|
352 |
+
$redirectBlock->handleCampaignRedirect();
|
353 |
+
}
|
354 |
+
}
|
355 |
}
|
app/code/community/Flagbit/FactFinder/controllers/ExportController.php
CHANGED
@@ -118,12 +118,12 @@ class Flagbit_FactFinder_ExportController extends Mage_Core_Controller_Front_Act
|
|
118 |
**/
|
119 |
protected function lockSemaphore()
|
120 |
{
|
121 |
-
$mtime = @filemtime(
|
122 |
if($mtime && time() - $mtime < FF::getSingleton('configuration')->getSemaphoreTimeout())
|
123 |
{
|
124 |
throw new RuntimeException();
|
125 |
}
|
126 |
-
@touch(
|
127 |
}
|
128 |
|
129 |
/**
|
@@ -131,6 +131,11 @@ class Flagbit_FactFinder_ExportController extends Mage_Core_Controller_Front_Act
|
|
131 |
**/
|
132 |
protected function releaseSemaphore()
|
133 |
{
|
134 |
-
@unlink(
|
135 |
}
|
|
|
|
|
|
|
|
|
|
|
136 |
}
|
118 |
**/
|
119 |
protected function lockSemaphore()
|
120 |
{
|
121 |
+
$mtime = @filemtime($this->_getLockFileName());
|
122 |
if($mtime && time() - $mtime < FF::getSingleton('configuration')->getSemaphoreTimeout())
|
123 |
{
|
124 |
throw new RuntimeException();
|
125 |
}
|
126 |
+
@touch($this->_getLockFileName());
|
127 |
}
|
128 |
|
129 |
/**
|
131 |
**/
|
132 |
protected function releaseSemaphore()
|
133 |
{
|
134 |
+
@unlink($this->_getLockFileName());
|
135 |
}
|
136 |
+
|
137 |
+
protected function _getLockFileName()
|
138 |
+
{
|
139 |
+
return "ffexport_".$this->_getStoreId().".lock";
|
140 |
+
}
|
141 |
}
|
app/code/community/Flagbit/FactFinder/documentation/Installation_FACT-Finder_Magento_de.pdf
DELETED
Binary file
|
app/code/community/Flagbit/FactFinder/documentation/Installation_FACT-Finder_Magento_en.pdf
DELETED
Binary file
|
app/code/community/Flagbit/FactFinder/etc/config.xml
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
<modules>
|
23 |
<Flagbit_FactFinder>
|
24 |
<active>true</active>
|
25 |
-
<version>3.4.
|
26 |
</Flagbit_FactFinder>
|
27 |
</modules>
|
28 |
<global>
|
@@ -156,6 +156,10 @@
|
|
156 |
</controller_action_layout_load_before>
|
157 |
<controller_action_layout_generate_blocks_after>
|
158 |
<observers>
|
|
|
|
|
|
|
|
|
159 |
<initializeAfterSearchNavigation>
|
160 |
<class>factfinder/observer</class>
|
161 |
<method>initializeAfterSearchNavigation</method>
|
@@ -250,7 +254,7 @@
|
|
250 |
</search>
|
251 |
</catalog>
|
252 |
<factfinder>
|
253 |
-
<version>3.4.
|
254 |
<revision>$Rev: 25896 $</revision>
|
255 |
<debug>true</debug>
|
256 |
|
@@ -261,6 +265,8 @@
|
|
261 |
<port>8080</port>
|
262 |
<protocol>http</protocol> <!-- possible values: http, https -->
|
263 |
|
|
|
|
|
264 |
<auth_user>client</auth_user>
|
265 |
<auth_password></auth_password>
|
266 |
<auth_type>advanced</auth_type> <!-- possible values: http (for FF <= 6.4); simple | advanced (for FF >= 6.5)-->
|
22 |
<modules>
|
23 |
<Flagbit_FactFinder>
|
24 |
<active>true</active>
|
25 |
+
<version>3.4.7</version>
|
26 |
</Flagbit_FactFinder>
|
27 |
</modules>
|
28 |
<global>
|
156 |
</controller_action_layout_load_before>
|
157 |
<controller_action_layout_generate_blocks_after>
|
158 |
<observers>
|
159 |
+
<handleCampaignRedirect>
|
160 |
+
<class>factfinder/observer</class>
|
161 |
+
<method>handleCampaignRedirect</method>
|
162 |
+
</handleCampaignRedirect>
|
163 |
<initializeAfterSearchNavigation>
|
164 |
<class>factfinder/observer</class>
|
165 |
<method>initializeAfterSearchNavigation</method>
|
254 |
</search>
|
255 |
</catalog>
|
256 |
<factfinder>
|
257 |
+
<version>3.4.7</version>
|
258 |
<revision>$Rev: 25896 $</revision>
|
259 |
<debug>true</debug>
|
260 |
|
265 |
<port>8080</port>
|
266 |
<protocol>http</protocol> <!-- possible values: http, https -->
|
267 |
|
268 |
+
<ffversion>66</ffversion>
|
269 |
+
|
270 |
<auth_user>client</auth_user>
|
271 |
<auth_password></auth_password>
|
272 |
<auth_type>advanced</auth_type> <!-- possible values: http (for FF <= 6.4); simple | advanced (for FF >= 6.5)-->
|
app/design/frontend/base/default/template/factfinder/campaign/product/advisory.phtml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- ff product advisory template -->
|
2 |
+
<?php if ($questions = $this->getActiveQuestions()): ?>
|
3 |
+
<?php foreach ($questions as $question): ?>
|
4 |
+
<div class="factfinder-advisorCampaign">
|
5 |
+
<p class="factfinder-advisorCampaign-question"><?php echo $question->getText() ?></p>
|
6 |
+
<p>
|
7 |
+
<?php foreach ($question->getAnswers() as $answer): ?>
|
8 |
+
<a class="factfinder-advisorCampaign-answer" href="<?php echo $answer->getParams() ?>"><?php echo $answer->getText() ?></a>
|
9 |
+
<?php endforeach; ?>
|
10 |
+
</p>
|
11 |
+
</div>
|
12 |
+
<?php endforeach; ?>
|
13 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/factfinder/campaign/product/feedback.phtml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- ff product feedback -->
|
2 |
+
<?php if ($feedback = $this->getActiveFeedback()): ?>
|
3 |
+
<?php $feedbackIds = array(0,1); ?>
|
4 |
+
<?php foreach ($feedbackIds as $feedbackId): ?>
|
5 |
+
<p class="factfinder-feedbackCampaign"><?php echo $feedback->getFeedback($feedbackId) ?></p>
|
6 |
+
<?php endforeach; ?>
|
7 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/factfinder/form.advancedsuggest.phtml
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
/**
|
11 |
* Advanced Template to replace Javascript Suggest
|
12 |
* NOTICE: This template will only work if suggests are requested from the proxy (see option in section "FACT-Finder Config Data" in Magento's backend)!
|
13 |
-
*
|
14 |
* @category Mage
|
15 |
* @package Flagbit_FactFinder
|
16 |
* @copyright Copyright (c) 2010 Flagbit GmbH & Co. KG (http://www.flagbit.de/)
|
@@ -26,72 +26,72 @@
|
|
26 |
<button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
|
27 |
<div id="search_autocomplete" class="search-autocomplete advanced-suggest"></div>
|
28 |
<script type="text/javascript">
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
}
|
62 |
-
currentChannel = data[0].channel;
|
63 |
}
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
90 |
<?php else:?>
|
91 |
-
|
92 |
-
|
93 |
<?php endif;?>
|
94 |
-
|
95 |
</script>
|
96 |
</div>
|
97 |
</form>
|
10 |
/**
|
11 |
* Advanced Template to replace Javascript Suggest
|
12 |
* NOTICE: This template will only work if suggests are requested from the proxy (see option in section "FACT-Finder Config Data" in Magento's backend)!
|
13 |
+
*
|
14 |
* @category Mage
|
15 |
* @package Flagbit_FactFinder
|
16 |
* @copyright Copyright (c) 2010 Flagbit GmbH & Co. KG (http://www.flagbit.de/)
|
26 |
<button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
|
27 |
<div id="search_autocomplete" class="search-autocomplete advanced-suggest"></div>
|
28 |
<script type="text/javascript">
|
29 |
+
//<![CDATA[
|
30 |
+
<?php if (Mage::helper('factfinder/search')->getIsEnabled(false, 'suggest')):?>
|
31 |
+
|
32 |
+
var loadDataCallback = function(data) {
|
33 |
+
// Internationalization lookup:
|
34 |
+
// Add a new anonymous object for every string you want to internationalize (with the property being the string).
|
35 |
+
// These objects consist of one string for each locale, where the property is the locale code.
|
36 |
+
var i18n = {
|
37 |
+
<?php
|
38 |
+
$channels = array_filter(explode(';', Mage::getStoreConfig('factfinder/search/secondary_channels')));
|
39 |
+
$output = array();
|
40 |
+
foreach($channels as $channel)
|
41 |
+
$output[] = '"Channel: '.$channel.'" : "'.$this->__('Channel: '.$channel).'"';
|
42 |
+
echo implode(',', $output);
|
43 |
+
?>
|
44 |
+
};
|
45 |
+
var translate = function(string) {
|
46 |
+
if(i18n[string] == undefined)
|
47 |
+
return string;
|
48 |
+
else
|
49 |
+
return i18n[string];
|
50 |
+
}
|
51 |
+
|
52 |
+
var content = '<ul>';
|
53 |
+
content += '<li style="display: none" class="selected selectable-item"></li>';
|
54 |
+
var currentChannel = '';
|
55 |
+
<?php if (Mage::helper('factfinder/search')->isSuggestProxyActivated()): ?>
|
56 |
+
if(data.length) {
|
57 |
+
if(data[0].channel == '<?php echo Mage::getStoreConfig('factfinder/search/channel'); ?>') {
|
58 |
+
content += '<li class="delimiter"><?php echo $this->__('Products'); ?></li>';
|
59 |
+
} else {
|
60 |
+
content += '<li class="delimiter">' + translate('Channel: ' + data[0].channel) + '</li>';
|
|
|
|
|
61 |
}
|
62 |
+
currentChannel = data[0].channel;
|
63 |
+
}
|
64 |
+
<?php endif; ?>
|
65 |
+
|
66 |
+
for(var i = 0; i < data.length; i++) {
|
67 |
+
var item = data[i];
|
68 |
+
if(item.channel != undefined && item.channel != currentChannel)
|
69 |
+
{
|
70 |
+
content += '<li class="delimiter">' + translate('Channel: ' + item.channel) + '</li>';
|
71 |
+
currentChannel = item.channel;
|
72 |
+
}
|
73 |
+
var temp = '';
|
74 |
+
temp += '<li title="' + (item.query ? item.query : item.name) + '" class="selectable-item ' + item.type + '">';
|
75 |
+
temp += '<span class="amount">' + (item.hitCount == 0 ? '' : item.hitCount) + '</span>';
|
76 |
+
if(item.imageURL)
|
77 |
+
{
|
78 |
+
temp += '<img src="' + item.imageURL + '" title="' + (item.query ? item.query : item.name) + '" class="thumbnail"/>';
|
79 |
+
}
|
80 |
+
temp += item.query ? item.query : item.name;
|
81 |
+
temp += '</li>';
|
82 |
+
content += temp;
|
83 |
+
}
|
84 |
+
content += '</ul>';
|
85 |
+
return content;
|
86 |
+
};
|
87 |
+
|
88 |
+
var searchForm = new FactFinderSuggest('search_mini_form', 'search', '<?php echo $this->__('Search entire shop here...') ?>', loadDataCallback);
|
89 |
+
searchForm.initAutocomplete('<?php echo $this->helper('factfinder/search')->getSuggestUrl() ?>', 'search_autocomplete');
|
90 |
<?php else:?>
|
91 |
+
var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->__('Search entire shop here...') ?>');
|
92 |
+
searchForm.initAutocomplete('<?php echo $this->helper('catalogsearch')->getSuggestUrl() ?>', 'search_autocomplete');
|
93 |
<?php endif;?>
|
94 |
+
//]]>
|
95 |
</script>
|
96 |
</div>
|
97 |
</form>
|
js/factfinder/scic.js
CHANGED
@@ -18,7 +18,7 @@ var FactfinderSCIC = Class.create({
|
|
18 |
init: function() {
|
19 |
$$(this.classname+' a',this.classname+' button').each(function(element) {
|
20 |
this.mapping.each(function(pair, index) {
|
21 |
-
if(element.readAttribute('href') && element.readAttribute('href')
|
22 |
return this.prepareElement(element, pair.value, 'click');
|
23 |
}
|
24 |
if(element.readAttribute('onclick') && element.readAttribute('onclick').indexOf(pair.key) >= 0){
|
18 |
init: function() {
|
19 |
$$(this.classname+' a',this.classname+' button').each(function(element) {
|
20 |
this.mapping.each(function(pair, index) {
|
21 |
+
if(element.readAttribute('href') && element.readAttribute('href').indexOf(pair.key) >= 0){
|
22 |
return this.prepareElement(element, pair.value, 'click');
|
23 |
}
|
24 |
if(element.readAttribute('onclick') && element.readAttribute('onclick').indexOf(pair.key) >= 0){
|
js/factfinder/suggest.js
CHANGED
@@ -1,195 +1,195 @@
|
|
1 |
var FactFinderAjax = {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
|
6 |
-
|
7 |
};
|
8 |
|
9 |
FactFinderAjax.Response = Class.create(Ajax.Response, {
|
10 |
-
|
11 |
-
initialize: function(request){
|
12 |
-
this.request = request;
|
13 |
-
var transport = this.transport = request.transport,
|
14 |
-
readyState = this.readyState = transport.readyState;
|
15 |
-
|
16 |
-
if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
|
17 |
-
this.status = this.getStatus();
|
18 |
-
this.statusText = this.getStatusText();
|
19 |
-
this.responseText = String.interpret(transport.responseText);
|
20 |
-
this.headerJSON = this._getHeaderJSON();
|
21 |
-
}
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
28 |
-
}
|
29 |
});
|
30 |
|
31 |
FactFinderAjax.Request = Class.create(Ajax.Request, {
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
request: function(url) {
|
58 |
-
this.url = url;
|
59 |
-
this.method = this.options.method;
|
60 |
-
var params = Object.clone(this.options.parameters);
|
61 |
-
|
62 |
-
if (!['get', 'post'].include(this.method)) {
|
63 |
-
// simulate other verbs over post
|
64 |
-
params['_method'] = this.method;
|
65 |
-
this.method = 'post';
|
66 |
-
}
|
67 |
|
68 |
-
|
|
|
|
|
|
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
params += '&_=';
|
76 |
-
}
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
83 |
|
84 |
-
|
85 |
-
this.options.asynchronous);
|
86 |
|
87 |
-
|
|
|
|
|
88 |
|
89 |
-
|
90 |
-
|
91 |
|
92 |
-
|
93 |
-
this.transport.send(this.body);
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
this.onStateChange();
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
-
catch (e) {
|
101 |
-
this.dispatchException(e);
|
102 |
-
}
|
103 |
-
},
|
104 |
-
|
105 |
-
isSameOrigin: function() {
|
106 |
-
var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
|
107 |
-
return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
|
108 |
-
protocol: location.protocol,
|
109 |
-
domain: document.domain,
|
110 |
-
port: location.port ? ':' + location.port : ''
|
111 |
-
}));
|
112 |
-
}
|
113 |
});
|
114 |
|
115 |
-
var FactFinderAutocompleter = Class.create(Ajax.Autocompleter, {
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
})
|
168 |
|
169 |
var FactFinderSuggest = Class.create(Varien.searchForm, {
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
initAutocomplete : function(url, destinationElement){
|
180 |
-
|
181 |
this.field,
|
182 |
destinationElement,
|
183 |
url,
|
184 |
{
|
185 |
-
|
186 |
paramName: 'query',
|
187 |
method: 'get',
|
188 |
minChars: 2,
|
189 |
updateElement: this._selectAutocompleteItem.bind(this),
|
190 |
onShow : function(element, update) {
|
191 |
if(!update.style.position || update.style.position=='absolute') {
|
192 |
-
|
193 |
Position.clone(element, update, {
|
194 |
setHeight: false,
|
195 |
offsetTop: element.offsetHeight
|
@@ -197,27 +197,27 @@ var FactFinderSuggest = Class.create(Varien.searchForm, {
|
|
197 |
}
|
198 |
Effect.Appear(update,{duration:0});
|
199 |
}
|
200 |
-
|
201 |
-
|
202 |
}
|
203 |
);
|
204 |
-
|
|
|
|
|
|
|
|
|
205 |
},
|
206 |
-
|
207 |
-
_loadData: function(data) {
|
208 |
-
this.request.updateChoices(this.loadDataCallback(data));
|
209 |
-
},
|
210 |
|
211 |
_selectAutocompleteItem : function(element){
|
212 |
if(element.attributes.rel) {
|
213 |
document.location.href = element.attributes.rel.nodeValue;
|
214 |
} else if(element.title) {
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
this.field.value = element.title;
|
219 |
-
|
220 |
-
|
221 |
}
|
222 |
}
|
223 |
});
|
1 |
var FactFinderAjax = {
|
2 |
+
getTransport: function() {
|
3 |
+
return new jXHR();
|
4 |
+
},
|
5 |
|
6 |
+
activeRequestCount: 0
|
7 |
};
|
8 |
|
9 |
FactFinderAjax.Response = Class.create(Ajax.Response, {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
initialize: function(request){
|
12 |
+
this.request = request;
|
13 |
+
var transport = this.transport = request.transport,
|
14 |
+
readyState = this.readyState = transport.readyState;
|
15 |
+
|
16 |
+
if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
|
17 |
+
this.status = this.getStatus();
|
18 |
+
this.statusText = this.getStatusText();
|
19 |
+
this.responseText = String.interpret(transport.responseText);
|
20 |
+
this.headerJSON = this._getHeaderJSON();
|
21 |
+
}
|
22 |
+
|
23 |
+
if(readyState == 4) {
|
24 |
+
var xml = transport.responseXML;
|
25 |
+
this.responseXML = Object.isUndefined(xml) ? null : xml;
|
26 |
+
this.responseJSON = this._getResponseJSON();
|
27 |
+
}
|
28 |
}
|
|
|
29 |
});
|
30 |
|
31 |
FactFinderAjax.Request = Class.create(Ajax.Request, {
|
32 |
+
_complete: false,
|
33 |
+
|
34 |
+
initialize: function(url, options) {
|
35 |
+
this.options = {
|
36 |
+
method: 'get',
|
37 |
+
asynchronous: true,
|
38 |
+
contentType: 'application/x-www-form-urlencoded',
|
39 |
+
encoding: 'UTF-8',
|
40 |
+
parameters: '',
|
41 |
+
evalJSON: true,
|
42 |
+
evalJS: true
|
43 |
+
};
|
44 |
+
Object.extend(this.options, options || { });
|
45 |
+
|
46 |
+
this.options.method = this.options.method.toLowerCase();
|
47 |
+
|
48 |
+
if (Object.isString(this.options.parameters))
|
49 |
+
this.options.parameters = this.options.parameters.toQueryParams();
|
50 |
+
else if (Object.isHash(this.options.parameters))
|
51 |
+
this.options.parameters = this.options.parameters.toObject();
|
52 |
+
|
53 |
+
this.transport = FactFinderAjax.getTransport();
|
54 |
+
this.request(url);
|
55 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
request: function(url) {
|
58 |
+
this.url = url;
|
59 |
+
this.method = this.options.method;
|
60 |
+
var params = Object.clone(this.options.parameters);
|
61 |
|
62 |
+
if (!['get', 'post'].include(this.method)) {
|
63 |
+
// simulate other verbs over post
|
64 |
+
params['_method'] = this.method;
|
65 |
+
this.method = 'post';
|
66 |
+
}
|
|
|
|
|
67 |
|
68 |
+
this.parameters = params;
|
69 |
|
70 |
+
if (params = Object.toQueryString(params)) {
|
71 |
+
// when GET, append parameters to URL
|
72 |
+
if (this.method == 'get')
|
73 |
+
this.url += (this.url.include('?') ? '&' : '?') + params + '&jquery_callback=?&callback=?';
|
74 |
+
else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
|
75 |
+
params += '&_=';
|
76 |
+
}
|
77 |
|
78 |
+
try {
|
|
|
79 |
|
80 |
+
var response = new FactFinderAjax.Response(this);
|
81 |
+
if (this.options.onCreate) this.options.onCreate(response);
|
82 |
+
Ajax.Responders.dispatch('onCreate', this, response);
|
83 |
|
84 |
+
this.transport.open(this.method.toUpperCase(), this.url,
|
85 |
+
this.options.asynchronous);
|
86 |
|
87 |
+
if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
|
|
|
88 |
|
89 |
+
this.transport.onreadystatechange = this.onStateChange.bind(this);
|
90 |
+
this.setRequestHeaders();
|
|
|
91 |
|
92 |
+
this.body = this.method == 'post' ? (this.options.postBody || params) : null;
|
93 |
+
this.transport.send(this.body);
|
94 |
+
|
95 |
+
/* Force Firefox to handle ready state 4 for synchronous requests */
|
96 |
+
if (!this.options.asynchronous && this.transport.overrideMimeType)
|
97 |
+
this.onStateChange();
|
98 |
+
|
99 |
+
}
|
100 |
+
catch (e) {
|
101 |
+
this.dispatchException(e);
|
102 |
+
}
|
103 |
+
},
|
104 |
+
|
105 |
+
isSameOrigin: function() {
|
106 |
+
var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
|
107 |
+
return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
|
108 |
+
protocol: location.protocol,
|
109 |
+
domain: document.domain,
|
110 |
+
port: location.port ? ':' + location.port : ''
|
111 |
+
}));
|
112 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
});
|
114 |
|
115 |
+
var FactFinderAutocompleter = Class.create(Ajax.Autocompleter, {
|
116 |
+
caller: null,
|
117 |
+
rq: null,
|
118 |
+
getUpdatedChoices: function() {
|
119 |
+
this.startIndicator();
|
120 |
+
|
121 |
+
var entry = encodeURIComponent(this.options.paramName) + '=' +
|
122 |
+
encodeURIComponent(this.getToken());
|
123 |
+
|
124 |
+
this.options.parameters = this.options.callback ?
|
125 |
+
this.options.callback(this.element, entry) : entry;
|
126 |
+
|
127 |
+
if(this.options.defaultParams)
|
128 |
+
this.options.parameters += '&' + this.options.defaultParams;
|
129 |
+
|
130 |
+
this.rq = new FactFinderAjax.Request(this.url, this.options);
|
131 |
+
this.rq.transport.onreadystatechange = this.caller._loadData.bind(this.caller);
|
132 |
+
},
|
133 |
+
|
134 |
+
updateChoices: function(choices) {
|
135 |
+
if(!this.changed && this.hasFocus) {
|
136 |
+
this.update.innerHTML = choices;
|
137 |
+
Element.cleanWhitespace(this.update);
|
138 |
+
Element.cleanWhitespace(this.update.down());
|
139 |
+
|
140 |
+
if(this.update.firstChild && this.update.select('.selectable-item')) {
|
141 |
+
this.entryCount =
|
142 |
+
this.update.select('.selectable-item').length;
|
143 |
+
for (var i = 0; i < this.entryCount; i++) {
|
144 |
+
var entry = this.getEntry(i);
|
145 |
+
entry.autocompleteIndex = i;
|
146 |
+
this.addObservers(entry);
|
147 |
+
}
|
148 |
+
} else {
|
149 |
+
this.entryCount = 0;
|
150 |
+
}
|
151 |
+
|
152 |
+
this.stopIndicator();
|
153 |
+
this.index = 0;
|
154 |
+
|
155 |
+
if(this.entryCount==1 && this.options.autoSelect) {
|
156 |
+
this.selectEntry();
|
157 |
+
this.hide();
|
158 |
+
} else {
|
159 |
+
this.render();
|
160 |
+
}
|
161 |
+
}
|
162 |
+
},
|
163 |
+
|
164 |
+
getEntry: function(index) {
|
165 |
+
return this.update.select('.selectable-item')[index];
|
166 |
+
}
|
167 |
})
|
168 |
|
169 |
var FactFinderSuggest = Class.create(Varien.searchForm, {
|
170 |
+
initialize : function($super, form, field, emptyText, loadDataCallback) {
|
171 |
+
$super(form, field, emptyText);
|
172 |
+
this.loadDataCallback = loadDataCallback;
|
173 |
+
},
|
174 |
+
|
175 |
+
loadDataCallback: null,
|
176 |
+
|
177 |
+
request: null,
|
178 |
+
|
179 |
initAutocomplete : function(url, destinationElement){
|
180 |
+
this.request = new FactFinderAutocompleter(
|
181 |
this.field,
|
182 |
destinationElement,
|
183 |
url,
|
184 |
{
|
185 |
+
parameters: 'format=JSONP',
|
186 |
paramName: 'query',
|
187 |
method: 'get',
|
188 |
minChars: 2,
|
189 |
updateElement: this._selectAutocompleteItem.bind(this),
|
190 |
onShow : function(element, update) {
|
191 |
if(!update.style.position || update.style.position=='absolute') {
|
192 |
+
update.style.position = 'absolute';
|
193 |
Position.clone(element, update, {
|
194 |
setHeight: false,
|
195 |
offsetTop: element.offsetHeight
|
197 |
}
|
198 |
Effect.Appear(update,{duration:0});
|
199 |
}
|
200 |
+
// uncomment for debugging
|
201 |
+
//, onHide : function(element, update) {}
|
202 |
}
|
203 |
);
|
204 |
+
this.request.caller = this;
|
205 |
+
},
|
206 |
+
|
207 |
+
_loadData: function(data) {
|
208 |
+
this.request.updateChoices(this.loadDataCallback(data));
|
209 |
},
|
|
|
|
|
|
|
|
|
210 |
|
211 |
_selectAutocompleteItem : function(element){
|
212 |
if(element.attributes.rel) {
|
213 |
document.location.href = element.attributes.rel.nodeValue;
|
214 |
} else if(element.title) {
|
215 |
+
this.form.insert('<input type="hidden" name="queryFromSuggest" value="true" />');
|
216 |
+
this.form.insert('<input type="hidden" name="userInput" value="'+this.field.value+'" />');
|
217 |
+
|
218 |
this.field.value = element.title;
|
219 |
+
|
220 |
+
this.form.submit();
|
221 |
}
|
222 |
}
|
223 |
});
|
lib/FACTFinder/Abstract/CompareAdapter.php
DELETED
@@ -1,96 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* FACT-Finder PHP Framework
|
4 |
-
*
|
5 |
-
* @category Library
|
6 |
-
* @package FACTFinder\Abstract
|
7 |
-
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* adapter for the factfinder "product comparison" data
|
12 |
-
*
|
13 |
-
* @author Martin Buettner <martin.buettner@omikron.net>
|
14 |
-
* @version $Id: CompareAdapter.php 42955 2012-01-25 16:07:45Z mb $
|
15 |
-
* @package FACTFinder\Abstract
|
16 |
-
*/
|
17 |
-
abstract class FACTFinder_Abstract_CompareAdapter extends FACTFinder_Abstract_Adapter
|
18 |
-
{
|
19 |
-
protected $productIds = array();
|
20 |
-
|
21 |
-
protected $comparableAttributes = array();
|
22 |
-
protected $comparedRecords = array();
|
23 |
-
protected $attributesUpToDate = false;
|
24 |
-
protected $recordsUpToDate = false;
|
25 |
-
|
26 |
-
protected $idsOnly = false;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Set ids of products to be compared
|
30 |
-
*
|
31 |
-
* @param array $productIds list of integers
|
32 |
-
**/
|
33 |
-
public function setProductIds($productIds) {
|
34 |
-
$this->productIds = $productIds;
|
35 |
-
$this->getDataProvider()->setParam('ids', implode(';',$this->productIds));
|
36 |
-
$this->attributesUpToDate = false;
|
37 |
-
$this->recordsUpToDate = false;
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Set the idsOnly request parameter
|
42 |
-
*
|
43 |
-
* @param bool $idsOnly
|
44 |
-
**/
|
45 |
-
public function setIdsOnly($idsOnly) {
|
46 |
-
$this->idsOnly = $idsOnly;
|
47 |
-
$this->getDataProvider()->setParam('idsOnly', $idsOnly ? 'true' : 'false');
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Adds an id to the list of products to be compared
|
52 |
-
*
|
53 |
-
* @param int $productId
|
54 |
-
**/
|
55 |
-
public function addProductId($productId) {
|
56 |
-
$this->productIds[] = $productId;
|
57 |
-
$this->attributesUpToDate = false;
|
58 |
-
$this->recordsUpToDate = false;
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* returns the comparable attributes for products to be compared
|
63 |
-
*
|
64 |
-
* @return array $comparableAttributes of strings (field names as keys, hasDifferences as values)
|
65 |
-
**/
|
66 |
-
public function getComparableAttributes() {
|
67 |
-
if (!$this->attributesUpToDate || !isset($this->comparableAttributes) || $this->comparableAttributes == null) {
|
68 |
-
$this->comparableAttributes = $this->createComparableAttributes();
|
69 |
-
$this->attributesUpToDate == true;
|
70 |
-
}
|
71 |
-
return $this->comparableAttributes;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* returns the Record objects or record ids for products to be compared (depending on the value of idsOnly)
|
76 |
-
*
|
77 |
-
* @return array $comparedRecords list of FACTFinder_Record objects
|
78 |
-
**/
|
79 |
-
public function getComparedRecords() {
|
80 |
-
if (!$this->recordsUpToDate || !isset($this->comparedRecords) || $this->comparedRecords == null) {
|
81 |
-
$this->comparedRecords = $this->createComparedRecords();
|
82 |
-
$this->recordsUpToDate == true;
|
83 |
-
}
|
84 |
-
return $this->comparedRecords;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* @return array $comparableAttributes of strings (field names as keys, hasDifferences as values)
|
89 |
-
*/
|
90 |
-
abstract protected function createComparableAttributes();
|
91 |
-
|
92 |
-
/**
|
93 |
-
* @return array $comparedRecords list of FACTFinder_Record objects or integers (depending on the value of idsOnly)
|
94 |
-
*/
|
95 |
-
abstract protected function createComparedRecords();
|
96 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/FACTFinder/Abstract/ProductCampaignAdapter.php
DELETED
@@ -1,107 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* FACT-Finder PHP Framework
|
4 |
-
*
|
5 |
-
* @category Library
|
6 |
-
* @package FACTFinder\Abstract
|
7 |
-
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* adapter for the factfinder product campaign data
|
12 |
-
*
|
13 |
-
* @author Rudolf Batt <rb@omikron.net>, Martin Buettner <martin.buettner@omikron.net>
|
14 |
-
* @version $Id: ProductCampaignAdapter.php 43440 2012-02-08 12:42:13Z martin.buettner $
|
15 |
-
* @package FACTFinder\Abstract
|
16 |
-
*/
|
17 |
-
abstract class FACTFinder_Abstract_ProductCampaignAdapter extends FACTFinder_Abstract_Adapter
|
18 |
-
{
|
19 |
-
protected $productIds = array();
|
20 |
-
protected $isShoppingCartCampaign = false;
|
21 |
-
protected $campaignsUpToDate = false;
|
22 |
-
|
23 |
-
protected $campaigns;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @throws Exception if there is no query or no catalog-parameter set at the dataprovider
|
27 |
-
*/
|
28 |
-
protected function getData()
|
29 |
-
{
|
30 |
-
$params = $this->getDataProvider()->getParams();
|
31 |
-
if (empty($params['productNumber'])) {
|
32 |
-
$this->log->error("No product number was set.");
|
33 |
-
throw new Exception("No product number was set.");
|
34 |
-
}
|
35 |
-
return $this->getDataProvider()->getData();
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Set ids of products to be compared
|
40 |
-
*
|
41 |
-
* @param array $productIds list of integers
|
42 |
-
**/
|
43 |
-
public function setProductIds($productIds) {
|
44 |
-
$this->productIds = $productIds;
|
45 |
-
$this->campaignsUpToDate = false;
|
46 |
-
if($this->isShoppingCartCampaign) {
|
47 |
-
$this->getDataProvider()->setArrayParam('productNumber',$this->productIds);
|
48 |
-
} else {
|
49 |
-
$this->getDataProvider()->setParam('productNumber', $this->productIds[0]);
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Adds an id to the list of products to be compared
|
55 |
-
*
|
56 |
-
* @param int $productId
|
57 |
-
**/
|
58 |
-
public function addProductId($productId) {
|
59 |
-
$this->productIds[] = $productId;
|
60 |
-
$this->campaignsUpToDate = false;
|
61 |
-
if($this->isShoppingCartCampaign) {
|
62 |
-
$this->getDataProvider()->setArrayParam('productNumber',$this->productIds);
|
63 |
-
} else {
|
64 |
-
$this->getDataProvider()->setParam('productNumber', $this->productIds[0]);
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Sets the adapter up for fetching campaigns on product detail pages
|
70 |
-
**/
|
71 |
-
public function makeProductCampaign() {
|
72 |
-
$this->isShoppingCartCampaign = false;
|
73 |
-
$this->campaignsUpToDate = false;
|
74 |
-
$this->getDataProvider()->setParam('do', 'getProductCampaigns');
|
75 |
-
$this->getDataProvider()->setParam('productNumber', $this->productIds[0]);
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Sets the adapter up for fetching campaigns on shopping cart pages
|
80 |
-
**/
|
81 |
-
public function makeShoppingCartCampaign() {
|
82 |
-
$this->isShoppingCartCampaign = true;
|
83 |
-
$this->campaignsUpToDate = false;
|
84 |
-
$this->getDataProvider()->setParam('do', 'getShoppingCartCampaigns');
|
85 |
-
$this->getDataProvider()->setArrayParam('productNumber',$this->productIds);
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* returns the campaigns
|
90 |
-
*
|
91 |
-
* @return FACTFinder_CampaignIterator
|
92 |
-
*/
|
93 |
-
public function getCampaigns() {
|
94 |
-
if (!$this->campaigns || $this->campaigns == null) {
|
95 |
-
$this->campaigns = $this->createCampaigns();
|
96 |
-
$this->campaignsUpToDate == true;
|
97 |
-
}
|
98 |
-
return $this->campaigns;
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* create campaigns
|
103 |
-
*
|
104 |
-
* @return FACTFinder_CampaignIterator
|
105 |
-
*/
|
106 |
-
abstract protected function createCampaigns();
|
107 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/FACTFinder/Abstract/RecommendationAdapter.php
DELETED
@@ -1,111 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* FACT-Finder PHP Framework
|
4 |
-
*
|
5 |
-
* @category Library
|
6 |
-
* @package FACTFinder\Abstract
|
7 |
-
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* adapter for the factfinder recommendation engine
|
12 |
-
*
|
13 |
-
* @author Rudolf Batt <rb@omikron.net>
|
14 |
-
* @version $Id$
|
15 |
-
* @package FACTFinder\Abstract
|
16 |
-
*/
|
17 |
-
abstract class FACTFinder_Abstract_RecommendationAdapter extends FACTFinder_Abstract_Adapter
|
18 |
-
{
|
19 |
-
protected $productIds = array();
|
20 |
-
protected $recommendation;
|
21 |
-
protected $recommendationUpToDate = false;
|
22 |
-
|
23 |
-
protected $idsOnly = false;
|
24 |
-
/*
|
25 |
-
* Option for XML query. 0 means "no maximum".
|
26 |
-
*/
|
27 |
-
protected $maxResults = 0;
|
28 |
-
|
29 |
-
/*
|
30 |
-
* @return int $maxResults
|
31 |
-
*/
|
32 |
-
public function getMaxResults() {
|
33 |
-
return $this->maxResults;
|
34 |
-
}
|
35 |
-
|
36 |
-
/*
|
37 |
-
* @param int $count positive integer (negative will be treated as 0)
|
38 |
-
*/
|
39 |
-
public function setMaxResults($count) {
|
40 |
-
$this->maxResults = $count < 1 ? 0 : $count;
|
41 |
-
if($count > 0) $this->getDataProvider()->setParam('maxResults', $count);
|
42 |
-
else $this->getDataProvder()->unsetParam('maxResults');
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Set id of product to base recommendation on
|
47 |
-
*
|
48 |
-
* @param int $productId
|
49 |
-
**/
|
50 |
-
public function setProductId($productId) {
|
51 |
-
$this->productIds = array($productId);
|
52 |
-
$this->getDataProvider()->setParam('id', $productId);
|
53 |
-
$this->recommendationUpToDate = false;
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Set ids of multiple products to base recommendation on
|
58 |
-
* This feature is only available in FF 6.7 and later
|
59 |
-
* Earlier versions will simply use the first product in the list
|
60 |
-
*
|
61 |
-
* @param array $productIds
|
62 |
-
* @return void
|
63 |
-
*/
|
64 |
-
public function setProductIds($productIds) {
|
65 |
-
$this->productIds = array($productIds[0]);
|
66 |
-
$this->getDataProvider()->setParam('id', $this->productIds);
|
67 |
-
$this->recommendationUpToDate = false;
|
68 |
-
}
|
69 |
-
|
70 |
-
public function setIdsOnly($idsOnly) {
|
71 |
-
// Reset the recommendations, if more detail is wanted than before
|
72 |
-
if($this->idsOnly && !$idsOnly) $recommendationUpToDate = false;
|
73 |
-
$this->idsOnly = $idsOnly;
|
74 |
-
$this->getDataProvider()->setParam('idsOnly', $idsOnly ? 'true' : 'false');
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* creates the recommendation-records
|
79 |
-
*
|
80 |
-
* @param string id
|
81 |
-
* @return array of FACTFinder_Record objects
|
82 |
-
**/
|
83 |
-
abstract protected function createRecommendations();
|
84 |
-
|
85 |
-
/**
|
86 |
-
* returns recommendations for specified id. if no id is set, try to fetch parameter 'id'.
|
87 |
-
* if no id is available, there will be a warning raised and returning an empty array
|
88 |
-
*
|
89 |
-
* @return FACTFinder_Result
|
90 |
-
**/
|
91 |
-
public function getRecommendations() {
|
92 |
-
if (empty($this->productIds)) {
|
93 |
-
$dataProviderParams = $this->getDataProvider()->getParams();
|
94 |
-
$requestParams = $this->getParamsParser()->getRequestParams();
|
95 |
-
if (isset($dataProviderParams['id'])) {
|
96 |
-
$this->productIds = $dataProviderParams['id'];
|
97 |
-
} elseif (isset($requestParams['id'])) {
|
98 |
-
$this->productIds = array($requestParams['id']);
|
99 |
-
}
|
100 |
-
if (empty($this->productIds)) {
|
101 |
-
trigger_error('recommendations can not be loaded without id. could not load id from request', E_USER_WARNING);
|
102 |
-
return array();
|
103 |
-
}
|
104 |
-
}
|
105 |
-
if (!$this->recommendationUpToDate || !isset($this->recommendation) || $this->recommendation == null) {
|
106 |
-
$this->recommendation = $this->createRecommendations();
|
107 |
-
$this->recommendationUpToDate = true;
|
108 |
-
}
|
109 |
-
return $this->recommendation;
|
110 |
-
}
|
111 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/FACTFinder/Abstract/SimilarRecordsAdapter.php
DELETED
@@ -1,128 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* FACT-Finder PHP Framework
|
4 |
-
*
|
5 |
-
* @category Library
|
6 |
-
* @package FACTFinder\Abstract
|
7 |
-
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* adapter for the factfinder "similar records" data
|
12 |
-
*
|
13 |
-
* @author Martin Buettner <martin.buettner@omikron.net>
|
14 |
-
* @version $Id: SimilarRecordsAdapter.php 42804 2012-01-20 10:46:43Z mb $
|
15 |
-
* @package FACTFinder\Abstract
|
16 |
-
*/
|
17 |
-
abstract class FACTFinder_Abstract_SimilarRecordsAdapter extends FACTFinder_Abstract_Adapter
|
18 |
-
{
|
19 |
-
protected $productId;
|
20 |
-
private $similarAttributes;
|
21 |
-
private $similarRecords;
|
22 |
-
protected $attributesUpToDate = false;
|
23 |
-
protected $recordsUpToDate = false;
|
24 |
-
|
25 |
-
protected $idsOnly = false;
|
26 |
-
|
27 |
-
/*
|
28 |
-
* Option for XML query. 0 means "no maximum".
|
29 |
-
*/
|
30 |
-
private $maxRecordCount = 0;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Set id of product to get similar records for
|
34 |
-
*
|
35 |
-
* @param int $productId
|
36 |
-
**/
|
37 |
-
public function setProductId($productId) {
|
38 |
-
$this->productId = $productId;
|
39 |
-
$this->getDataProvider()->setParam('id', $productId);
|
40 |
-
$this->attributesUpToDate = false;
|
41 |
-
$this->recordsUpToDate = false;
|
42 |
-
}
|
43 |
-
|
44 |
-
/*
|
45 |
-
* @return int $maxRecordCount
|
46 |
-
*/
|
47 |
-
public function getMaxRecordCount() {
|
48 |
-
return $this->maxRecordCount;
|
49 |
-
}
|
50 |
-
|
51 |
-
/*
|
52 |
-
* @param int $count positive integer (negative will be treated as 0)
|
53 |
-
*/
|
54 |
-
public function setMaxRecordCount($count) {
|
55 |
-
$this->maxRecordCount = $count < 1 ? 0 : $count;
|
56 |
-
if($count > 0) $this->getDataProvider()->setParam('maxRecordCount', $count);
|
57 |
-
else $this->getDataProvder()->unsetParam('maxRecordCount');
|
58 |
-
}
|
59 |
-
|
60 |
-
public function setIdsOnly($idsOnly) {
|
61 |
-
// Reset the similar records, if more detail is wanted than before
|
62 |
-
if($this->idsOnly && !$idsOnly) $this->recordsUpToDate = false;
|
63 |
-
$this->idsOnly = $idsOnly;
|
64 |
-
if($idsOnly)
|
65 |
-
$this->getDataProvider()->setParam('idsOnly','true');
|
66 |
-
else
|
67 |
-
$this->getDataProvider()->unsetParam('idsOnly');
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* returns similar attributes for previously specified id. if no id is set, try to fetch parameter 'id'.
|
72 |
-
* if no id is available, there will be a warning raised and returning an empty array
|
73 |
-
|
74 |
-
* @return array $similarAttributes of strings (field names as keys)
|
75 |
-
*/
|
76 |
-
public function getSimilarAttributes() {
|
77 |
-
if (strlen($this->productId) == 0) {
|
78 |
-
$requestParams = $this->getParamsParser()->getRequestParams();
|
79 |
-
if (isset($requestParams['id'])) {
|
80 |
-
$this->productId = $requestParams['id'];
|
81 |
-
}
|
82 |
-
if (strlen($this->productId) == 0) {
|
83 |
-
trigger_error('recommendations can not be loaded without id. could not load id from request', E_USER_WARNING);
|
84 |
-
return array();
|
85 |
-
}
|
86 |
-
}
|
87 |
-
if (!$this->attributesUpToDate || !isset($this->similarAttributes) || $this->similarAttributes == null) {
|
88 |
-
$this->similarAttributes = $this->createSimilarAttributes();
|
89 |
-
$this->attributesUpToDate = true;
|
90 |
-
}
|
91 |
-
return $this->similarAttributes;
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* returns similar records for specified id. if no id is set, try to fetch parameter 'id'.
|
96 |
-
* if no id is available, there will be a warning raised and returning an empty array.
|
97 |
-
*
|
98 |
-
* @param string $id (optional; if not set try to fetch from request param)
|
99 |
-
* @return array $similarRecords list of FACTFinder_Record objects
|
100 |
-
*/
|
101 |
-
public function getSimilarRecords() {
|
102 |
-
if (strlen($this->productId) == 0) {
|
103 |
-
$requestParams = $this->getParamsParser()->getRequestParams();
|
104 |
-
if (isset($requestParams['id'])) {
|
105 |
-
$this->productId = $requestParams['id'];
|
106 |
-
}
|
107 |
-
if (strlen($this->productId) == 0) {
|
108 |
-
trigger_error('similar records can not be loaded without id. could not load id from request', E_USER_WARNING);
|
109 |
-
return array();
|
110 |
-
}
|
111 |
-
}
|
112 |
-
if (!$this->recordsUpToDate || !isset($this->similarRecords) || $this->similarRecords == null) {
|
113 |
-
$this->similarRecords = $this->createSimilarRecords();
|
114 |
-
$this->recordsUpToDate = true;
|
115 |
-
}
|
116 |
-
return $this->similarRecords;
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* @return array $similarAttributes of strings (field names as keys)
|
121 |
-
*/
|
122 |
-
abstract protected function createSimilarAttributes();
|
123 |
-
|
124 |
-
/**
|
125 |
-
* @return array $similarRecords list of FACTFinder_Record objects
|
126 |
-
*/
|
127 |
-
abstract protected function createSimilarRecords();
|
128 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/FACTFinder/Curl.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Implements the cURL interface by simply delegating calls to the built-in cURL functions..
|
4 |
+
* See http://www.php.net/manual/en/book.curl.php
|
5 |
+
**/
|
6 |
+
class FACTFinder_Curl
|
7 |
+
implements FACTFinder_CurlInterface
|
8 |
+
{
|
9 |
+
|
10 |
+
public function curl_close($ch)
|
11 |
+
{
|
12 |
+
curl_close($ch);
|
13 |
+
}
|
14 |
+
|
15 |
+
public function curl_copy_handle($ch)
|
16 |
+
{
|
17 |
+
return curl_copy_handle($ch);
|
18 |
+
}
|
19 |
+
|
20 |
+
public function curl_errno($ch)
|
21 |
+
{
|
22 |
+
return curl_errno($ch);
|
23 |
+
}
|
24 |
+
|
25 |
+
public function curl_error($ch)
|
26 |
+
{
|
27 |
+
return curl_error($ch);
|
28 |
+
}
|
29 |
+
|
30 |
+
public function curl_exec($ch)
|
31 |
+
{
|
32 |
+
return curl_exec($ch);
|
33 |
+
}
|
34 |
+
|
35 |
+
public function curl_getinfo($ch, $opt = 0)
|
36 |
+
{
|
37 |
+
return curl_getinfo($ch, $opt);
|
38 |
+
}
|
39 |
+
|
40 |
+
public function curl_init($url = null)
|
41 |
+
{
|
42 |
+
return curl_init($url);
|
43 |
+
}
|
44 |
+
|
45 |
+
public function curl_multi_add_handle($mh, $ch)
|
46 |
+
{
|
47 |
+
return curl_multi_add_handle($mh, $ch);
|
48 |
+
}
|
49 |
+
|
50 |
+
public function curl_multi_close($mh)
|
51 |
+
{
|
52 |
+
curl_multi_close($mh);
|
53 |
+
}
|
54 |
+
|
55 |
+
public function curl_multi_exec($mh, &$still_running)
|
56 |
+
{
|
57 |
+
return curl_multi_exec($mh, $still_running);
|
58 |
+
}
|
59 |
+
|
60 |
+
public function curl_multi_getcontent($ch)
|
61 |
+
{
|
62 |
+
return curl_multi_getcontent($ch);
|
63 |
+
}
|
64 |
+
|
65 |
+
public function curl_multi_info_read($mh, &$msgs_in_queue = null)
|
66 |
+
{
|
67 |
+
return curl_multi_info_read($mh, $msgs_in_queue);
|
68 |
+
}
|
69 |
+
|
70 |
+
public function curl_multi_init()
|
71 |
+
{
|
72 |
+
return curl_multi_init();
|
73 |
+
}
|
74 |
+
|
75 |
+
public function curl_multi_remove_handle($mh, $ch)
|
76 |
+
{
|
77 |
+
return curl_multi_remove_handle($mh, $ch);
|
78 |
+
}
|
79 |
+
|
80 |
+
public function curl_multi_select($mh, $timeout = 1.0)
|
81 |
+
{
|
82 |
+
return curl_multi_select($mh, $timeout);
|
83 |
+
}
|
84 |
+
|
85 |
+
public function curl_setopt_array($ch, $options)
|
86 |
+
{
|
87 |
+
return curl_setopt_array($ch, $options);
|
88 |
+
}
|
89 |
+
|
90 |
+
public function curl_setopt($ch, $option, $value)
|
91 |
+
{
|
92 |
+
return curl_setopt($ch, $option, $value);
|
93 |
+
}
|
94 |
+
|
95 |
+
public function curl_version($age = CURLVERSION_NOW)
|
96 |
+
{
|
97 |
+
return curl_version($age);
|
98 |
+
}
|
99 |
+
}
|
lib/FACTFinder/CurlHandle.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Struct-like class that represents all data associated with one curl handle
|
4 |
+
**/
|
5 |
+
class FACTFinder_CurlHandle
|
6 |
+
{
|
7 |
+
public $options;
|
8 |
+
}
|
lib/FACTFinder/CurlInterface.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Interface for PHP cURL functions.
|
4 |
+
**/
|
5 |
+
interface FACTFinder_CurlInterface
|
6 |
+
{
|
7 |
+
public function curl_close($ch);
|
8 |
+
public function curl_copy_handle($ch);
|
9 |
+
public function curl_errno($ch);
|
10 |
+
public function curl_error($ch);
|
11 |
+
public function curl_exec($ch);
|
12 |
+
public function curl_getinfo($ch, $opt = 0);
|
13 |
+
public function curl_init($url = null);
|
14 |
+
public function curl_multi_add_handle($mh, $ch);
|
15 |
+
public function curl_multi_close($mh);
|
16 |
+
public function curl_multi_exec($mh, &$still_running);
|
17 |
+
public function curl_multi_getcontent($ch);
|
18 |
+
public function curl_multi_info_read($mh, &$msgs_in_queue = null);
|
19 |
+
public function curl_multi_init();
|
20 |
+
public function curl_multi_remove_handle($mh, $ch);
|
21 |
+
public function curl_multi_select($mh, $timeout = 1.0);
|
22 |
+
public function curl_setopt_array($ch, $options);
|
23 |
+
public function curl_setopt($ch, $option, $value);
|
24 |
+
public function curl_version($age = CURLVERSION_NOW);
|
25 |
+
}
|
lib/FACTFinder/CurlStub.php
ADDED
@@ -0,0 +1,379 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Stubs the cURL interface without issuing any PHP requests.
|
4 |
+
**/
|
5 |
+
|
6 |
+
class FACTFinder_CurlStub
|
7 |
+
implements FACTFinder_CurlInterface
|
8 |
+
{
|
9 |
+
private $_lastHandle = -1;
|
10 |
+
|
11 |
+
private $_mapOptionCounts = array();
|
12 |
+
private $_mapOptions = array();
|
13 |
+
private $_mapResponses = array();
|
14 |
+
private $_mapErrorCodes = array();
|
15 |
+
private $_mapInfo = array();
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var array of FACTFinder_CurlHandle
|
19 |
+
*/
|
20 |
+
private $_handles = array();
|
21 |
+
|
22 |
+
public function curl_close($ch)
|
23 |
+
{
|
24 |
+
unset($this->_handles[$ch]);
|
25 |
+
}
|
26 |
+
|
27 |
+
public function curl_copy_handle($ch)
|
28 |
+
{
|
29 |
+
$newCh = ++$this->_lastHandle;
|
30 |
+
|
31 |
+
$handle = clone $this->_handles[$ch];
|
32 |
+
|
33 |
+
$this->_handles[$newCh] = $handle;
|
34 |
+
|
35 |
+
return $newCh;
|
36 |
+
}
|
37 |
+
|
38 |
+
public function curl_errno($ch)
|
39 |
+
{
|
40 |
+
if(!isset($this->_handles[$ch]))
|
41 |
+
return 0;
|
42 |
+
|
43 |
+
return $this->_getErrorCode($this->_handles[$ch]);
|
44 |
+
}
|
45 |
+
|
46 |
+
public function curl_error($ch)
|
47 |
+
{
|
48 |
+
$errno = $this->curl_errno($ch);
|
49 |
+
return FACTFinder_CurlStub::$errorLookup[$errno];
|
50 |
+
}
|
51 |
+
|
52 |
+
public function curl_exec($ch)
|
53 |
+
{
|
54 |
+
if(!isset($this->_handles[$ch]))
|
55 |
+
return false;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @var $handle FACTFinder_CurlHandle
|
59 |
+
*/
|
60 |
+
$handle = $this->_handles[$ch];
|
61 |
+
|
62 |
+
$response = $this->_getResponse($handle);
|
63 |
+
|
64 |
+
if($response === null)
|
65 |
+
return false;
|
66 |
+
|
67 |
+
if($handle->options[CURLOPT_RETURNTRANSFER])
|
68 |
+
return $response;
|
69 |
+
|
70 |
+
echo $response;
|
71 |
+
return true;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function curl_getinfo($ch, $opt = 0)
|
75 |
+
{
|
76 |
+
// TODO: Include logic to build CURLINFO_EFFECTIVE_URL?
|
77 |
+
if(!isset($this->_handles[$ch]))
|
78 |
+
trigger_error(__FUNCTION__.'(): '.$ch.' is not a valid cURL handle resource', E_USER_WARNING);
|
79 |
+
|
80 |
+
if($opt == 0)
|
81 |
+
return $this->_getInfoArray($this->_handles[$ch]);
|
82 |
+
|
83 |
+
return $this->_getInfo($this->_handles[$ch], $opt);
|
84 |
+
}
|
85 |
+
|
86 |
+
public function curl_init($url = null)
|
87 |
+
{
|
88 |
+
$ch = ++$this->_lastHandle;
|
89 |
+
|
90 |
+
$handle = FF::getInstance('curlHandle');
|
91 |
+
|
92 |
+
$handle->options = array(
|
93 |
+
CURLOPT_RETURNTRANSFER => false
|
94 |
+
);
|
95 |
+
|
96 |
+
$this->_handles[$ch] = $handle;
|
97 |
+
|
98 |
+
if($url !== null)
|
99 |
+
$this->curl_setopt($ch, CURLOPT_URL, $url);
|
100 |
+
|
101 |
+
return $ch;
|
102 |
+
}
|
103 |
+
|
104 |
+
public function curl_multi_add_handle($mh, $ch)
|
105 |
+
{
|
106 |
+
throw new Exception("Not yet implemented.");
|
107 |
+
}
|
108 |
+
|
109 |
+
public function curl_multi_close($mh)
|
110 |
+
{
|
111 |
+
throw new Exception("Not yet implemented.");
|
112 |
+
}
|
113 |
+
|
114 |
+
public function curl_multi_exec($mh, &$still_running)
|
115 |
+
{
|
116 |
+
throw new Exception("Not yet implemented.");
|
117 |
+
}
|
118 |
+
|
119 |
+
public function curl_multi_getcontent($ch)
|
120 |
+
{
|
121 |
+
throw new Exception("Not yet implemented.");
|
122 |
+
}
|
123 |
+
|
124 |
+
public function curl_multi_info_read($mh, &$msgs_in_queue = null)
|
125 |
+
{
|
126 |
+
throw new Exception("Not yet implemented.");
|
127 |
+
}
|
128 |
+
|
129 |
+
public function curl_multi_init()
|
130 |
+
{
|
131 |
+
throw new Exception("Not yet implemented.");
|
132 |
+
}
|
133 |
+
|
134 |
+
public function curl_multi_remove_handle($mh, $ch)
|
135 |
+
{
|
136 |
+
throw new Exception("Not yet implemented.");
|
137 |
+
}
|
138 |
+
|
139 |
+
public function curl_multi_select($mh, $timeout = 1.0)
|
140 |
+
{
|
141 |
+
throw new Exception("Not yet implemented.");
|
142 |
+
}
|
143 |
+
|
144 |
+
public function curl_setopt_array($ch, $options)
|
145 |
+
{
|
146 |
+
foreach($options as $option => $value)
|
147 |
+
{
|
148 |
+
if(!$this->curl_setopt($ch, $option, $value))
|
149 |
+
return false;
|
150 |
+
}
|
151 |
+
return true;
|
152 |
+
}
|
153 |
+
|
154 |
+
public function curl_setopt($ch, $option, $value)
|
155 |
+
{
|
156 |
+
if(!isset($this->_handles[$ch]))
|
157 |
+
return false;
|
158 |
+
|
159 |
+
$this->_handles[$ch]->options[$option] = $value;
|
160 |
+
|
161 |
+
return true;
|
162 |
+
}
|
163 |
+
|
164 |
+
public function curl_version($age = CURLVERSION_NOW)
|
165 |
+
{
|
166 |
+
return curl_version($age);
|
167 |
+
}
|
168 |
+
|
169 |
+
public function setResponse($expectedResponse, $requiredOptions = array())
|
170 |
+
{
|
171 |
+
$hash = $this->_getHashAndSetOptionMaps($requiredOptions);
|
172 |
+
$this->_mapResponses[$hash] = $expectedResponse;
|
173 |
+
}
|
174 |
+
|
175 |
+
public function setErrorCode($expectedErrorCode, $requiredOptions = array())
|
176 |
+
{
|
177 |
+
$hash = $this->_getHashAndSetOptionMaps($requiredOptions);
|
178 |
+
$this->_mapErrorCodes[$hash] = $expectedErrorCode;
|
179 |
+
}
|
180 |
+
|
181 |
+
public function setInfo($expectedInfo, $requiredOptions = array())
|
182 |
+
{
|
183 |
+
$hash = $this->_getHashAndSetOptionMaps($requiredOptions);
|
184 |
+
$this->_mapInfo[$hash] = $expectedInfo;
|
185 |
+
}
|
186 |
+
|
187 |
+
private function _getHashAndSetOptionMaps($requiredOptions)
|
188 |
+
{
|
189 |
+
$hash = md5(http_build_query($requiredOptions));
|
190 |
+
|
191 |
+
$this->_mapOptionCounts[$hash] = count($requiredOptions);
|
192 |
+
arsort($this->_mapOptionCounts);
|
193 |
+
$this->_mapOptions[$hash] = $requiredOptions;
|
194 |
+
return $hash;
|
195 |
+
}
|
196 |
+
|
197 |
+
private function _getResponse($handle)
|
198 |
+
{
|
199 |
+
$response = false;
|
200 |
+
|
201 |
+
$key = $this->_determineKey($handle);
|
202 |
+
|
203 |
+
if($key !== null && isset($this->_mapResponses[$key]))
|
204 |
+
$response = $this->_mapResponses[$key];
|
205 |
+
|
206 |
+
return $response;
|
207 |
+
}
|
208 |
+
|
209 |
+
private function _getErrorCode($handle)
|
210 |
+
{
|
211 |
+
$errorCode = 0;
|
212 |
+
|
213 |
+
$key = $this->_determineKey($handle);
|
214 |
+
|
215 |
+
if($key !== null && isset($this->_mapErrorCodes[$key]))
|
216 |
+
$errorCode = $this->_mapErrorCodes[$key];
|
217 |
+
|
218 |
+
return $errorCode;
|
219 |
+
}
|
220 |
+
|
221 |
+
private function _getInfo($handle, $opt)
|
222 |
+
{
|
223 |
+
$info = '';
|
224 |
+
|
225 |
+
$key = $this->_determineKey($handle);
|
226 |
+
|
227 |
+
if($key !== null && isset($this->_mapInfo[$key][$opt]))
|
228 |
+
$info = $this->_mapInfo[$key][$opt];
|
229 |
+
|
230 |
+
return $info;
|
231 |
+
}
|
232 |
+
|
233 |
+
private function _getInfoArray($handle)
|
234 |
+
{
|
235 |
+
$infoArray = array();
|
236 |
+
|
237 |
+
foreach(self::$infoLookup as $strKey)
|
238 |
+
{
|
239 |
+
$infoArray[$strKey] = '';
|
240 |
+
}
|
241 |
+
|
242 |
+
$handleKey = $this->_determineKey($handle);
|
243 |
+
|
244 |
+
if($handleKey !== null && isset($this->_mapInfo[$handleKey]))
|
245 |
+
{
|
246 |
+
foreach($this->_mapInfo[$handleKey] as $intKey => $value)
|
247 |
+
{
|
248 |
+
$strKey = self::$infoLookup[$intKey];
|
249 |
+
$infoArray[$strKey] = $value;
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
return $infoArray;
|
254 |
+
}
|
255 |
+
|
256 |
+
private function _determineKey($handle)
|
257 |
+
{
|
258 |
+
// TODO: Treat URL separately, so that order of parameters does not matter
|
259 |
+
$returnValue = null;
|
260 |
+
$options = $handle->options;
|
261 |
+
foreach($this->_mapOptionCounts as $hash => $optionCount)
|
262 |
+
{
|
263 |
+
foreach($this->_mapOptions[$hash] as $option => $value)
|
264 |
+
{
|
265 |
+
if(!isset($options[$option]) || $options[$option] != $value)
|
266 |
+
continue 2;
|
267 |
+
}
|
268 |
+
|
269 |
+
$returnValue = $hash;
|
270 |
+
|
271 |
+
break;
|
272 |
+
}
|
273 |
+
return $returnValue;
|
274 |
+
}
|
275 |
+
|
276 |
+
private static $errorLookup = array(
|
277 |
+
0 => 'CURLE_OK',
|
278 |
+
1 => 'CURLE_UNSUPPORTED_PROTOCOL',
|
279 |
+
2 => 'CURLE_FAILED_INIT',
|
280 |
+
3 => 'CURLE_URL_MALFORMAT',
|
281 |
+
4 => 'CURLE_URL_MALFORMAT_USER',
|
282 |
+
5 => 'CURLE_COULDNT_RESOLVE_PROXY',
|
283 |
+
6 => 'CURLE_COULDNT_RESOLVE_HOST',
|
284 |
+
7 => 'CURLE_COULDNT_CONNECT',
|
285 |
+
8 => 'CURLE_FTP_WEIRD_SERVER_REPLY',
|
286 |
+
9 => 'CURLE_REMOTE_ACCESS_DENIED',
|
287 |
+
11 => 'CURLE_FTP_WEIRD_PASS_REPLY',
|
288 |
+
13 => 'CURLE_FTP_WEIRD_PASV_REPLY',
|
289 |
+
14 => 'CURLE_FTP_WEIRD_227_FORMAT',
|
290 |
+
15 => 'CURLE_FTP_CANT_GET_HOST',
|
291 |
+
17 => 'CURLE_FTP_COULDNT_SET_TYPE',
|
292 |
+
18 => 'CURLE_PARTIAL_FILE',
|
293 |
+
19 => 'CURLE_FTP_COULDNT_RETR_FILE',
|
294 |
+
21 => 'CURLE_QUOTE_ERROR',
|
295 |
+
22 => 'CURLE_HTTP_RETURNED_ERROR',
|
296 |
+
23 => 'CURLE_WRITE_ERROR',
|
297 |
+
25 => 'CURLE_UPLOAD_FAILED',
|
298 |
+
26 => 'CURLE_READ_ERROR',
|
299 |
+
27 => 'CURLE_OUT_OF_MEMORY',
|
300 |
+
28 => 'CURLE_OPERATION_TIMEOUTED', // in the original cURL lib this is called 'CURLE_OPERATION_TIMEOUTED' instead
|
301 |
+
30 => 'CURLE_FTP_PORT_FAILED',
|
302 |
+
31 => 'CURLE_FTP_COULDNT_USE_REST',
|
303 |
+
33 => 'CURLE_RANGE_ERROR',
|
304 |
+
34 => 'CURLE_HTTP_POST_ERROR',
|
305 |
+
35 => 'CURLE_SSL_CONNECT_ERROR',
|
306 |
+
36 => 'CURLE_BAD_DOWNLOAD_RESUME',
|
307 |
+
37 => 'CURLE_FILE_COULDNT_READ_FILE',
|
308 |
+
38 => 'CURLE_LDAP_CANNOT_BIND',
|
309 |
+
39 => 'CURLE_LDAP_SEARCH_FAILED',
|
310 |
+
41 => 'CURLE_FUNCTION_NOT_FOUND',
|
311 |
+
42 => 'CURLE_ABORTED_BY_CALLBACK',
|
312 |
+
43 => 'CURLE_BAD_FUNCTION_ARGUMENT',
|
313 |
+
45 => 'CURLE_INTERFACE_FAILED',
|
314 |
+
47 => 'CURLE_TOO_MANY_REDIRECTS',
|
315 |
+
48 => 'CURLE_UNKNOWN_TELNET_OPTION',
|
316 |
+
49 => 'CURLE_TELNET_OPTION_SYNTAX',
|
317 |
+
51 => 'CURLE_PEER_FAILED_VERIFICATION',
|
318 |
+
52 => 'CURLE_GOT_NOTHING',
|
319 |
+
53 => 'CURLE_SSL_ENGINE_NOTFOUND',
|
320 |
+
54 => 'CURLE_SSL_ENGINE_SETFAILED',
|
321 |
+
55 => 'CURLE_SEND_ERROR',
|
322 |
+
56 => 'CURLE_RECV_ERROR',
|
323 |
+
58 => 'CURLE_SSL_CERTPROBLEM',
|
324 |
+
59 => 'CURLE_SSL_CIPHER',
|
325 |
+
60 => 'CURLE_SSL_CACERT',
|
326 |
+
61 => 'CURLE_BAD_CONTENT_ENCODING',
|
327 |
+
62 => 'CURLE_LDAP_INVALID_URL',
|
328 |
+
63 => 'CURLE_FILESIZE_EXCEEDED',
|
329 |
+
64 => 'CURLE_USE_SSL_FAILED',
|
330 |
+
65 => 'CURLE_SEND_FAIL_REWIND',
|
331 |
+
66 => 'CURLE_SSL_ENGINE_INITFAILED',
|
332 |
+
67 => 'CURLE_LOGIN_DENIED',
|
333 |
+
68 => 'CURLE_TFTP_NOTFOUND',
|
334 |
+
69 => 'CURLE_TFTP_PERM',
|
335 |
+
70 => 'CURLE_REMOTE_DISK_FULL',
|
336 |
+
71 => 'CURLE_TFTP_ILLEGAL',
|
337 |
+
72 => 'CURLE_TFTP_UNKNOWNID',
|
338 |
+
73 => 'CURLE_REMOTE_FILE_EXISTS',
|
339 |
+
74 => 'CURLE_TFTP_NOSUCHUSER',
|
340 |
+
75 => 'CURLE_CONV_FAILED',
|
341 |
+
76 => 'CURLE_CONV_REQD',
|
342 |
+
77 => 'CURLE_SSL_CACERT_BADFILE',
|
343 |
+
78 => 'CURLE_REMOTE_FILE_NOT_FOUND',
|
344 |
+
79 => 'CURLE_SSH',
|
345 |
+
80 => 'CURLE_SSL_SHUTDOWN_FAILED',
|
346 |
+
81 => 'CURLE_AGAIN',
|
347 |
+
82 => 'CURLE_SSL_CRL_BADFILE',
|
348 |
+
83 => 'CURLE_SSL_ISSUER_ERROR',
|
349 |
+
84 => 'CURL E_FTP_PRET_FAILED',
|
350 |
+
85 => 'CURLE_RTSP_CSEQ_ERROR',
|
351 |
+
86 => 'CURLE_RTSP_SESSION_ERROR',
|
352 |
+
87 => 'CURLE_FTP_BAD_FILE_LIST',
|
353 |
+
88 => 'CURLE_CHUNK_FAILED'
|
354 |
+
);
|
355 |
+
|
356 |
+
public static $infoLookup = array(
|
357 |
+
CURLINFO_EFFECTIVE_URL => 'url',
|
358 |
+
CURLINFO_HTTP_CODE => 'http_code',
|
359 |
+
CURLINFO_FILETIME => 'filetime',
|
360 |
+
CURLINFO_TOTAL_TIME => 'total_time',
|
361 |
+
CURLINFO_NAMELOOKUP_TIME => 'namelookup_time',
|
362 |
+
CURLINFO_CONNECT_TIME => 'connect_time',
|
363 |
+
CURLINFO_PRETRANSFER_TIME => 'pretransfer_time',
|
364 |
+
CURLINFO_STARTTRANSFER_TIME => 'starttransfer_time',
|
365 |
+
CURLINFO_REDIRECT_COUNT => 'redirect_count',
|
366 |
+
CURLINFO_REDIRECT_TIME => 'redirect_time',
|
367 |
+
CURLINFO_SIZE_UPLOAD => 'size_upload',
|
368 |
+
CURLINFO_SIZE_DOWNLOAD => 'size_download',
|
369 |
+
CURLINFO_SPEED_DOWNLOAD => 'speed_download',
|
370 |
+
CURLINFO_SPEED_UPLOAD => 'speed_upload',
|
371 |
+
CURLINFO_HEADER_SIZE => 'header_size',
|
372 |
+
CURLINFO_HEADER_OUT => 'request_header',
|
373 |
+
CURLINFO_REQUEST_SIZE => 'request_size',
|
374 |
+
CURLINFO_SSL_VERIFYRESULT => 'ssl_verify_result',
|
375 |
+
CURLINFO_CONTENT_LENGTH_DOWNLOAD => 'download_content_length',
|
376 |
+
CURLINFO_CONTENT_LENGTH_UPLOAD => 'upload_content_length',
|
377 |
+
CURLINFO_CONTENT_TYPE => 'content_type'
|
378 |
+
);
|
379 |
+
}
|
lib/FACTFinder/Default/CompareAdapter.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FACT-Finder PHP Framework
|
4 |
+
*
|
5 |
+
* @category Library
|
6 |
+
* @package FACTFinder\Xml67
|
7 |
+
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* product comparison adapter using the xml interface
|
12 |
+
*
|
13 |
+
* @author Rudolf Batt <rb@omikron.net>
|
14 |
+
* @version $Id: CompareAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
+
* @package FACTFinder\Xml68
|
16 |
+
*/
|
17 |
+
class FACTFinder_Default_CompareAdapter extends FACTFinder_Abstract_Adapter
|
18 |
+
{protected $productIds = array();
|
19 |
+
|
20 |
+
protected $comparableAttributes = array();
|
21 |
+
protected $comparedRecords = array();
|
22 |
+
protected $attributesUpToDate = false;
|
23 |
+
protected $recordsUpToDate = false;
|
24 |
+
|
25 |
+
protected $idsOnly = false;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Set ids of products to be compared
|
29 |
+
*
|
30 |
+
* @param array $productIds list of integers
|
31 |
+
**/
|
32 |
+
public function setProductIds($productIds) {
|
33 |
+
$this->productIds = $productIds;
|
34 |
+
$this->getDataProvider()->setParam('ids', implode(';',$this->productIds));
|
35 |
+
$this->attributesUpToDate = false;
|
36 |
+
$this->recordsUpToDate = false;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Set the idsOnly request parameter
|
41 |
+
*
|
42 |
+
* @param bool $idsOnly
|
43 |
+
**/
|
44 |
+
public function setIdsOnly($idsOnly) {
|
45 |
+
$this->idsOnly = $idsOnly;
|
46 |
+
$this->getDataProvider()->setParam('idsOnly', $idsOnly ? 'true' : 'false');
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Adds an id to the list of products to be compared
|
51 |
+
*
|
52 |
+
* @param int $productId
|
53 |
+
**/
|
54 |
+
public function addProductId($productId) {
|
55 |
+
$this->productIds[] = $productId;
|
56 |
+
$this->attributesUpToDate = false;
|
57 |
+
$this->recordsUpToDate = false;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* returns the comparable attributes for products to be compared
|
62 |
+
*
|
63 |
+
* @return array $comparableAttributes of strings (field names as keys, hasDifferences as values)
|
64 |
+
**/
|
65 |
+
public function getComparableAttributes() {
|
66 |
+
if (!$this->attributesUpToDate || !isset($this->comparableAttributes) || $this->comparableAttributes == null) {
|
67 |
+
$this->comparableAttributes = $this->createComparableAttributes();
|
68 |
+
$this->attributesUpToDate == true;
|
69 |
+
}
|
70 |
+
return $this->comparableAttributes;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* returns the Record objects or record ids for products to be compared (depending on the value of idsOnly)
|
75 |
+
*
|
76 |
+
* @return array $comparedRecords list of FACTFinder_Record objects
|
77 |
+
**/
|
78 |
+
public function getComparedRecords() {
|
79 |
+
if (!$this->recordsUpToDate || !isset($this->comparedRecords) || $this->comparedRecords == null) {
|
80 |
+
$this->comparedRecords = $this->createComparedRecords();
|
81 |
+
$this->recordsUpToDate == true;
|
82 |
+
}
|
83 |
+
return $this->comparedRecords;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* @return array $comparableAttributes of strings (field names as keys, hasDifferences as values)
|
88 |
+
*/
|
89 |
+
protected function createComparableAttributes()
|
90 |
+
{
|
91 |
+
$this->log->debug("Product comparison not available before FF 6.6!");
|
92 |
+
$comparableAttributes = array();
|
93 |
+
return $comparableAttributes;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* @return array $comparedRecords list of FACTFinder_Record objects or integers (depending on the value of idsOnly)
|
98 |
+
*/
|
99 |
+
protected function createComparedRecords()
|
100 |
+
{
|
101 |
+
$this->log->debug("Product comparison not available before FF 6.6!");
|
102 |
+
$comparableAttributes = array();
|
103 |
+
return $comparableAttributes;
|
104 |
+
}
|
105 |
+
}
|
lib/FACTFinder/{Abstract → Default}/ImportAdapter.php
RENAMED
@@ -3,43 +3,43 @@
|
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
-
* @package FACTFinder\
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
-
* adapter
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
-
* @version $Id:
|
15 |
-
* @package FACTFinder\
|
16 |
*/
|
17 |
-
|
18 |
{
|
19 |
/**
|
20 |
* trigger a data import
|
21 |
*
|
22 |
-
|
23 |
* @return object $report import report in xml format
|
24 |
*/
|
25 |
public function triggerDataImport($download = false) {
|
26 |
return $this->triggerImport($download, 'data');
|
27 |
}
|
28 |
-
|
29 |
-
|
30 |
* trigger a suggest import
|
31 |
*
|
32 |
-
|
33 |
* @return object $report import report in xml format
|
34 |
*/
|
35 |
public function triggerSuggestImport($download = false) {
|
36 |
return $this->triggerImport($download, 'suggest');
|
37 |
}
|
38 |
-
|
39 |
-
|
40 |
* trigger a recommendation import
|
41 |
*
|
42 |
-
|
43 |
* @return object $report import report in xml format
|
44 |
*/
|
45 |
public function triggerRecommendationImport($download = false) {
|
@@ -47,9 +47,13 @@ abstract class FACTFinder_Abstract_ImportAdapter extends FACTFinder_Abstract_Ada
|
|
47 |
}
|
48 |
|
49 |
/**
|
50 |
-
|
51 |
-
|
52 |
* @return object $report import report in xml format
|
53 |
*/
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
+
* @package FACTFinder\Xml67
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
+
* import adapter using the xml interface
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
+
* @version $Id: ImportAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
+
* @package FACTFinder\Xml68
|
16 |
*/
|
17 |
+
class FACTFinder_Default_ImportAdapter extends FACTFinder_Abstract_Adapter
|
18 |
{
|
19 |
/**
|
20 |
* trigger a data import
|
21 |
*
|
22 |
+
* @param bool $download import files will also be updated if true
|
23 |
* @return object $report import report in xml format
|
24 |
*/
|
25 |
public function triggerDataImport($download = false) {
|
26 |
return $this->triggerImport($download, 'data');
|
27 |
}
|
28 |
+
|
29 |
+
/**
|
30 |
* trigger a suggest import
|
31 |
*
|
32 |
+
* @param bool $download import files will also be updated if true
|
33 |
* @return object $report import report in xml format
|
34 |
*/
|
35 |
public function triggerSuggestImport($download = false) {
|
36 |
return $this->triggerImport($download, 'suggest');
|
37 |
}
|
38 |
+
|
39 |
+
/**
|
40 |
* trigger a recommendation import
|
41 |
*
|
42 |
+
* @param bool $download import files will also be updated if true
|
43 |
* @return object $report import report in xml format
|
44 |
*/
|
45 |
public function triggerRecommendationImport($download = false) {
|
47 |
}
|
48 |
|
49 |
/**
|
50 |
+
* @param bool $download import files will also be updated if true
|
51 |
+
* @param string $type determines which import will be triggered. can be 'data', 'suggest' or 'recommendation'
|
52 |
* @return object $report import report in xml format
|
53 |
*/
|
54 |
+
protected function triggerImport($download, $type)
|
55 |
+
{
|
56 |
+
$this->log->debug("Triggering imports is not available before FF 6.0!");
|
57 |
+
return null;
|
58 |
+
}
|
59 |
+
}
|
lib/FACTFinder/Default/ProductCampaignAdapter.php
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FACT-Finder PHP Framework
|
4 |
+
*
|
5 |
+
* @category Library
|
6 |
+
* @package FACTFinder\Xml67
|
7 |
+
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* product campaign adapter using the xml interface
|
12 |
+
*
|
13 |
+
* @author Rudolf Batt <rb@omikron.net>, Martin Buettner <martin.buettner@omikron.net>
|
14 |
+
* @version $Id: ProductCampaignAdapter.php 43440 2012-02-08 12:42:13Z martin.buettner $
|
15 |
+
* @package FACTFinder\Xml68
|
16 |
+
*/
|
17 |
+
class FACTFinder_Default_ProductCampaignAdapter extends FACTFinder_Abstract_Adapter
|
18 |
+
{
|
19 |
+
protected $productIds = array();
|
20 |
+
protected $isShoppingCartCampaign = false;
|
21 |
+
protected $campaignsUpToDate = false;
|
22 |
+
|
23 |
+
protected $campaigns;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @throws Exception if there is no query or no catalog-parameter set at the dataprovider
|
27 |
+
*/
|
28 |
+
protected function getData()
|
29 |
+
{
|
30 |
+
$params = $this->getDataProvider()->getParams();
|
31 |
+
if (empty($params['productNumber'])) {
|
32 |
+
$this->log->error("No product number was set.");
|
33 |
+
throw new Exception("No product number was set.");
|
34 |
+
}
|
35 |
+
return $this->getDataProvider()->getData();
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Set ids of products to be compared
|
40 |
+
*
|
41 |
+
* @param array $productIds list of integers
|
42 |
+
**/
|
43 |
+
public function setProductIds($productIds) {
|
44 |
+
$this->productIds = $productIds;
|
45 |
+
$this->campaignsUpToDate = false;
|
46 |
+
if($this->isShoppingCartCampaign) {
|
47 |
+
$this->getDataProvider()->setArrayParam('productNumber',$this->productIds);
|
48 |
+
} else {
|
49 |
+
$this->getDataProvider()->setParam('productNumber', $this->productIds[0]);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Adds an id to the list of products to be compared
|
55 |
+
*
|
56 |
+
* @param int $productId
|
57 |
+
**/
|
58 |
+
public function addProductId($productId) {
|
59 |
+
$this->productIds[] = $productId;
|
60 |
+
$this->campaignsUpToDate = false;
|
61 |
+
if($this->isShoppingCartCampaign) {
|
62 |
+
$this->getDataProvider()->setArrayParam('productNumber',$this->productIds);
|
63 |
+
} else {
|
64 |
+
$this->getDataProvider()->setParam('productNumber', $this->productIds[0]);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Sets the adapter up for fetching campaigns on product detail pages
|
70 |
+
**/
|
71 |
+
public function makeProductCampaign() {
|
72 |
+
$this->isShoppingCartCampaign = false;
|
73 |
+
$this->campaignsUpToDate = false;
|
74 |
+
$this->getDataProvider()->setParam('do', 'getProductCampaigns');
|
75 |
+
$this->getDataProvider()->setParam('productNumber', $this->productIds[0]);
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Sets the adapter up for fetching campaigns on shopping cart pages
|
80 |
+
**/
|
81 |
+
public function makeShoppingCartCampaign() {
|
82 |
+
$this->isShoppingCartCampaign = true;
|
83 |
+
$this->campaignsUpToDate = false;
|
84 |
+
$this->getDataProvider()->setParam('do', 'getShoppingCartCampaigns');
|
85 |
+
$this->getDataProvider()->setArrayParam('productNumber',$this->productIds);
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* returns the campaigns
|
90 |
+
*
|
91 |
+
* @return FACTFinder_CampaignIterator
|
92 |
+
*/
|
93 |
+
public function getCampaigns() {
|
94 |
+
if (!$this->campaigns || $this->campaigns == null) {
|
95 |
+
$this->campaigns = $this->createCampaigns();
|
96 |
+
$this->campaignsUpToDate == true;
|
97 |
+
}
|
98 |
+
return $this->campaigns;
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* create campaigns
|
103 |
+
*
|
104 |
+
* @return FACTFinder_CampaignIterator
|
105 |
+
*/
|
106 |
+
protected function createCampaigns()
|
107 |
+
{
|
108 |
+
$this->log->debug("Product Campaigns not supported before FACT-Finder 6.7.");
|
109 |
+
$campaigns = array();
|
110 |
+
$campaignIterator = FF::getInstance('campaignIterator', $campaigns);
|
111 |
+
return $campaignIterator;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
lib/FACTFinder/Default/RecommendationAdapter.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FACT-Finder PHP Framework
|
4 |
+
*
|
5 |
+
* @category Library
|
6 |
+
* @package FACTFinder\Xml67
|
7 |
+
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* adapter for the factfinder recommendation engine, working with the XML interface of FF6.7
|
12 |
+
*
|
13 |
+
* @author Rudolf Batt <rb@omikron.net>
|
14 |
+
* @version $Id$
|
15 |
+
* @package FACTFinder\Xml68
|
16 |
+
*/
|
17 |
+
class FACTFinder_Default_RecommendationAdapter extends FACTFinder_Abstract_Adapter
|
18 |
+
{
|
19 |
+
protected $productIds = array();
|
20 |
+
protected $recommendation;
|
21 |
+
protected $recommendationUpToDate = false;
|
22 |
+
|
23 |
+
protected $idsOnly = false;
|
24 |
+
/*
|
25 |
+
* Option for XML query. 0 means "no maximum".
|
26 |
+
*/
|
27 |
+
protected $maxResults = 0;
|
28 |
+
|
29 |
+
/*
|
30 |
+
* @return int $maxResults
|
31 |
+
*/
|
32 |
+
public function getMaxResults() {
|
33 |
+
return $this->maxResults;
|
34 |
+
}
|
35 |
+
|
36 |
+
/*
|
37 |
+
* @param int $count positive integer (negative will be treated as 0)
|
38 |
+
*/
|
39 |
+
public function setMaxResults($count) {
|
40 |
+
$this->maxResults = $count < 1 ? 0 : $count;
|
41 |
+
if($count > 0) $this->getDataProvider()->setParam('maxResults', $count);
|
42 |
+
else $this->getDataProvder()->unsetParam('maxResults');
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Set id of product to base recommendation on
|
47 |
+
*
|
48 |
+
* @param int $productId
|
49 |
+
**/
|
50 |
+
public function setProductId($productId) {
|
51 |
+
$this->productIds = array($productId);
|
52 |
+
$this->getDataProvider()->setParam('id', $productId);
|
53 |
+
$this->recommendationUpToDate = false;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Set ids of multiple products to base recommendation on
|
58 |
+
* This feature is only available in FF 6.7 and later
|
59 |
+
* Earlier versions will simply use the first product in the list
|
60 |
+
*
|
61 |
+
* @param array $productIds
|
62 |
+
* @return void
|
63 |
+
*/
|
64 |
+
public function setProductIds($productIds) {
|
65 |
+
$this->productIds = array($productIds[0]);
|
66 |
+
$this->getDataProvider()->setParam('id', $this->productIds);
|
67 |
+
$this->recommendationUpToDate = false;
|
68 |
+
}
|
69 |
+
|
70 |
+
public function setIdsOnly($idsOnly) {
|
71 |
+
// Reset the recommendations, if more detail is wanted than before
|
72 |
+
if($this->idsOnly && !$idsOnly) $recommendationUpToDate = false;
|
73 |
+
$this->idsOnly = $idsOnly;
|
74 |
+
$this->getDataProvider()->setParam('idsOnly', $idsOnly ? 'true' : 'false');
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* returns recommendations for specified id. if no id is set, try to fetch parameter 'id'.
|
79 |
+
* if no id is available, there will be a warning raised and returning an empty array
|
80 |
+
*
|
81 |
+
* @return FACTFinder_Result
|
82 |
+
**/
|
83 |
+
public function getRecommendations() {
|
84 |
+
if (empty($this->productIds)) {
|
85 |
+
$dataProviderParams = $this->getDataProvider()->getParams();
|
86 |
+
$requestParams = $this->getParamsParser()->getRequestParams();
|
87 |
+
if (isset($dataProviderParams['id'])) {
|
88 |
+
$this->productIds = $dataProviderParams['id'];
|
89 |
+
} elseif (isset($requestParams['id'])) {
|
90 |
+
$this->productIds = array($requestParams['id']);
|
91 |
+
}
|
92 |
+
if (empty($this->productIds)) {
|
93 |
+
trigger_error('recommendations can not be loaded without id. could not load id from request', E_USER_WARNING);
|
94 |
+
return array();
|
95 |
+
}
|
96 |
+
}
|
97 |
+
if (!$this->recommendationUpToDate || !isset($this->recommendation) || $this->recommendation == null) {
|
98 |
+
$this->recommendation = $this->createRecommendations();
|
99 |
+
$this->recommendationUpToDate = true;
|
100 |
+
}
|
101 |
+
return $this->recommendation;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* creates the recommendation-records
|
106 |
+
*
|
107 |
+
* @param string id
|
108 |
+
* @return array of FACTFinder_Record objects
|
109 |
+
**/
|
110 |
+
protected function createRecommendations()
|
111 |
+
{
|
112 |
+
$this->log->debug("Recommendations not available before FF 6.0!");
|
113 |
+
return FF::getInstance('result', array(), 0);
|
114 |
+
}
|
115 |
+
}
|
lib/FACTFinder/{Abstract → Default}/ScicAdapter.php
RENAMED
@@ -3,25 +3,29 @@
|
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
-
* @package FACTFinder\
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
-
*
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
-
* @version $Id: ScicAdapter.php
|
15 |
-
* @package FACTFinder\
|
16 |
*/
|
17 |
-
|
18 |
{
|
19 |
/**
|
20 |
* let the data provider save the tracking params
|
21 |
*
|
22 |
* @return boolean $success
|
23 |
*/
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
|
26 |
/**
|
27 |
* if all needed parameters are available at the request like described in the documentation, just use this method to
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
+
* @package FACTFinder\Http
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
+
* http scic adapater
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
+
* @version $Id: ScicAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
+
* @package FACTFinder\Http
|
16 |
*/
|
17 |
+
class FACTFinder_Default_ScicAdapter extends FACTFinder_Abstract_Adapter
|
18 |
{
|
19 |
/**
|
20 |
* let the data provider save the tracking params
|
21 |
*
|
22 |
* @return boolean $success
|
23 |
*/
|
24 |
+
public function applyTracking()
|
25 |
+
{
|
26 |
+
$this->log->debug("Tracking not available before FF 6.0!");
|
27 |
+
return false;
|
28 |
+
}
|
29 |
|
30 |
/**
|
31 |
* if all needed parameters are available at the request like described in the documentation, just use this method to
|
lib/FACTFinder/{Abstract → Default}/SearchAdapter.php
RENAMED
@@ -3,18 +3,18 @@
|
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
-
* @package FACTFinder\
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
-
* adapter
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
-
* @version $Id: SearchAdapter.php
|
15 |
-
* @package FACTFinder\
|
16 |
*/
|
17 |
-
|
18 |
{
|
19 |
private $searchParams;
|
20 |
private $result;
|
@@ -26,23 +26,23 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
26 |
private $campaigns;
|
27 |
private $singleWordSearch;
|
28 |
|
29 |
-
|
30 |
const NO_RESULT = 'noResult';
|
31 |
const RESULTS_FOUND = 'resultsFound';
|
32 |
const NOTHING_FOUND = 'nothingFound';
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
{
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
return $this->getDataProvider()->getData();
|
47 |
}
|
48 |
|
@@ -54,23 +54,35 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
54 |
* returns null, if no article number search was done
|
55 |
*
|
56 |
* @return string status
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
59 |
|
60 |
/**
|
61 |
* returns true if the query matches the article number search regex, else false. also returns false, when there
|
62 |
* was any error
|
63 |
*
|
64 |
* @return boolean isArticleNumberSearch
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
67 |
|
68 |
/**
|
69 |
* returns true when search timed out. even if true, nevertheless result records may exist
|
70 |
*
|
71 |
* @return boolean
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
74 |
|
75 |
/**
|
76 |
* returns the search status of the search, which is one of this class constants:
|
@@ -80,77 +92,117 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
80 |
* returns null, if no article number search was done
|
81 |
*
|
82 |
* @return string status
|
83 |
-
|
84 |
-
|
|
|
|
|
|
|
|
|
85 |
|
86 |
/**
|
87 |
* creates the result object
|
88 |
*
|
89 |
* @return FACTFinder_Result
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
92 |
|
93 |
/**
|
94 |
* creates the asn object
|
95 |
*
|
96 |
* @return FACTFinder_Asn
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
99 |
|
100 |
/**
|
101 |
* creates the sorting object
|
102 |
*
|
103 |
* @return array of FACTFinder_Item objects
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
106 |
|
107 |
/**
|
108 |
* creates the paging object
|
109 |
*
|
110 |
* @return FACTFinder_Paging object
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
113 |
|
114 |
/**
|
115 |
* creates the paging object
|
116 |
*
|
117 |
* @return FACTFinder_ProductsPerPageOptions object
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
120 |
|
121 |
/**
|
122 |
* create breadcrumbtrail
|
123 |
*
|
124 |
* @return array of FACTFinder_BreadCrumbItem objects
|
125 |
*/
|
126 |
-
|
|
|
|
|
|
|
|
|
127 |
|
128 |
/**
|
129 |
* create campaigns
|
130 |
*
|
131 |
* @return FACTFinder_CampaignIterator
|
132 |
*/
|
133 |
-
|
|
|
|
|
|
|
|
|
134 |
|
135 |
/**
|
136 |
-
* create
|
137 |
*
|
138 |
* @return array of FACTFinder_SuggestQuery objects
|
139 |
*/
|
140 |
-
|
|
|
|
|
|
|
|
|
141 |
|
142 |
/**
|
143 |
* returns the search params object
|
144 |
*
|
145 |
* @return FACTFinder_Parameters result
|
146 |
-
|
147 |
-
|
|
|
|
|
|
|
|
|
148 |
|
149 |
/**
|
150 |
* returns the search params object
|
151 |
*
|
152 |
* @return FACTFinder_Parameters result
|
153 |
-
|
154 |
public function getSearchParams() {
|
155 |
if ($this->searchParams == null) {
|
156 |
$this->searchParams = $this->createSearchParams();
|
@@ -162,7 +214,7 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
162 |
* returns the result object
|
163 |
*
|
164 |
* @return FACTFinder_Result result
|
165 |
-
|
166 |
public function getResult() {
|
167 |
if ($this->result == null) {
|
168 |
$this->result = $this->createResult();
|
@@ -174,7 +226,7 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
174 |
* returns the asn object
|
175 |
*
|
176 |
* @return FACTFinder_Asn
|
177 |
-
|
178 |
public function getAsn() {
|
179 |
if ($this->asn == null) {
|
180 |
$this->asn = $this->createAsn();
|
@@ -186,7 +238,7 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
186 |
* returns the sorting
|
187 |
*
|
188 |
* @return array of FACTFinder_SortItem objects
|
189 |
-
|
190 |
public function getSorting() {
|
191 |
if ($this->sorting == null) {
|
192 |
$this->sorting = $this->createSorting();
|
@@ -198,7 +250,7 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
198 |
* returns the paging
|
199 |
*
|
200 |
* @return FACTFinder_Paging object
|
201 |
-
|
202 |
public function getPaging() {
|
203 |
if ($this->paging == null) {
|
204 |
$this->paging = $this->createPaging();
|
@@ -247,7 +299,7 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
247 |
* FACTFinder_SuggestQuery objects, for each word a single item. by clicking at a singleWordSearch item, the result
|
248 |
* will get better
|
249 |
* please notice, that this feature has to be actived in the FACT-Finder search environment, so this method returns
|
250 |
-
|
251 |
*
|
252 |
* @return array of FACTFinder_SuggestQuery objects
|
253 |
*/
|
@@ -257,4 +309,4 @@ abstract class FACTFinder_Abstract_SearchAdapter extends FACTFinder_Abstract_Ada
|
|
257 |
}
|
258 |
return $this->singleWordSearch;
|
259 |
}
|
260 |
-
}
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
+
* @package FACTFinder\Xml67
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
+
* search adapter using the xml interface. expects a xml formated string from the dataprovider
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
+
* @version $Id: SearchAdapter.php 25985 2010-06-30 15:31:53Z rb $
|
15 |
+
* @package FACTFinder\Xml68
|
16 |
*/
|
17 |
+
class FACTFinder_Default_SearchAdapter extends FACTFinder_Abstract_Adapter
|
18 |
{
|
19 |
private $searchParams;
|
20 |
private $result;
|
26 |
private $campaigns;
|
27 |
private $singleWordSearch;
|
28 |
|
29 |
+
const NO_QUERY = 'noQuery';
|
30 |
const NO_RESULT = 'noResult';
|
31 |
const RESULTS_FOUND = 'resultsFound';
|
32 |
const NOTHING_FOUND = 'nothingFound';
|
33 |
|
34 |
+
/**
|
35 |
+
* @throws Exception if there is no query or no catalog-parameter set at the dataprovider
|
36 |
+
*/
|
37 |
+
protected function getData()
|
38 |
{
|
39 |
+
$params = $this->getDataProvider()->getParams();
|
40 |
+
if ((!isset($params['query']) || strlen($params['query']) == 0)
|
41 |
+
&& (!isset($params['seoPath']) || strlen($params['seoPath']) == 0)
|
42 |
+
&& (!isset($params['catalog']) || $params['catalog'] != 'true')) {
|
43 |
+
$this->log->error("No query was set.");
|
44 |
+
throw new Exception(self::NO_QUERY);
|
45 |
+
}
|
46 |
return $this->getDataProvider()->getData();
|
47 |
}
|
48 |
|
54 |
* returns null, if no article number search was done
|
55 |
*
|
56 |
* @return string status
|
57 |
+
**/
|
58 |
+
public function getArticleNumberSearchStatus()
|
59 |
+
{
|
60 |
+
$this->log->debug("Article number search status not available before FF 6.0!");
|
61 |
+
return self::RESULTS_FOUND;
|
62 |
+
}
|
63 |
|
64 |
/**
|
65 |
* returns true if the query matches the article number search regex, else false. also returns false, when there
|
66 |
* was any error
|
67 |
*
|
68 |
* @return boolean isArticleNumberSearch
|
69 |
+
**/
|
70 |
+
public function isArticleNumberSearch()
|
71 |
+
{
|
72 |
+
$this->log->debug("Article number search not available before FF 6.0!");
|
73 |
+
return false;
|
74 |
+
}
|
75 |
|
76 |
/**
|
77 |
* returns true when search timed out. even if true, nevertheless result records may exist
|
78 |
*
|
79 |
* @return boolean
|
80 |
+
**/
|
81 |
+
public function isSearchTimedOut()
|
82 |
+
{
|
83 |
+
$this->log->debug("Search timeout status not available before FF 6.0!");
|
84 |
+
return false;
|
85 |
+
}
|
86 |
|
87 |
/**
|
88 |
* returns the search status of the search, which is one of this class constants:
|
92 |
* returns null, if no article number search was done
|
93 |
*
|
94 |
* @return string status
|
95 |
+
**/
|
96 |
+
public function getStatus()
|
97 |
+
{
|
98 |
+
$this->log->debug("Search status not available before FF 6.0!");
|
99 |
+
return self::RESULTS_FOUND;
|
100 |
+
}
|
101 |
|
102 |
/**
|
103 |
* creates the result object
|
104 |
*
|
105 |
* @return FACTFinder_Result
|
106 |
+
**/
|
107 |
+
protected function createResult()
|
108 |
+
{
|
109 |
+
$this->log->debug("Search not available before FF 6.0!");
|
110 |
+
return FF::getInstance('result', array(), 0);
|
111 |
+
}
|
112 |
|
113 |
/**
|
114 |
* creates the asn object
|
115 |
*
|
116 |
* @return FACTFinder_Asn
|
117 |
+
**/
|
118 |
+
protected function createAsn()
|
119 |
+
{
|
120 |
+
$this->log->debug("After Search Navigation not available before FF 6.0!");
|
121 |
+
return FF::getInstance('asn', array());
|
122 |
+
}
|
123 |
|
124 |
/**
|
125 |
* creates the sorting object
|
126 |
*
|
127 |
* @return array of FACTFinder_Item objects
|
128 |
+
**/
|
129 |
+
protected function createSorting()
|
130 |
+
{
|
131 |
+
$this->log->debug("Sorting not available before FF 6.0!");
|
132 |
+
return array();
|
133 |
+
}
|
134 |
|
135 |
/**
|
136 |
* creates the paging object
|
137 |
*
|
138 |
* @return FACTFinder_Paging object
|
139 |
+
**/
|
140 |
+
protected function createPaging()
|
141 |
+
{
|
142 |
+
$this->log->debug("Paging not available before FF 6.0!");
|
143 |
+
return null;
|
144 |
+
}
|
145 |
|
146 |
/**
|
147 |
* creates the paging object
|
148 |
*
|
149 |
* @return FACTFinder_ProductsPerPageOptions object
|
150 |
+
**/
|
151 |
+
protected function createProductsPerPageOptions()
|
152 |
+
{
|
153 |
+
$this->log->debug("Paging options not available before FF 6.0!");
|
154 |
+
return array();
|
155 |
+
}
|
156 |
|
157 |
/**
|
158 |
* create breadcrumbtrail
|
159 |
*
|
160 |
* @return array of FACTFinder_BreadCrumbItem objects
|
161 |
*/
|
162 |
+
protected function createBreadCrumbTrail()
|
163 |
+
{
|
164 |
+
$this->log->debug("Breadcrumb trail not available before FF 6.0!");
|
165 |
+
return array();
|
166 |
+
}
|
167 |
|
168 |
/**
|
169 |
* create campaigns
|
170 |
*
|
171 |
* @return FACTFinder_CampaignIterator
|
172 |
*/
|
173 |
+
protected function createCampaigns()
|
174 |
+
{
|
175 |
+
$this->log->debug("Campaigns not available before FF 6.0!");
|
176 |
+
return FF::getInstance('campaignIterator', array());
|
177 |
+
}
|
178 |
|
179 |
/**
|
180 |
+
* create single word search
|
181 |
*
|
182 |
* @return array of FACTFinder_SuggestQuery objects
|
183 |
*/
|
184 |
+
protected function createSingleWordSearch()
|
185 |
+
{
|
186 |
+
$this->log->debug("Single word search not available before FF 6.0!");
|
187 |
+
return array();
|
188 |
+
}
|
189 |
|
190 |
/**
|
191 |
* returns the search params object
|
192 |
*
|
193 |
* @return FACTFinder_Parameters result
|
194 |
+
**/
|
195 |
+
protected function createSearchParams()
|
196 |
+
{
|
197 |
+
$this->log->debug("Search parameter not available before FF 6.0!");
|
198 |
+
return null;
|
199 |
+
}
|
200 |
|
201 |
/**
|
202 |
* returns the search params object
|
203 |
*
|
204 |
* @return FACTFinder_Parameters result
|
205 |
+
**/
|
206 |
public function getSearchParams() {
|
207 |
if ($this->searchParams == null) {
|
208 |
$this->searchParams = $this->createSearchParams();
|
214 |
* returns the result object
|
215 |
*
|
216 |
* @return FACTFinder_Result result
|
217 |
+
**/
|
218 |
public function getResult() {
|
219 |
if ($this->result == null) {
|
220 |
$this->result = $this->createResult();
|
226 |
* returns the asn object
|
227 |
*
|
228 |
* @return FACTFinder_Asn
|
229 |
+
**/
|
230 |
public function getAsn() {
|
231 |
if ($this->asn == null) {
|
232 |
$this->asn = $this->createAsn();
|
238 |
* returns the sorting
|
239 |
*
|
240 |
* @return array of FACTFinder_SortItem objects
|
241 |
+
**/
|
242 |
public function getSorting() {
|
243 |
if ($this->sorting == null) {
|
244 |
$this->sorting = $this->createSorting();
|
250 |
* returns the paging
|
251 |
*
|
252 |
* @return FACTFinder_Paging object
|
253 |
+
**/
|
254 |
public function getPaging() {
|
255 |
if ($this->paging == null) {
|
256 |
$this->paging = $this->createPaging();
|
299 |
* FACTFinder_SuggestQuery objects, for each word a single item. by clicking at a singleWordSearch item, the result
|
300 |
* will get better
|
301 |
* please notice, that this feature has to be actived in the FACT-Finder search environment, so this method returns
|
302 |
+
* an empty array, if there are no singleWordSearch items
|
303 |
*
|
304 |
* @return array of FACTFinder_SuggestQuery objects
|
305 |
*/
|
309 |
}
|
310 |
return $this->singleWordSearch;
|
311 |
}
|
312 |
+
}
|
lib/FACTFinder/Default/SimilarRecordsAdapter.php
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FACT-Finder PHP Framework
|
4 |
+
*
|
5 |
+
* @category Library
|
6 |
+
* @package FACTFinder\Xml67
|
7 |
+
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* similar records adapter using the xml interface
|
12 |
+
*
|
13 |
+
* @author Rudolf Batt <rb@omikron.net>
|
14 |
+
* @version $Id: SimilarRecordsAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
+
* @package FACTFinder\Xml68
|
16 |
+
*/
|
17 |
+
class FACTFinder_Default_SimilarRecordsAdapter extends FACTFinder_Abstract_Adapter
|
18 |
+
{
|
19 |
+
protected $productId;
|
20 |
+
private $similarAttributes;
|
21 |
+
private $similarRecords;
|
22 |
+
protected $attributesUpToDate = false;
|
23 |
+
protected $recordsUpToDate = false;
|
24 |
+
|
25 |
+
protected $idsOnly = false;
|
26 |
+
|
27 |
+
/*
|
28 |
+
* Option for XML query. 0 means "no maximum".
|
29 |
+
*/
|
30 |
+
private $maxRecordCount = 0;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Set id of product to get similar records for
|
34 |
+
*
|
35 |
+
* @param int $productId
|
36 |
+
**/
|
37 |
+
public function setProductId($productId) {
|
38 |
+
$this->productId = $productId;
|
39 |
+
$this->getDataProvider()->setParam('id', $productId);
|
40 |
+
$this->attributesUpToDate = false;
|
41 |
+
$this->recordsUpToDate = false;
|
42 |
+
}
|
43 |
+
|
44 |
+
/*
|
45 |
+
* @return int $maxRecordCount
|
46 |
+
*/
|
47 |
+
public function getMaxRecordCount() {
|
48 |
+
return $this->maxRecordCount;
|
49 |
+
}
|
50 |
+
|
51 |
+
/*
|
52 |
+
* @param int $count positive integer (negative will be treated as 0)
|
53 |
+
*/
|
54 |
+
public function setMaxRecordCount($count) {
|
55 |
+
$this->maxRecordCount = $count < 1 ? 0 : $count;
|
56 |
+
if($count > 0) $this->getDataProvider()->setParam('maxRecordCount', $count);
|
57 |
+
else $this->getDataProvder()->unsetParam('maxRecordCount');
|
58 |
+
}
|
59 |
+
|
60 |
+
public function setIdsOnly($idsOnly) {
|
61 |
+
// Reset the similar records, if more detail is wanted than before
|
62 |
+
if($this->idsOnly && !$idsOnly) $this->recordsUpToDate = false;
|
63 |
+
$this->idsOnly = $idsOnly;
|
64 |
+
if($idsOnly)
|
65 |
+
$this->getDataProvider()->setParam('idsOnly','true');
|
66 |
+
else
|
67 |
+
$this->getDataProvider()->unsetParam('idsOnly');
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* returns similar attributes for previously specified id. if no id is set, try to fetch parameter 'id'.
|
72 |
+
* if no id is available, there will be a warning raised and returning an empty array
|
73 |
+
|
74 |
+
* @return array $similarAttributes of strings (field names as keys)
|
75 |
+
*/
|
76 |
+
public function getSimilarAttributes() {
|
77 |
+
if (strlen($this->productId) == 0) {
|
78 |
+
$requestParams = $this->getParamsParser()->getRequestParams();
|
79 |
+
if (isset($requestParams['id'])) {
|
80 |
+
$this->productId = $requestParams['id'];
|
81 |
+
}
|
82 |
+
if (strlen($this->productId) == 0) {
|
83 |
+
trigger_error('recommendations can not be loaded without id. could not load id from request', E_USER_WARNING);
|
84 |
+
return array();
|
85 |
+
}
|
86 |
+
}
|
87 |
+
if (!$this->attributesUpToDate || !isset($this->similarAttributes) || $this->similarAttributes == null) {
|
88 |
+
$this->similarAttributes = $this->createSimilarAttributes();
|
89 |
+
$this->attributesUpToDate = true;
|
90 |
+
}
|
91 |
+
return $this->similarAttributes;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* returns similar records for specified id. if no id is set, try to fetch parameter 'id'.
|
96 |
+
* if no id is available, there will be a warning raised and returning an empty array.
|
97 |
+
*
|
98 |
+
* @param string $id (optional; if not set try to fetch from request param)
|
99 |
+
* @return array $similarRecords list of FACTFinder_Record objects
|
100 |
+
*/
|
101 |
+
public function getSimilarRecords() {
|
102 |
+
if (strlen($this->productId) == 0) {
|
103 |
+
$requestParams = $this->getParamsParser()->getRequestParams();
|
104 |
+
if (isset($requestParams['id'])) {
|
105 |
+
$this->productId = $requestParams['id'];
|
106 |
+
}
|
107 |
+
if (strlen($this->productId) == 0) {
|
108 |
+
trigger_error('similar records can not be loaded without id. could not load id from request', E_USER_WARNING);
|
109 |
+
return array();
|
110 |
+
}
|
111 |
+
}
|
112 |
+
if (!$this->recordsUpToDate || !isset($this->similarRecords) || $this->similarRecords == null) {
|
113 |
+
$this->similarRecords = $this->createSimilarRecords();
|
114 |
+
$this->recordsUpToDate = true;
|
115 |
+
}
|
116 |
+
return $this->similarRecords;
|
117 |
+
}
|
118 |
+
/**
|
119 |
+
* @param string id of the product which should be used to get similar attributes
|
120 |
+
* @return array $similarAttributes of strings (field names as keys)
|
121 |
+
**/
|
122 |
+
protected function createSimilarAttributes() {
|
123 |
+
$this->log->debug("Similar records not supported before FACT-Finder 6.6!");
|
124 |
+
$similarAttributes = array();
|
125 |
+
return $similarAttributes;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* @param string id of the product which should be used to get similar records
|
130 |
+
* @return array $similarRecords list of FACTFinder_Record items
|
131 |
+
**/
|
132 |
+
protected function createSimilarRecords() {
|
133 |
+
$this->log->debug("Similar records not supported before FACT-Finder 6.6!");
|
134 |
+
$similarRecords = array();
|
135 |
+
return $similarRecords;
|
136 |
+
}
|
137 |
+
}
|
lib/FACTFinder/{Abstract → Default}/SuggestAdapter.php
RENAMED
@@ -3,18 +3,18 @@
|
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
-
* @package FACTFinder\
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
-
* adapter
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
* @version $Id: SuggestAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
-
* @package FACTFinder\
|
16 |
*/
|
17 |
-
|
18 |
{
|
19 |
private $suggestions;
|
20 |
|
@@ -32,9 +32,13 @@ abstract class FACTFinder_Abstract_SuggestAdapter extends FACTFinder_Abstract_Ad
|
|
32 |
}
|
33 |
|
34 |
/**
|
35 |
-
* create and return suggestions.
|
36 |
*
|
37 |
* @return mixed
|
38 |
*/
|
39 |
-
|
|
|
|
|
|
|
|
|
40 |
}
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
+
* @package FACTFinder\Xml67
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
+
* suggest adapter using the xml interface. expects a xml formated string from the dataprovider
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
* @version $Id: SuggestAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
+
* @package FACTFinder\Xml68
|
16 |
*/
|
17 |
+
class FACTFinder_Default_SuggestAdapter extends FACTFinder_Abstract_Adapter
|
18 |
{
|
19 |
private $suggestions;
|
20 |
|
32 |
}
|
33 |
|
34 |
/**
|
35 |
+
* create and return suggestions. dependent to the implementation this can be any type
|
36 |
*
|
37 |
* @return mixed
|
38 |
*/
|
39 |
+
protected function createSuggestions()
|
40 |
+
{
|
41 |
+
$this->log->debug("Suggest not available before FF 6.0!");
|
42 |
+
return array();
|
43 |
+
}
|
44 |
}
|
lib/FACTFinder/{Abstract → Default}/TagCloudAdapter.php
RENAMED
@@ -3,18 +3,18 @@
|
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
-
* @package FACTFinder\
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
-
* adapter
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
* @version $Id: TagCloudAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
-
* @package FACTFinder\
|
16 |
*/
|
17 |
-
|
18 |
{
|
19 |
private $tagCloud;
|
20 |
|
@@ -33,5 +33,9 @@ abstract class FACTFinder_Abstract_TagCloudAdapter extends FACTFinder_Abstract_A
|
|
33 |
/**
|
34 |
* @return array $tagCloud list of FACTFinder_Tag objects
|
35 |
*/
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
3 |
* FACT-Finder PHP Framework
|
4 |
*
|
5 |
* @category Library
|
6 |
+
* @package FACTFinder\Xml67
|
7 |
* @copyright Copyright (c) 2012 Omikron Data Quality GmbH (www.omikron.net)
|
8 |
*/
|
9 |
|
10 |
/**
|
11 |
+
* tag cloud adapter using the xml interface
|
12 |
*
|
13 |
* @author Rudolf Batt <rb@omikron.net>
|
14 |
* @version $Id: TagCloudAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
+
* @package FACTFinder\Xml68
|
16 |
*/
|
17 |
+
class FACTFinder_Default_TagCloudAdapter extends FACTFinder_Abstract_Adapter
|
18 |
{
|
19 |
private $tagCloud;
|
20 |
|
33 |
/**
|
34 |
* @return array $tagCloud list of FACTFinder_Tag objects
|
35 |
*/
|
36 |
+
protected function createTagCloud()
|
37 |
+
{
|
38 |
+
$this->log->debug("Tag cloud not available before FF 6.0!");
|
39 |
+
return array();
|
40 |
+
}
|
41 |
+
}
|
lib/FACTFinder/Http/DataProvider.php
CHANGED
@@ -15,12 +15,10 @@
|
|
15 |
* @package FACTFinder\Http
|
16 |
*/
|
17 |
|
18 |
-
include_once LIB_DIR . DS . 'SAI' . DS . 'Curl.php';
|
19 |
-
|
20 |
class FACTFinder_Http_DataProvider extends FACTFinder_Abstract_DataProvider
|
21 |
{
|
22 |
/**
|
23 |
-
* @var
|
24 |
*/
|
25 |
protected $curl;
|
26 |
|
@@ -41,10 +39,10 @@ class FACTFinder_Http_DataProvider extends FACTFinder_Abstract_DataProvider
|
|
41 |
protected $lastCurlErrno = null;
|
42 |
protected $lastCurlError = null;
|
43 |
|
44 |
-
function __construct(array $params = null, FACTFinder_Abstract_Configuration $config = null, FACTFinder_Abstract_Logger $log = null,
|
45 |
if($curl === null)
|
46 |
{
|
47 |
-
$curl =
|
48 |
}
|
49 |
$this->curl = $curl;
|
50 |
$this->urlBuilder = FF::getInstance('http/urlBuilder', $params, $config, $log);
|
@@ -201,7 +199,14 @@ class FACTFinder_Http_DataProvider extends FACTFinder_Abstract_DataProvider
|
|
201 |
**/
|
202 |
protected function loadResponse()
|
203 |
{
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
|
206 |
$cResource = $this->curl->curl_init();
|
207 |
|
@@ -234,8 +239,8 @@ class FACTFinder_Http_DataProvider extends FACTFinder_Abstract_DataProvider
|
|
234 |
public function prepareRequest()
|
235 |
{
|
236 |
if ($this->getType() === null) {
|
237 |
-
$this->log->
|
238 |
-
throw new
|
239 |
}
|
240 |
|
241 |
$config = $this->getConfig();
|
@@ -307,4 +312,12 @@ class FACTFinder_Http_DataProvider extends FACTFinder_Abstract_DataProvider
|
|
307 |
|
308 |
return $this->lastCurlErrno;
|
309 |
}
|
310 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
* @package FACTFinder\Http
|
16 |
*/
|
17 |
|
|
|
|
|
18 |
class FACTFinder_Http_DataProvider extends FACTFinder_Abstract_DataProvider
|
19 |
{
|
20 |
/**
|
21 |
+
* @var FACTFinder_CurlInterface
|
22 |
*/
|
23 |
protected $curl;
|
24 |
|
39 |
protected $lastCurlErrno = null;
|
40 |
protected $lastCurlError = null;
|
41 |
|
42 |
+
function __construct(array $params = null, FACTFinder_Abstract_Configuration $config = null, FACTFinder_Abstract_Logger $log = null, FACTFinder_CurlInterface $curl = null) {
|
43 |
if($curl === null)
|
44 |
{
|
45 |
+
$curl = FF::getInstance('curl');
|
46 |
}
|
47 |
$this->curl = $curl;
|
48 |
$this->urlBuilder = FF::getInstance('http/urlBuilder', $params, $config, $log);
|
199 |
**/
|
200 |
protected function loadResponse()
|
201 |
{
|
202 |
+
try
|
203 |
+
{
|
204 |
+
$this->prepareRequest();
|
205 |
+
}
|
206 |
+
catch(NoRequestTypeException $e)
|
207 |
+
{
|
208 |
+
return "";
|
209 |
+
}
|
210 |
|
211 |
$cResource = $this->curl->curl_init();
|
212 |
|
239 |
public function prepareRequest()
|
240 |
{
|
241 |
if ($this->getType() === null) {
|
242 |
+
$this->log->debug("Request type missing.");
|
243 |
+
throw new NoRequestTypeException('Request type was not set! Cannot send request without knowing the type.');
|
244 |
}
|
245 |
|
246 |
$config = $this->getConfig();
|
312 |
|
313 |
return $this->lastCurlErrno;
|
314 |
}
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* @internal
|
319 |
+
* Exception type needed for data provider
|
320 |
+
*
|
321 |
+
* @package FACTFinder\Http
|
322 |
+
*/
|
323 |
+
class NoRequestTypeException extends Exception {}
|
lib/FACTFinder/Http/ParallelDataProvider.php
CHANGED
@@ -84,7 +84,15 @@ class FACTFinder_Http_ParallelDataProvider
|
|
84 |
$handles[$id] = null;
|
85 |
continue;
|
86 |
}
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
$handle = curl_init();
|
90 |
curl_setopt_array($handle, $dataProvider->getCurlOptions());
|
@@ -122,6 +130,9 @@ class FACTFinder_Http_ParallelDataProvider
|
|
122 |
if($handle == null)
|
123 |
{
|
124 |
$data[$id] = null;
|
|
|
|
|
|
|
125 |
continue;
|
126 |
}
|
127 |
$data[$id] = curl_multi_getcontent($handle);
|
84 |
$handles[$id] = null;
|
85 |
continue;
|
86 |
}
|
87 |
+
try
|
88 |
+
{
|
89 |
+
$dataProvider->prepareRequest();
|
90 |
+
}
|
91 |
+
catch (NoRequestTypeException $e)
|
92 |
+
{
|
93 |
+
$handles[$id] = null;
|
94 |
+
continue;
|
95 |
+
}
|
96 |
|
97 |
$handle = curl_init();
|
98 |
curl_setopt_array($handle, $dataProvider->getCurlOptions());
|
130 |
if($handle == null)
|
131 |
{
|
132 |
$data[$id] = null;
|
133 |
+
$httpCodes[$id] = null;
|
134 |
+
$curlErrnos[$id] = null;
|
135 |
+
$curlErrors[$id] = null;
|
136 |
continue;
|
137 |
}
|
138 |
$data[$id] = curl_multi_getcontent($handle);
|
lib/FACTFinder/Http/ScicAdapter.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @version $Id: ScicAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
* @package FACTFinder\Http
|
16 |
*/
|
17 |
-
class FACTFinder_Http_ScicAdapter extends
|
18 |
{
|
19 |
/**
|
20 |
* init
|
14 |
* @version $Id: ScicAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
* @package FACTFinder\Http
|
16 |
*/
|
17 |
+
class FACTFinder_Http_ScicAdapter extends FACTFinder_Default_ScicAdapter
|
18 |
{
|
19 |
/**
|
20 |
* init
|
lib/FACTFinder/Http/SuggestAdapter.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @version $Id: SuggestAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
* @package FACTFinder\Http
|
16 |
*/
|
17 |
-
class FACTFinder_Http_SuggestAdapter extends
|
18 |
{
|
19 |
/**
|
20 |
* init
|
14 |
* @version $Id: SuggestAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
* @package FACTFinder\Http
|
16 |
*/
|
17 |
+
class FACTFinder_Http_SuggestAdapter extends FACTFinder_Default_SuggestAdapter
|
18 |
{
|
19 |
/**
|
20 |
* init
|
lib/FACTFinder/Loader.php
CHANGED
@@ -104,7 +104,7 @@ class FACTFinder_Loader
|
|
104 |
self::$classNames[$name] = $className;
|
105 |
}
|
106 |
|
107 |
-
// this snippet is from the typo3 class "t3lib_div"
|
108 |
if (func_num_args() > 1) {
|
109 |
// getting the constructor arguments by removing this
|
110 |
// method's first argument (the class name)
|
@@ -121,7 +121,7 @@ class FACTFinder_Loader
|
|
121 |
}
|
122 |
|
123 |
/**
|
124 |
-
* creates an instance of the class once and returns it
|
125 |
*
|
126 |
* @param string class name to instantiate
|
127 |
* @param mixed optional as many parameters as the class needs to be created
|
@@ -162,7 +162,7 @@ class FACTFinder_Loader
|
|
162 |
|
163 |
/**
|
164 |
* check whether there is a custom class with the prefix "FACTFinderCustom_" instead of "FACTFinder_"
|
165 |
-
* if non of them exists, it also checks if the name is the
|
166 |
*/
|
167 |
protected static function getClassName($name)
|
168 |
{
|
@@ -173,6 +173,11 @@ class FACTFinder_Loader
|
|
173 |
$oldCustomClassName = 'Custom_' . $name;
|
174 |
$customClassName = 'FACTFinderCustom_' . $name;
|
175 |
$factfinderClassName = 'FACTFinder_' . $name;
|
|
|
|
|
|
|
|
|
|
|
176 |
$defaultClassName = $name;
|
177 |
|
178 |
if (self::canLoadClass($customClassName)) {
|
@@ -181,7 +186,9 @@ class FACTFinder_Loader
|
|
181 |
$className = $oldCustomClassName;
|
182 |
} else if (self::canLoadClass($factfinderClassName)) {
|
183 |
$className = $factfinderClassName;
|
184 |
-
} else if (
|
|
|
|
|
185 |
$className = $defaultClassName;
|
186 |
} else {
|
187 |
self::getLogger()->error("Could not load class '$defaultClassName'.");
|
104 |
self::$classNames[$name] = $className;
|
105 |
}
|
106 |
|
107 |
+
// this snippet is from the typo3 class "t3lib_div" written by Kasper Skaarhoj <kasperYYYY@typo3.com>
|
108 |
if (func_num_args() > 1) {
|
109 |
// getting the constructor arguments by removing this
|
110 |
// method's first argument (the class name)
|
121 |
}
|
122 |
|
123 |
/**
|
124 |
+
* creates an instance of the class once and returns it every time. uses getInstance
|
125 |
*
|
126 |
* @param string class name to instantiate
|
127 |
* @param mixed optional as many parameters as the class needs to be created
|
162 |
|
163 |
/**
|
164 |
* check whether there is a custom class with the prefix "FACTFinderCustom_" instead of "FACTFinder_"
|
165 |
+
* if non of them exists, it also checks if the name is the class name itself
|
166 |
*/
|
167 |
protected static function getClassName($name)
|
168 |
{
|
173 |
$oldCustomClassName = 'Custom_' . $name;
|
174 |
$customClassName = 'FACTFinderCustom_' . $name;
|
175 |
$factfinderClassName = 'FACTFinder_' . $name;
|
176 |
+
$defaultAdapterName = '';
|
177 |
+
if(preg_match('/adapter$/i', $name))
|
178 |
+
{
|
179 |
+
$defaultAdapterName = 'FACTFinder_' . preg_replace('~^[^_]*~', 'Default', $name);
|
180 |
+
}
|
181 |
$defaultClassName = $name;
|
182 |
|
183 |
if (self::canLoadClass($customClassName)) {
|
186 |
$className = $oldCustomClassName;
|
187 |
} else if (self::canLoadClass($factfinderClassName)) {
|
188 |
$className = $factfinderClassName;
|
189 |
+
} else if ($defaultAdapterName && self::canLoadClass($defaultAdapterName)) {
|
190 |
+
$className = $defaultAdapterName;
|
191 |
+
} else if (class_exists($defaultClassName)) {
|
192 |
$className = $defaultClassName;
|
193 |
} else {
|
194 |
self::getLogger()->error("Could not load class '$defaultClassName'.");
|
lib/FACTFinder/Util.php
CHANGED
@@ -19,7 +19,7 @@ class FACTFinder_Util
|
|
19 |
protected $searchAdapter;
|
20 |
protected $ffparams;
|
21 |
|
22 |
-
public function __construct(FACTFinder_Parameters $ffparams,
|
23 |
$this->ffparams = $ffparams;
|
24 |
$this->searchAdapter = $searchAdapter;
|
25 |
}
|
19 |
protected $searchAdapter;
|
20 |
protected $ffparams;
|
21 |
|
22 |
+
public function __construct(FACTFinder_Parameters $ffparams, FACTFinder_Default_SearchAdapter $searchAdapter) {
|
23 |
$this->ffparams = $ffparams;
|
24 |
$this->searchAdapter = $searchAdapter;
|
25 |
}
|
lib/FACTFinder/Xml65/ImportAdapter.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @version $Id: TagCloudAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
* @package FACTFinder\Xml65
|
16 |
*/
|
17 |
-
class FACTFinder_Xml65_ImportAdapter extends
|
18 |
{
|
19 |
/**
|
20 |
* @return void
|
14 |
* @version $Id: TagCloudAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
* @package FACTFinder\Xml65
|
16 |
*/
|
17 |
+
class FACTFinder_Xml65_ImportAdapter extends FACTFinder_Default_ImportAdapter
|
18 |
{
|
19 |
/**
|
20 |
* @return void
|
lib/FACTFinder/Xml65/RecommendationAdapter.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @version $Id$
|
15 |
* @package FACTFinder\Xml65
|
16 |
*/
|
17 |
-
class FACTFinder_Xml65_RecommendationAdapter extends
|
18 |
{
|
19 |
|
20 |
protected $xmlData = null;
|
14 |
* @version $Id$
|
15 |
* @package FACTFinder\Xml65
|
16 |
*/
|
17 |
+
class FACTFinder_Xml65_RecommendationAdapter extends FACTFinder_Default_RecommendationAdapter
|
18 |
{
|
19 |
|
20 |
protected $xmlData = null;
|
lib/FACTFinder/Xml65/SearchAdapter.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @version $Id: SearchAdapter.php 25985 2010-06-30 15:31:53Z rb $
|
15 |
* @package FACTFinder\Xml65
|
16 |
*/
|
17 |
-
class FACTFinder_Xml65_SearchAdapter extends
|
18 |
{
|
19 |
protected $status = null;
|
20 |
protected $isArticleNumberSearch;
|
@@ -221,18 +221,13 @@ class FACTFinder_Xml65_SearchAdapter extends FACTFinder_Abstract_SearchAdapter
|
|
221 |
if (isset($xmlGroup->attributes()->unit)) {
|
222 |
$groupUnit = strval($xmlGroup->attributes()->unit);
|
223 |
}
|
224 |
-
|
225 |
-
$groupStyle = 'DEFAULT';
|
226 |
-
if (isset($xmlGroup->attributes()->style)) {
|
227 |
-
$groupStyle = strval($xmlGroup->attributes()->style);
|
228 |
-
}
|
229 |
|
230 |
$group = FF::getInstance('asnGroup',
|
231 |
array(),
|
232 |
$encodingHandler->encodeServerContentForPage((string)$xmlGroup->attributes()->name),
|
233 |
$encodingHandler->encodeServerContentForPage((string)$xmlGroup->attributes()->detailedLinks),
|
234 |
$groupUnit,
|
235 |
-
$
|
236 |
);
|
237 |
|
238 |
//get filters of the current group
|
14 |
* @version $Id: SearchAdapter.php 25985 2010-06-30 15:31:53Z rb $
|
15 |
* @package FACTFinder\Xml65
|
16 |
*/
|
17 |
+
class FACTFinder_Xml65_SearchAdapter extends FACTFinder_Default_SearchAdapter
|
18 |
{
|
19 |
protected $status = null;
|
20 |
protected $isArticleNumberSearch;
|
221 |
if (isset($xmlGroup->attributes()->unit)) {
|
222 |
$groupUnit = strval($xmlGroup->attributes()->unit);
|
223 |
}
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
$group = FF::getInstance('asnGroup',
|
226 |
array(),
|
227 |
$encodingHandler->encodeServerContentForPage((string)$xmlGroup->attributes()->name),
|
228 |
$encodingHandler->encodeServerContentForPage((string)$xmlGroup->attributes()->detailedLinks),
|
229 |
$groupUnit,
|
230 |
+
strval($xmlGroup->attributes()->style) == 'SLIDER'
|
231 |
);
|
232 |
|
233 |
//get filters of the current group
|
lib/FACTFinder/Xml65/TagCloudAdapter.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @version $Id: TagCloudAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
* @package FACTFinder\Xml65
|
16 |
*/
|
17 |
-
class FACTFinder_Xml65_TagCloudAdapter extends
|
18 |
{
|
19 |
/**
|
20 |
* @return void
|
14 |
* @version $Id: TagCloudAdapter.php 25893 2010-06-29 08:19:43Z rb $
|
15 |
* @package FACTFinder\Xml65
|
16 |
*/
|
17 |
+
class FACTFinder_Xml65_TagCloudAdapter extends FACTFinder_Default_TagCloudAdapter
|
18 |
{
|
19 |
/**
|
20 |
* @return void
|
lib/FACTFinder/Xml66/CompareAdapter.php
CHANGED
@@ -11,10 +11,10 @@
|
|
11 |
* product comparison adapter using the xml interface
|
12 |
*
|
13 |
* @author Martin Buettner <martin.buettner@omikron.net>
|
14 |
-
* @version $Id:
|
15 |
* @package FACTFinder\Xml66
|
16 |
*/
|
17 |
-
class FACTFinder_Xml66_CompareAdapter extends
|
18 |
{
|
19 |
/**
|
20 |
* @return void
|
11 |
* product comparison adapter using the xml interface
|
12 |
*
|
13 |
* @author Martin Buettner <martin.buettner@omikron.net>
|
14 |
+
* @version $Id: CompareAdapter.php 42955 2012-01-25 17:04:47Z mb $
|
15 |
* @package FACTFinder\Xml66
|
16 |
*/
|
17 |
+
class FACTFinder_Xml66_CompareAdapter extends FACTFinder_Default_CompareAdapter
|
18 |
{
|
19 |
/**
|
20 |
* @return void
|
lib/FACTFinder/Xml66/SimilarRecordsAdapter.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @version $Id: SimilarRecordsAdapter.php 42804 2012-01-20 10:46:43Z mb $
|
15 |
* @package FACTFinder\Xml66
|
16 |
*/
|
17 |
-
class FACTFinder_Xml66_SimilarRecordsAdapter extends
|
18 |
{
|
19 |
/**
|
20 |
* @return void
|
14 |
* @version $Id: SimilarRecordsAdapter.php 42804 2012-01-20 10:46:43Z mb $
|
15 |
* @package FACTFinder\Xml66
|
16 |
*/
|
17 |
+
class FACTFinder_Xml66_SimilarRecordsAdapter extends FACTFinder_Default_SimilarRecordsAdapter
|
18 |
{
|
19 |
/**
|
20 |
* @return void
|
lib/FACTFinder/Xml67/ProductCampaignAdapter.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @version $Id: ProductCampaignAdapter.php 43440 2012-02-08 12:42:13Z martin.buettner $
|
15 |
* @package FACTFinder\Xml67
|
16 |
*/
|
17 |
-
class FACTFinder_Xml67_ProductCampaignAdapter extends
|
18 |
{
|
19 |
protected $xmlData = null;
|
20 |
|
14 |
* @version $Id: ProductCampaignAdapter.php 43440 2012-02-08 12:42:13Z martin.buettner $
|
15 |
* @package FACTFinder\Xml67
|
16 |
*/
|
17 |
+
class FACTFinder_Xml67_ProductCampaignAdapter extends FACTFinder_Default_ProductCampaignAdapter
|
18 |
{
|
19 |
protected $xmlData = null;
|
20 |
|
lib/FACTFinder/Xml67/SearchAdapter.php
CHANGED
@@ -51,10 +51,12 @@ class FACTFinder_Xml67_SearchAdapter extends FACTFinder_Xml66_SearchAdapter
|
|
51 |
foreach ($xmlCampaign->feedback->text as $text) {
|
52 |
if(isset($text->attributes()->label)) {
|
53 |
$label = trim($text->attributes()->label);
|
54 |
-
|
|
|
|
|
55 |
$label = trim($text->attributes()->nr);
|
|
|
56 |
}
|
57 |
-
$feedback[$label] = $encodingHandler->encodeServerContentForPage((string)$text);
|
58 |
}
|
59 |
$campaign->addFeedback($feedback);
|
60 |
}
|
51 |
foreach ($xmlCampaign->feedback->text as $text) {
|
52 |
if(isset($text->attributes()->label)) {
|
53 |
$label = trim($text->attributes()->label);
|
54 |
+
$feedback[$label] = $encodingHandler->encodeServerContentForPage((string)$text);
|
55 |
+
}
|
56 |
+
if(isset($text->attributes()->nr)) {
|
57 |
$label = trim($text->attributes()->nr);
|
58 |
+
$feedback[$label] = $encodingHandler->encodeServerContentForPage((string)$text);
|
59 |
}
|
|
|
60 |
}
|
61 |
$campaign->addFeedback($feedback);
|
62 |
}
|
package.xml
CHANGED
@@ -1,20 +1,27 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Flagbit_Factfinder</name>
|
4 |
-
<version>3.4.
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Integrates the FACT-Finder for improved product search functionality.</summary>
|
10 |
<description>Integrates the FACT-Finder for improved product search functionality.</description>
|
11 |
-
<notes>[+
|
12 |
-
[~
|
13 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<authors><author><name>Flagbit GmbH Co. KG</name><user>auto-converted</user><email>magento@flagbit.de</email></author></authors>
|
15 |
-
<date>
|
16 |
-
<time>14:
|
17 |
-
<contents><target name="mageetc"><dir><dir><file name="factfinder.xml" hash="ca4dac634339217dd2ee6e8dc477d694"/></dir><dir name="modules"><file name="Flagbit_FactFinder.xml" hash="99c6b4e5981ac7592830a9fb3f5e5a0e"/></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="factfinder.xml" hash="5e5cb94967917aa2784d19434d02b2d4"/></dir><dir name="template"><dir name="factfinder"><file name="cockpit.phtml" hash="db2b5c21f817f1abdab3dabce26c699f"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="factfinder.xml" hash="c059bb14f9d4d929db8234bdf139c2cb"/></dir><dir name="template"><dir name="factfinder"><file name="form.advancedsuggest.phtml" hash="68cf6f46b65e66e1bb88d91b854a339a"/><file name="form.advancedsuggest68.phtml" hash="2910c0f39c52e6e02eead79688f682af"/><file name="form.mini.phtml" hash="eb49c2fb57594e2ebeed1ffb01c2606d"/><file name="logo.phtml" hash="7a40d67bf648e65345f69b2cf9d3c6b6"/><file name="scic.phtml" hash="4d4f8d2318837122973049496feafea5"/><file name="secondaryresult.phtml" hash="a4cdff409ccedb16d4fe9a038a4dd9e8"/><dir name="campaign"><file name="advisory.phtml" hash="d0ef29b97aa4c3bdfa2b94596beb5b21"/><file name="feedback.phtml" hash="a00ad977b82b199630371aef060f25ab"/><dir name="cart"><file name="advisory.phtml" hash="bb994272a6daaaba298a38023f6db212"/><file name="feedback.phtml" hash="01fa6a9cd024a2a8edaea7013b00fc89"/></dir></dir><dir name="filter"><file name="scriptaculousSlider.phtml" hash="e3ee4dbb6bc6e0546b4374078a9d88bc"/><file name="slider.phtml" hash="80e4e9e1c81437fe41b6a52d98e73549"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Flagbit_FactFinder.csv" hash="4df4f128de560a402243cd7718f7be2a"/></dir></dir></target><target name="magelib"><dir><dir name="FACTFinder"><file name="AdvisorAnswer.php" hash="b6dfbe2d43660b1624ce7788bef7356a"/><file name="AdvisorQuestion.php" hash="7f3d039dc86c5baebb4702f8a66ca6d4"/><file name="Asn.php" hash="8a3753feea0901c7ace25e011be38e56"/><file name="AsnFilterItem.php" hash="cdd0bb237873b54877b4b52744250018"/><file name="AsnGroup.php" hash="51aa9c3dfad5ec727cade5962cd7ad2f"/><file name="AsnSliderFilter.php" hash="da4eb96cdb47553793b278aca2d0ec19"/><file name="BreadCrumbItem.php" hash="115ffb2f30e346b29f93ce2d84be724e"/><file name="Campaign.php" hash="138f990ff2180d369bd0b441998b9cb4"/><file name="CampaignIterator.php" hash="d58f054580f0057e8471dbd8334157f1"/><file name="Configuration.php" hash="972367363e6c84fe80f2c73a1528b8aa"/><file name="EncodingHandler.php" hash="4f0b616bca9158bfb7eddcfcba192dc6"/><file name="Item.php" hash="431843e9e2847e8a6c966a185c39f5e9"/><file name="Loader.php" hash="e76d471f86c6c68ef3228c0b98aaed6e"/><file name="Log4PhpLogger.php" hash="ecfb1f084b8d0bd2d51bf417fa0b0b3c"/><file name="NullLogger.php" hash="be8782000070665f0e9fcc011ae4fe77"/><file name="Paging.php" hash="a07db7cb4b02893792e6e29018a36858"/><file name="Parameters.php" hash="612c4a9b98cb8a17d0f2d30cf2641936"/><file name="ParametersParser.php" hash="187527e3d7f233ca60d89748be8c2896"/><file name="ProductsPerPageOptions.php" hash="1e69121e89109f31b0929706ea3dcabc"/><file name="Record.php" hash="4bc036a2d47cd1b76d09af6290f49044"/><file name="Result.php" hash="6b4e959df31a73b9fe25de7a76551970"/><file name="SingleWordSearchItem.php" hash="8f0feac780e68a8b0eab6d44dd6c6813"/><file name="SuggestQuery.php" hash="cf3cf51839e06475bdcf62bb49ee96c5"/><file name="TagQuery.php" hash="ece1fda66af2c6053507941f35423c5f"/><file name="Util.php" hash="4ac8b8eb630e83c65a065fd4e01ab11f"/><dir name="Abstract"><file name="Adapter.php" hash="dea9f000509f94599e3b4d38ee14d66f"/><file name="CompareAdapter.php" hash="d26dec2f3dc98269dcb43f10bcfcdfe9"/><file name="Configuration.php" hash="233565de45f56ba7bdcd604817dd7fc6"/><file name="DataProvider.php" hash="8b1dfc68d335aa006f7af9f2a60e519d"/><file name="ImportAdapter.php" hash="8427bb6b4b33c37bfe9090d7c16e0238"/><file name="Logger.php" hash="c5b1ace6158035e80b3d4a79a942a381"/><file name="ProductCampaignAdapter.php" hash="daa4f28109edf685b33f31fce8573ced"/><file name="RecommendationAdapter.php" hash="0c11f59134083f1377f1d0c38a6fdefb"/><file name="ScicAdapter.php" hash="e1a0b64f7555e32a78109bbbaaf3c939"/><file name="SearchAdapter.php" hash="c03d9bea34da5cc0e0b5885bd2c89c74"/><file name="SimilarRecordsAdapter.php" hash="2cef8bdabc112c2c78fb95e75ef748bd"/><file name="SuggestAdapter.php" hash="ef13ace0995fa2f57b87f38cc2fb701a"/><file name="TagCloudAdapter.php" hash="ac5465a5dde73dde3ead1f6f08eced08"/></dir><dir name="Http"><file name="DataProvider.php" hash="301e78f2d7b9c56d344b4a5989ef6b43"/><file name="DummyProvider.php" hash="30d61ea2ce373f5b501bb64d8ed19393"/><file name="ParallelDataProvider.php" hash="78f6039e0b6ec92b9e066e315fed77de"/><file name="ScicAdapter.php" hash="821294ba5ab1fbce8b8208d89e2162dc"/><file name="StatusHelper.php" hash="e4760fadae33a5574f9445bbc73c1283"/><file name="SuggestAdapter.php" hash="9ddfe5fdd6b373e9f7126867ed1f0b06"/><file name="UrlBuilder.php" hash="99efad6cb8243ee93a5d4b61c93d8303"/></dir><dir name="Xml64"><file name="SearchAdapter.php" hash="58a49882c741216cf278c4556ea7d224"/></dir><dir name="Xml65"><file name="ImportAdapter.php" hash="e372e9eaa322a1b2d9ace33679c80815"/><file name="RecommendationAdapter.php" hash="14a126d5a9c14da3e754186f81bfeacb"/><file name="SearchAdapter.php" hash="255e5ae9cd8fe3ff2588222c5a086376"/><file name="SuggestAdapter.php" hash="e5381502b74dd62be1a7aa833cbb03e2"/><file name="TagCloudAdapter.php" hash="711e1aabd4d2895f66fdc329ee2b82b8"/></dir><dir name="Xml66"><file name="CompareAdapter.php" hash="a6f500504086c842e8e50772305b98df"/><file name="ImportAdapter.php" hash="5ea0d06cc2ddc7a1b7c880203c38fe40"/><file name="RecommendationAdapter.php" hash="9490ea2b17fded94d087046065596b1b"/><file name="SearchAdapter.php" hash="82214090045d963b15ccc7073d73d7ea"/><file name="SimilarRecordsAdapter.php" hash="532cbc18947dad44fdb296bc82ea3fa0"/><file name="SuggestAdapter.php" hash="813bfb64ac9d2dc45443cc7c33e854a7"/><file name="TagCloudAdapter.php" hash="a44dd623910bbb6766a0b0c25584212c"/></dir><dir name="Xml67"><file name="CompareAdapter.php" hash="37980ec507fd7f13e81ece413915da2d"/><file name="ImportAdapter.php" hash="dc0d334439aa59f3e0a4226bbf1456d2"/><file name="ProductCampaignAdapter.php" hash="64faea05ff05c3031da6f30b3a169980"/><file name="RecommendationAdapter.php" hash="b991b5e2570c28530164b3cacfffa6e1"/><file name="SearchAdapter.php" hash="bda78e482ab612bc8902aee11260afb9"/><file name="SimilarRecordsAdapter.php" hash="b60a974a22d3e473538524dc57d1e91d"/><file name="SuggestAdapter.php" hash="7290503daae4ae9e595cc5b1480ce8a1"/><file name="TagCloudAdapter.php" hash="d3efa6616331286cb221f8ca79021324"/></dir><dir name="Xml68"><file name="CompareAdapter.php" hash="0a8ebc48d90e7aaf131b66180d10ba11"/><file name="ImportAdapter.php" hash="bf483742e13d647da407f7da85828b98"/><file name="ProductCampaignAdapter.php" hash="db981749b20f69eca65d5ac1e622bafe"/><file name="RecommendationAdapter.php" hash="69e031adc81be7a88a0cffbe1b96c317"/><file name="SearchAdapter.php" hash="de47913e1c064b171aea892443885e8f"/><file name="SimilarRecordsAdapter.php" hash="b9c70b5c7d6d803bb1c7f1255be55285"/><file name="SuggestAdapter.php" hash="5cf5b95340983823c9e7a3fd0dc20a0b"/><file name="TagCloudAdapter.php" hash="3bfa1e877269be17ee08c403254925bf"/></dir></dir><dir name="FACTFinderCustom"><file name="Configuration.php" hash="2451df5afb1c64460c07b4caa228fabf"/></dir><dir name="SAI"><file name="Curl.php" hash="1fb18096257151b5b47bc2964dd9fe39"/><file name="CurlInterface.php" hash="714fa045dd4546d0c92cd022efb09422"/><file name="CurlStub.php" hash="2521763ee414683aced1afd1ec12511d"/><dir name="Curl"><file name="Handle.php" hash="0fc7132737da7cee7df6b974447864ac"/></dir></dir></dir></target><target name="magecommunity"><dir><dir name="Flagbit"><dir name="FactFinder"><dir name="Block"><file name="Layer.php" hash="78d3ccfc3f47852b853b8eea4148906a"/><file name="Scic.php" hash="9ba6aa43204d0aae206d9f24f09aecfc"/><file name="Secondaryresult.php" hash="cb1ca2347767ebed5671ad6a91dc881e"/><file name="TagCloud.php" hash="6e3769771ef5a1b50fc1d9a963e90aad"/><dir name="Adminhtml"><file name="Cockpit.php" hash="e12c45f55d5fd31d164187bd9d16a0bd"/><file name="Exportlink.php" hash="29044f67c1ebb0e6950da286a24a1db7"/><dir name="Form"><dir name="Field"><file name="Attribute.php" hash="2e60d7473163fa523f10b2d0c441fe24"/><file name="Attributes.php" hash="cbaf317aa5ce4417cfcd02a6c4f36486"/></dir></dir></dir><dir name="Campaign"><file name="Advisory.php" hash="04e35a0e8a75a7ddd4e3af385f933aa5"/><file name="Feedback.php" hash="a1e1f1d393bea196e07f92e171e10513"/><dir name="Cart"><file name="Advisory.php" hash="14791cddb1fd131f7f78928e7877fc48"/><file name="Feedback.php" hash="c5a0f657037274881f7d2846e004f164"/></dir><dir name="Product"><file name="Advisory.php" hash="bd1f468d56b6bc1fa3541406796c133a"/><file name="Feedback.php" hash="576bd4801d14f08bc1c62688ffab2e04"/></dir></dir><dir name="Cart"><file name="Crosssell.php" hash="96c00a397ef7e32cb0babfab8b109494"/></dir><dir name="Filter"><file name="Slider.php" hash="159d3e1b403625dbbb970e5e7ada4ec7"/></dir><dir name="Layer"><file name="Abstract.php" hash="f53a3e2d6ce0da4afee58b4ea806a342"/></dir><dir name="Product"><dir name="List"><file name="Crosssell.php" hash="86590a3e65ffe074950f4c630fc10826"/><file name="Upsell.php" hash="dabfd0b10fd73dcdcf8ddc3fd12c8569"/></dir></dir><dir name="XmlConnect"><dir name="Catalog"><file name="Search.php" hash="662f7b0df8d21626bf6193906aed5162"/><dir name="Product"><file name="List.php" hash="79103c53bbaa03f02ed8a78554dcc791"/></dir><dir name="Search"><file name="Suggest.php" hash="a0fed06b80840e63f9983909847d7e58"/></dir></dir></dir></dir><dir name="controllers"><file name="ExportController.php" hash="d130083fd8ef132cc48aa4b3746e3c2c"/><file name="ProxyController.php" hash="9cac55f10a4fd33a8396bc460ee3f272"/><dir name="Adminhtml"><dir name="Factfinder"><file name="CockpitController.php" hash="4c8665feaf14c38e6ba2384db496c95a"/></dir></dir></dir><dir name="documentation"><file name="Installation_FACT-Finder_Magento_de.pdf" hash="b4711171c625caaa8996a6a09e0eaaae"/><file name="Installation_FACT-Finder_Magento_en.pdf" hash="d4bef19418ee33a223fbda2d45cca686"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1165a0fecfaa31f2aa4a882d1d8bc033"/><file name="config.xml" hash="d262c1d52831dcb9ccaac5565b8e0378"/><file name="system.xml" hash="d3721503a1b346f60633e2f0a8e361a1"/></dir><dir name="Helper"><file name="Backend.php" hash="87b662c7c7242ef349f4606ad2ab5279"/><file name="Data.php" hash="afede9edaf2bcfbc93a4049eee5be89e"/><file name="Debug.php" hash="24b939b03efb2cd5f7815562f896576f"/><file name="Search.php" hash="45d4f115efc2b601ed4385a51c351c5a"/></dir><dir name="Model"><file name="Facade.php" hash="768397419ddb085279c7d9c5bdeb801f"/><file name="Layer.php" hash="9da16c44259b4a31d73f63d87787ff11"/><file name="Observer.php" hash="3cfb83bd65ee37b8a7f6f6f3c36538d6"/><file name="Processor.php" hash="5e76103096faccd5b26b2d036bdc7c5e"/><dir name="Export"><file name="Price.php" hash="5561605bf639385c211f339f0c752a0f"/><file name="Product.php" hash="d77724656b9f50fbb1d44c9741153961"/><file name="Stock.php" hash="28e819f8f317957a70a7d4d318e04791"/></dir><dir name="Handler"><file name="Abstract.php" hash="f5724a1c82becbc4d76a6f46dc591977"/><file name="CheckStatus.php" hash="4fc0544564271ec387a907e41fe2c231"/><file name="ProductCampaign.php" hash="831d8d3ff2cd29e090cff10c3a9c8844"/><file name="ProductDetailCampaign.php" hash="c714d9b43772f1665d64daea8d16594d"/><file name="Recommendations.php" hash="47b12e1f2f1e1d83ecaba77fdb20b63b"/><file name="Search.php" hash="165a115c5b92c40b03f7bfef04d13ef5"/><file name="SecondarySearch.php" hash="de4ced818f7865a491438a4d103b431a"/><file name="ShoppingCartCampaign.php" hash="202fc9ab4018247dfb8e8bcefd417465"/><file name="Suggest.php" hash="3b286cbda3cad188b10f7fac06e0ca32"/><file name="TagCloud.php" hash="e60bd2a5d314cfe3bad445ba88740878"/></dir><dir name="Layer"><file name="Abstract.php" hash="0a0505e719ca55320da35c7510b82d3a"/><dir name="Filter"><file name="Item.php" hash="28e42624d764342dae6cb09a1b29b7b8"/><dir name="Attribute"><file name="Abstract.php" hash="2ad710352f1803d15ba056cd93d519f1"/><file name="Catalog.php" hash="f6dce5ea64da9dfb3458ae9ff4b58a7b"/><file name="Catalogsearch.php" hash="75536576aaaa0186f166550ee746ae04"/></dir></dir></dir><dir name="Mysql4"><dir name="Campaign"><dir name="Pushedproducts"><file name="Collection.php" hash="c657b421e0137bf842ec78c26718363f"/></dir></dir><dir name="Product"><dir name="Attribute"><file name="Collection.php" hash="a5b47ca867be314d2d0edf1621608d8b"/></dir><dir name="Recommendation"><file name="Collection.php" hash="fdb6f35fa1cca09aa405bc5cd0c68601"/></dir></dir><dir name="Scic"><file name="Queue.php" hash="a1521000a1a10df8e6b580f33d06cf23"/><dir name="Queue"><file name="Collection.php" hash="5f6b0b6a50838929065ebd941cedce42"/></dir></dir><dir name="Search"><file name="Collection.php" hash="2a0c4ff355e035d11209115f054dc3dd"/><file name="Engine.php" hash="88a56eb3b4587d87bb1152476b64036e"/></dir></dir><dir name="Scic"><file name="Queue.php" hash="828d391339a22c15ad74ae1a2e784b41"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Attributes.php" hash="8259883090dc4bca9b858d047983e736"/><file name="Enabled.php" hash="3b4d1f4b37d7ddba9768a7da6e3fc778"/></dir><dir name="Source"><file name="Authtype.php" hash="5bc0b1c745782cc51d44d56299059bcb"/><file name="Ffversion.php" hash="0270fbefb18c180abc98f2e02e37532c"/><file name="Identifier.php" hash="cec45238f0e28a1bf66d10dee513c2ca"/></dir></dir></dir></dir><dir name="sql"><dir name="factfinder_setup"><file name="mysql4-install-3.2.0.php" hash="1342320595048cd96659c454381cfbb4"/><file name="mysql4-upgrade-3.2.0-3.2.1.php" hash="3d5276dfe971a6bd48aa8e2a085de004"/><file name="mysql4-upgrade-3.2.1-3.3.0.php" hash="71954ea0cf400950d23b020ff095a9ee"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="factfinder.css" hash="16766d07b20544e11184ee21f95b2692"/></dir></dir></dir></dir></dir></target><target name="mage"><dir><dir name="js"><dir name="factfinder"><file name="jXHR.js" hash="0473a3ea88f08797737814c7ffbeba18"/><file name="scic.js" hash="e942f1386b29f6868f3ebe20c52e2782"/><file name="suggest.js" hash="c60da60ac082a4bca9d9c04be47e3138"/></dir></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies/>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Flagbit_Factfinder</name>
|
4 |
+
<version>3.4.7</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Integrates the FACT-Finder for improved product search functionality.</summary>
|
10 |
<description>Integrates the FACT-Finder for improved product search functionality.</description>
|
11 |
+
<notes>[+TASK] removed documentation from module
|
12 |
+
[~TASK] Updated FF PHP framework
|
13 |
+
[~TASK] Replaced magic __call method with explicit implementations.
|
14 |
+
[+BUGFIX] avoid strict notice, because of static member access in non static way.
|
15 |
+
[+BUGFIX] Added default value for ffversion config value.
|
16 |
+
[+BUGFIX] Fixed segmentation fault - Assoc array was given to DB select. We need only the keys.
|
17 |
+
[+BUGFIX] Fixed TODO: Used constants insteat of hard coded values for visibility
|
18 |
+
[+BUGFIX] Removed unused $productIndexes variable
|
19 |
+
[+BUGFIX] Fix for "undefined" in suggestions
|
20 |
+
[+BUGFIX] make scic also work with urls that have appended parameters</notes>
|
21 |
<authors><author><name>Flagbit GmbH Co. KG</name><user>auto-converted</user><email>magento@flagbit.de</email></author></authors>
|
22 |
+
<date>2013-01-25</date>
|
23 |
+
<time>14:41:17</time>
|
24 |
+
<contents><target name="mageetc"><dir><dir><file name="factfinder.xml" hash="ca4dac634339217dd2ee6e8dc477d694"/></dir><dir name="modules"><file name="Flagbit_FactFinder.xml" hash="99c6b4e5981ac7592830a9fb3f5e5a0e"/></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="factfinder.xml" hash="5e5cb94967917aa2784d19434d02b2d4"/></dir><dir name="template"><dir name="factfinder"><file name="cockpit.phtml" hash="db2b5c21f817f1abdab3dabce26c699f"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="factfinder.xml" hash="c059bb14f9d4d929db8234bdf139c2cb"/></dir><dir name="template"><dir name="factfinder"><file name="form.advancedsuggest.phtml" hash="d51345fde3b0cbede02f4d2ac7d43af0"/><file name="form.advancedsuggest68.phtml" hash="2910c0f39c52e6e02eead79688f682af"/><file name="form.mini.phtml" hash="eb49c2fb57594e2ebeed1ffb01c2606d"/><file name="logo.phtml" hash="7a40d67bf648e65345f69b2cf9d3c6b6"/><file name="scic.phtml" hash="4d4f8d2318837122973049496feafea5"/><file name="secondaryresult.phtml" hash="a4cdff409ccedb16d4fe9a038a4dd9e8"/><dir name="campaign"><file name="advisory.phtml" hash="d0ef29b97aa4c3bdfa2b94596beb5b21"/><file name="feedback.phtml" hash="a00ad977b82b199630371aef060f25ab"/><dir name="cart"><file name="advisory.phtml" hash="bb994272a6daaaba298a38023f6db212"/><file name="feedback.phtml" hash="01fa6a9cd024a2a8edaea7013b00fc89"/></dir><dir name="product"><file name="advisory.phtml" hash="00c978cf9c129c777fecf4cbbbb9d218"/><file name="feedback.phtml" hash="1bb121e2708490793190ce9f2d6ee666"/></dir></dir><dir name="filter"><file name="scriptaculousSlider.phtml" hash="e3ee4dbb6bc6e0546b4374078a9d88bc"/><file name="slider.phtml" hash="80e4e9e1c81437fe41b6a52d98e73549"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Flagbit_FactFinder.csv" hash="4df4f128de560a402243cd7718f7be2a"/></dir></dir></target><target name="magelib"><dir><dir name="FACTFinder"><file name="AdvisorAnswer.php" hash="b6dfbe2d43660b1624ce7788bef7356a"/><file name="AdvisorQuestion.php" hash="7f3d039dc86c5baebb4702f8a66ca6d4"/><file name="Asn.php" hash="8a3753feea0901c7ace25e011be38e56"/><file name="AsnFilterItem.php" hash="cdd0bb237873b54877b4b52744250018"/><file name="AsnGroup.php" hash="51aa9c3dfad5ec727cade5962cd7ad2f"/><file name="AsnSliderFilter.php" hash="da4eb96cdb47553793b278aca2d0ec19"/><file name="BreadCrumbItem.php" hash="115ffb2f30e346b29f93ce2d84be724e"/><file name="Campaign.php" hash="138f990ff2180d369bd0b441998b9cb4"/><file name="CampaignIterator.php" hash="d58f054580f0057e8471dbd8334157f1"/><file name="Configuration.php" hash="972367363e6c84fe80f2c73a1528b8aa"/><file name="Curl.php" hash="967c0b604dfdc045c9de70e9e9a44bea"/><file name="CurlHandle.php" hash="2c9dfeccd8256c16def2685e7498ae1c"/><file name="CurlInterface.php" hash="a57574dcd102ff54575cbc9131687854"/><file name="CurlStub.php" hash="01b5a07b0599ccd4b7e1b102cbdc3993"/><file name="EncodingHandler.php" hash="4f0b616bca9158bfb7eddcfcba192dc6"/><file name="Item.php" hash="431843e9e2847e8a6c966a185c39f5e9"/><file name="Loader.php" hash="c26cc57da777bfe7096fadbfeb6e1645"/><file name="Log4PhpLogger.php" hash="ecfb1f084b8d0bd2d51bf417fa0b0b3c"/><file name="NullLogger.php" hash="be8782000070665f0e9fcc011ae4fe77"/><file name="Paging.php" hash="a07db7cb4b02893792e6e29018a36858"/><file name="Parameters.php" hash="612c4a9b98cb8a17d0f2d30cf2641936"/><file name="ParametersParser.php" hash="187527e3d7f233ca60d89748be8c2896"/><file name="ProductsPerPageOptions.php" hash="1e69121e89109f31b0929706ea3dcabc"/><file name="Record.php" hash="4bc036a2d47cd1b76d09af6290f49044"/><file name="Result.php" hash="6b4e959df31a73b9fe25de7a76551970"/><file name="SingleWordSearchItem.php" hash="8f0feac780e68a8b0eab6d44dd6c6813"/><file name="SuggestQuery.php" hash="cf3cf51839e06475bdcf62bb49ee96c5"/><file name="TagQuery.php" hash="ece1fda66af2c6053507941f35423c5f"/><file name="Util.php" hash="0e6189c658c9b924bd7b92d2f70a0543"/><dir name="Abstract"><file name="Adapter.php" hash="dea9f000509f94599e3b4d38ee14d66f"/><file name="Configuration.php" hash="233565de45f56ba7bdcd604817dd7fc6"/><file name="DataProvider.php" hash="8b1dfc68d335aa006f7af9f2a60e519d"/><file name="Logger.php" hash="c5b1ace6158035e80b3d4a79a942a381"/></dir><dir name="Default"><file name="CompareAdapter.php" hash="3e440e7fc6722a82658fe1d16dc81d98"/><file name="ImportAdapter.php" hash="50c1a885dabcad55d4f7b6de00800701"/><file name="ProductCampaignAdapter.php" hash="049bfd0c3831114a2cd632af96aa0aaf"/><file name="RecommendationAdapter.php" hash="b81387e7174047bf5325df5bcc54012c"/><file name="ScicAdapter.php" hash="8fd1c9e60cdb039ce4369af63d72a459"/><file name="SearchAdapter.php" hash="ea278ff85e02d484039f3ecea58a7d65"/><file name="SimilarRecordsAdapter.php" hash="8b584060b7dfd8caac044d3bc0d7f865"/><file name="SuggestAdapter.php" hash="f74d7d5578131355f8e44e8b6e0734c7"/><file name="TagCloudAdapter.php" hash="9ff6d6b9a11f855942f0947b98b103bd"/></dir><dir name="Http"><file name="DataProvider.php" hash="d994803f248f2a7419531f13ef03fcd2"/><file name="DummyProvider.php" hash="30d61ea2ce373f5b501bb64d8ed19393"/><file name="ParallelDataProvider.php" hash="0918310d9076c7ba7371daae3019dbc4"/><file name="ScicAdapter.php" hash="c283d851d23e531a1c26fee3d8c49ea8"/><file name="StatusHelper.php" hash="e4760fadae33a5574f9445bbc73c1283"/><file name="SuggestAdapter.php" hash="875adeae854b52bb6a20322c2934423c"/><file name="UrlBuilder.php" hash="99efad6cb8243ee93a5d4b61c93d8303"/></dir><dir name="Xml64"><file name="SearchAdapter.php" hash="58a49882c741216cf278c4556ea7d224"/></dir><dir name="Xml65"><file name="ImportAdapter.php" hash="489d0aadda12a41111635a2b738936c1"/><file name="RecommendationAdapter.php" hash="dda97f6db1ae97c5a217632067d7c101"/><file name="SearchAdapter.php" hash="fee8359599acf56bc6fd5d87195d411e"/><file name="SuggestAdapter.php" hash="e5381502b74dd62be1a7aa833cbb03e2"/><file name="TagCloudAdapter.php" hash="3bca14558fbd758207e97566dafb1ca2"/></dir><dir name="Xml66"><file name="CompareAdapter.php" hash="a1e323dec8fbee2930d531765adef0cc"/><file name="ImportAdapter.php" hash="5ea0d06cc2ddc7a1b7c880203c38fe40"/><file name="RecommendationAdapter.php" hash="9490ea2b17fded94d087046065596b1b"/><file name="SearchAdapter.php" hash="82214090045d963b15ccc7073d73d7ea"/><file name="SimilarRecordsAdapter.php" hash="f6c70898407d65c5b315a9ec5ebba166"/><file name="SuggestAdapter.php" hash="813bfb64ac9d2dc45443cc7c33e854a7"/><file name="TagCloudAdapter.php" hash="a44dd623910bbb6766a0b0c25584212c"/></dir><dir name="Xml67"><file name="CompareAdapter.php" hash="37980ec507fd7f13e81ece413915da2d"/><file name="ImportAdapter.php" hash="dc0d334439aa59f3e0a4226bbf1456d2"/><file name="ProductCampaignAdapter.php" hash="794020c94d6d62c3d835f167c484f674"/><file name="RecommendationAdapter.php" hash="b991b5e2570c28530164b3cacfffa6e1"/><file name="SearchAdapter.php" hash="1458660092403f1c1f3c088c40b54550"/><file name="SimilarRecordsAdapter.php" hash="b60a974a22d3e473538524dc57d1e91d"/><file name="SuggestAdapter.php" hash="7290503daae4ae9e595cc5b1480ce8a1"/><file name="TagCloudAdapter.php" hash="d3efa6616331286cb221f8ca79021324"/></dir><dir name="Xml68"><file name="CompareAdapter.php" hash="0a8ebc48d90e7aaf131b66180d10ba11"/><file name="ImportAdapter.php" hash="bf483742e13d647da407f7da85828b98"/><file name="ProductCampaignAdapter.php" hash="db981749b20f69eca65d5ac1e622bafe"/><file name="RecommendationAdapter.php" hash="69e031adc81be7a88a0cffbe1b96c317"/><file name="SearchAdapter.php" hash="de47913e1c064b171aea892443885e8f"/><file name="SimilarRecordsAdapter.php" hash="b9c70b5c7d6d803bb1c7f1255be55285"/><file name="SuggestAdapter.php" hash="5cf5b95340983823c9e7a3fd0dc20a0b"/><file name="TagCloudAdapter.php" hash="3bfa1e877269be17ee08c403254925bf"/></dir></dir><dir name="FACTFinderCustom"><file name="Configuration.php" hash="2451df5afb1c64460c07b4caa228fabf"/></dir><dir name="SAI"><file name="Curl.php" hash="1fb18096257151b5b47bc2964dd9fe39"/><file name="CurlInterface.php" hash="714fa045dd4546d0c92cd022efb09422"/><file name="CurlStub.php" hash="2521763ee414683aced1afd1ec12511d"/><dir name="Curl"><file name="Handle.php" hash="0fc7132737da7cee7df6b974447864ac"/></dir></dir></dir></target><target name="magecommunity"><dir><dir name="Flagbit"><dir name="FactFinder"><dir name="Block"><file name="Layer.php" hash="93d17d630e79f810d1fe3cc5784402cd"/><file name="Scic.php" hash="9ba6aa43204d0aae206d9f24f09aecfc"/><file name="Secondaryresult.php" hash="cb1ca2347767ebed5671ad6a91dc881e"/><file name="TagCloud.php" hash="6e3769771ef5a1b50fc1d9a963e90aad"/><dir name="Adminhtml"><file name="Cockpit.php" hash="e12c45f55d5fd31d164187bd9d16a0bd"/><file name="Exportlink.php" hash="29044f67c1ebb0e6950da286a24a1db7"/><dir name="Form"><dir name="Field"><file name="Attribute.php" hash="2e60d7473163fa523f10b2d0c441fe24"/><file name="Attributes.php" hash="cbaf317aa5ce4417cfcd02a6c4f36486"/></dir></dir></dir><dir name="Campaign"><file name="Advisory.php" hash="04e35a0e8a75a7ddd4e3af385f933aa5"/><file name="Feedback.php" hash="a1e1f1d393bea196e07f92e171e10513"/><dir name="Cart"><file name="Advisory.php" hash="14791cddb1fd131f7f78928e7877fc48"/><file name="Feedback.php" hash="c5a0f657037274881f7d2846e004f164"/></dir><dir name="Product"><file name="Advisory.php" hash="bd1f468d56b6bc1fa3541406796c133a"/><file name="Feedback.php" hash="576bd4801d14f08bc1c62688ffab2e04"/></dir></dir><dir name="Cart"><file name="Crosssell.php" hash="96c00a397ef7e32cb0babfab8b109494"/></dir><dir name="Filter"><file name="Slider.php" hash="159d3e1b403625dbbb970e5e7ada4ec7"/></dir><dir name="Layer"><file name="Abstract.php" hash="f53a3e2d6ce0da4afee58b4ea806a342"/></dir><dir name="Product"><dir name="List"><file name="Crosssell.php" hash="86590a3e65ffe074950f4c630fc10826"/><file name="Upsell.php" hash="dabfd0b10fd73dcdcf8ddc3fd12c8569"/></dir></dir><dir name="XmlConnect"><dir name="Catalog"><file name="Search.php" hash="662f7b0df8d21626bf6193906aed5162"/><dir name="Product"><file name="List.php" hash="79103c53bbaa03f02ed8a78554dcc791"/></dir><dir name="Search"><file name="Suggest.php" hash="a0fed06b80840e63f9983909847d7e58"/></dir></dir></dir></dir><dir name="controllers"><file name="ExportController.php" hash="1a0ab571e3cc525b043c39c8d71c0e18"/><file name="ProxyController.php" hash="9cac55f10a4fd33a8396bc460ee3f272"/><dir name="Adminhtml"><dir name="Factfinder"><file name="CockpitController.php" hash="4c8665feaf14c38e6ba2384db496c95a"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="1165a0fecfaa31f2aa4a882d1d8bc033"/><file name="config.xml" hash="5d79db45c9c4ce5d454668d1dc483326"/><file name="system.xml" hash="d3721503a1b346f60633e2f0a8e361a1"/></dir><dir name="Helper"><file name="Backend.php" hash="87b662c7c7242ef349f4606ad2ab5279"/><file name="Data.php" hash="afede9edaf2bcfbc93a4049eee5be89e"/><file name="Debug.php" hash="24b939b03efb2cd5f7815562f896576f"/><file name="Search.php" hash="667b1a5ba0de1683e5267e6bc72413ac"/></dir><dir name="Model"><file name="Facade.php" hash="98c90408b20ef80f382c38d4b9a00b08"/><file name="Layer.php" hash="9da16c44259b4a31d73f63d87787ff11"/><file name="Observer.php" hash="085fe75a9833ee08167523713e19c1bf"/><file name="Processor.php" hash="5e76103096faccd5b26b2d036bdc7c5e"/><dir name="Export"><file name="Price.php" hash="5561605bf639385c211f339f0c752a0f"/><file name="Product.php" hash="e5dabac4cadb05e125dd805e0af52872"/><file name="Stock.php" hash="28e819f8f317957a70a7d4d318e04791"/></dir><dir name="Handler"><file name="Abstract.php" hash="f5724a1c82becbc4d76a6f46dc591977"/><file name="CheckStatus.php" hash="4fc0544564271ec387a907e41fe2c231"/><file name="ProductCampaign.php" hash="831d8d3ff2cd29e090cff10c3a9c8844"/><file name="ProductDetailCampaign.php" hash="c714d9b43772f1665d64daea8d16594d"/><file name="Recommendations.php" hash="47b12e1f2f1e1d83ecaba77fdb20b63b"/><file name="Search.php" hash="165a115c5b92c40b03f7bfef04d13ef5"/><file name="SecondarySearch.php" hash="de4ced818f7865a491438a4d103b431a"/><file name="ShoppingCartCampaign.php" hash="202fc9ab4018247dfb8e8bcefd417465"/><file name="Suggest.php" hash="3b286cbda3cad188b10f7fac06e0ca32"/><file name="TagCloud.php" hash="e60bd2a5d314cfe3bad445ba88740878"/></dir><dir name="Layer"><file name="Abstract.php" hash="0a0505e719ca55320da35c7510b82d3a"/><dir name="Filter"><file name="Item.php" hash="28e42624d764342dae6cb09a1b29b7b8"/><dir name="Attribute"><file name="Abstract.php" hash="2ad710352f1803d15ba056cd93d519f1"/><file name="Catalog.php" hash="f6dce5ea64da9dfb3458ae9ff4b58a7b"/><file name="Catalogsearch.php" hash="75536576aaaa0186f166550ee746ae04"/></dir></dir></dir><dir name="Mysql4"><dir name="Campaign"><dir name="Pushedproducts"><file name="Collection.php" hash="c657b421e0137bf842ec78c26718363f"/></dir></dir><dir name="Product"><dir name="Attribute"><file name="Collection.php" hash="a5b47ca867be314d2d0edf1621608d8b"/></dir><dir name="Recommendation"><file name="Collection.php" hash="fdb6f35fa1cca09aa405bc5cd0c68601"/></dir></dir><dir name="Scic"><file name="Queue.php" hash="a1521000a1a10df8e6b580f33d06cf23"/><dir name="Queue"><file name="Collection.php" hash="5f6b0b6a50838929065ebd941cedce42"/></dir></dir><dir name="Search"><file name="Collection.php" hash="2a0c4ff355e035d11209115f054dc3dd"/><file name="Engine.php" hash="88a56eb3b4587d87bb1152476b64036e"/></dir></dir><dir name="Scic"><file name="Queue.php" hash="828d391339a22c15ad74ae1a2e784b41"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Attributes.php" hash="8259883090dc4bca9b858d047983e736"/><file name="Enabled.php" hash="3b4d1f4b37d7ddba9768a7da6e3fc778"/></dir><dir name="Source"><file name="Authtype.php" hash="5bc0b1c745782cc51d44d56299059bcb"/><file name="Ffversion.php" hash="0270fbefb18c180abc98f2e02e37532c"/><file name="Identifier.php" hash="cec45238f0e28a1bf66d10dee513c2ca"/></dir></dir></dir></dir><dir name="sql"><dir name="factfinder_setup"><file name="mysql4-install-3.2.0.php" hash="1342320595048cd96659c454381cfbb4"/><file name="mysql4-upgrade-3.2.0-3.2.1.php" hash="3d5276dfe971a6bd48aa8e2a085de004"/><file name="mysql4-upgrade-3.2.1-3.3.0.php" hash="71954ea0cf400950d23b020ff095a9ee"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="factfinder.css" hash="16766d07b20544e11184ee21f95b2692"/></dir></dir></dir></dir></dir></target><target name="mage"><dir><dir name="js"><dir name="factfinder"><file name="jXHR.js" hash="0473a3ea88f08797737814c7ffbeba18"/><file name="scic.js" hash="b3d9f34d40486a0d8ba841c9cccb4405"/><file name="suggest.js" hash="b45f28b377c73463527d9aa44e37589b"/></dir></dir></dir></target></contents>
|
25 |
<compatible/>
|
26 |
<dependencies/>
|
27 |
</package>
|