Version Notes
[+] You can now turn off Searchanise for quick product search (the Use Searchanise for search and advanced search setting.) The autocomplete widget will work.
[+] Faster indexation.
[+] Search relevance improved.
[+] The "All" variant of the items per page menu is replaced with "100" if the "Allow All Products per Page" option is active.
[!] Multi-store improvement: Sometimes, not all product data was submitted from additional storefronts. Fixed.
[!] The "Use in Quick Search" attributes are also taken into account in text search.
[!] Search results could be incorrectly sorted on initial page visit. Fixed.
[!] Search suggestion capitalizarion improved.
[!] In v.1.5, the display of the available filter variant list was improved for the Layered Navigation block.
Release Info
Developer | Simbirsk Technologies, Ltd. |
Extension | Simtech_Searchanise |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- app/code/community/Simtech/Searchanise/Block/Product/List/Toolbar.php +32 -0
- app/code/community/Simtech/Searchanise/Helper/ApiSe.php +43 -17
- app/code/community/Simtech/Searchanise/Helper/ApiXML.php +286 -96
- app/code/community/Simtech/Searchanise/Helper/Data.php +59 -49
- app/code/community/Simtech/Searchanise/Model/Observer.php +5 -13
- app/code/community/Simtech/Searchanise/Model/Queue.php +16 -1
- app/code/community/Simtech/Searchanise/Model/Resource/Eav/Mysql4/Layer/Filter/Attribute.php +41 -0
- app/code/community/Simtech/Searchanise/Model/Resource/Eav/Mysql4/Layer/Filter/Price.php +58 -0
- app/code/community/Simtech/Searchanise/Model/Resource/Layer/Filter/Attribute.php +1 -0
- app/code/community/Simtech/Searchanise/Model/Resource/Layer/Filter/Price.php +1 -0
- app/code/community/Simtech/Searchanise/controllers/InfoController.php +15 -7
- app/code/community/Simtech/Searchanise/controllers/ResultController.php +25 -3
- app/code/community/Simtech/Searchanise/etc/config.xml +23 -2
- app/code/community/Simtech/Searchanise/etc/config_without_search.xml +585 -0
- app/code/community/Simtech/Searchanise/etc/system.xml +12 -3
- package.xml +13 -9
@@ -14,6 +14,35 @@
|
|
14 |
|
15 |
class Simtech_Searchanise_Block_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
|
16 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
public function getCollectionPageSize()
|
18 |
{
|
19 |
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
@@ -138,7 +167,10 @@ class Simtech_Searchanise_Block_Product_List_Toolbar extends Mage_Catalog_Block_
|
|
138 |
$limit = (int)$this->getLimit();
|
139 |
|
140 |
if ($limit) {
|
|
|
|
|
141 |
//~ $this->_collection->setPageSize($limit);
|
|
|
142 |
}
|
143 |
|
144 |
if ($this->getCurrentOrder()) {
|
14 |
|
15 |
class Simtech_Searchanise_Block_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
|
16 |
{
|
17 |
+
/**
|
18 |
+
* Retrieve available limits for current view mode
|
19 |
+
*
|
20 |
+
* @return array
|
21 |
+
*/
|
22 |
+
public function getAvailableLimit()
|
23 |
+
{
|
24 |
+
$availableLimit = parent::getAvailableLimit();
|
25 |
+
|
26 |
+
if ($availableLimit) {
|
27 |
+
if (array_key_exists('all', $availableLimit)) {
|
28 |
+
unset($availableLimit['all']);
|
29 |
+
$maxPageSize = Mage::helper('searchanise/ApiSe')->getMaxPageSize();
|
30 |
+
if (!array_key_exists($maxPageSize, $availableLimit)) {
|
31 |
+
$availableLimit[$maxPageSize] = $maxPageSize;
|
32 |
+
}
|
33 |
+
|
34 |
+
$currentMode = $this->getCurrentMode();
|
35 |
+
if (in_array($currentMode, array('list', 'grid'))) {
|
36 |
+
$this->_availableLimit[$currentMode] = $availableLimit;
|
37 |
+
} else {
|
38 |
+
$this->_defaultAvailableLimit = $availableLimit;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
return $availableLimit;
|
44 |
+
}
|
45 |
+
|
46 |
public function getCollectionPageSize()
|
47 |
{
|
48 |
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
167 |
$limit = (int)$this->getLimit();
|
168 |
|
169 |
if ($limit) {
|
170 |
+
// [searchanise]
|
171 |
+
// disabled limit
|
172 |
//~ $this->_collection->setPageSize($limit);
|
173 |
+
// [/searchanise]
|
174 |
}
|
175 |
|
176 |
if ($this->getCurrentOrder()) {
|
@@ -11,14 +11,15 @@
|
|
11 |
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
|
12 |
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
****************************************************************************/
|
|
|
14 |
class Simtech_Searchanise_Helper_ApiSe
|
15 |
{
|
16 |
const COMPRESS_RATE = 5;
|
17 |
-
|
18 |
-
const PLATFORM_NAME = 'magento';
|
19 |
-
|
20 |
const CONFIG_PREFIX = 'se_';
|
21 |
|
|
|
|
|
22 |
// const MIN_QUANTITY_DECIMALS = '0.00001';
|
23 |
const MIN_QUANTITY_DECIMALS = ''; // not activated, because Server have floaf = decimal(12,2)
|
24 |
|
@@ -97,6 +98,11 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
97 |
return self::getSetting('type_async');
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
100 |
public static function checkAjaxAsync()
|
101 |
{
|
102 |
return self::getTypeAsync() == 2;
|
@@ -114,6 +120,10 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
114 |
return self::getLabelForPricesUsergroup() . $customerGroupId;
|
115 |
}
|
116 |
|
|
|
|
|
|
|
|
|
117 |
public static function getFloatPrecision() {
|
118 |
return self::FLOAT_PRECISION;
|
119 |
}
|
@@ -270,8 +280,11 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
270 |
public static function getUrl($link, $flNotUserHttpRequest = false, $storeId = '', $flCheckSecure = true)
|
271 |
{
|
272 |
if ($storeId != '') {
|
|
|
273 |
// need for generate correct url
|
274 |
-
|
|
|
|
|
275 |
}
|
276 |
|
277 |
$params = array();
|
@@ -289,6 +302,12 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
289 |
$url .= self::getParamNotUseHttpRequest();
|
290 |
}
|
291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
return $url;
|
293 |
}
|
294 |
|
@@ -413,6 +432,7 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
413 |
|
414 |
$ret['parent_private_key'] = self::getParentPrivateKey();
|
415 |
$ret['private_key'] = self::getPrivateKeys();
|
|
|
416 |
$ret['export_status'] = self::getExportStatuses();
|
417 |
|
418 |
$ret['last_request'] = self::formatDate(self::getLastRequest(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
|
@@ -506,6 +526,20 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
506 |
{
|
507 |
return self::getSettingStore('api_key', $store, self::CONFIG_PREFIX);
|
508 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
|
510 |
public static function getDate()
|
511 |
{
|
@@ -1261,6 +1295,8 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
1261 |
{
|
1262 |
@ignore_user_abort(true);
|
1263 |
@set_time_limit(0);
|
|
|
|
|
1264 |
|
1265 |
$xmlHeader = Mage::helper('searchanise/ApiXML')->getXMLHeader();
|
1266 |
$xmlFooter = Mage::helper('searchanise/ApiXML')->getXMLFooter();
|
@@ -1356,6 +1392,7 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
1356 |
self::echoConnectProgress('.');
|
1357 |
$sqls_arr = array();
|
1358 |
}*/
|
|
|
1359 |
} while ($end <= $max);
|
1360 |
|
1361 |
if (count($sqls_arr) > 0) {
|
@@ -1399,18 +1436,7 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
1399 |
|
1400 |
Mage::getModel('searchanise/queue')->setData($queueData)->save();
|
1401 |
}
|
1402 |
-
|
1403 |
-
// add facet-prices
|
1404 |
-
{
|
1405 |
-
$queueData = array(
|
1406 |
-
'data' => serialize(Simtech_Searchanise_Model_Queue::DATA_FACET_PRICES),
|
1407 |
-
'action' => Simtech_Searchanise_Model_Queue::ACT_FACET_UPDATE,
|
1408 |
-
'store_id' => $store->getId(),
|
1409 |
-
);
|
1410 |
-
|
1411 |
-
Mage::getModel('searchanise/queue')->setData($queueData)->save();
|
1412 |
-
}
|
1413 |
-
|
1414 |
// add facet-tags
|
1415 |
{
|
1416 |
$queueData = array(
|
@@ -1453,7 +1479,7 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
1453 |
} elseif ($q['action'] == Simtech_Searchanise_Model_Queue::ACT_FACET_UPDATE) {
|
1454 |
if ($data == Simtech_Searchanise_Model_Queue::DATA_FACET_CATEGORIES) {
|
1455 |
$xml .= Mage::helper('searchanise/ApiXML')->generateFacetXMLCategories();
|
1456 |
-
|
1457 |
} elseif ($data == Simtech_Searchanise_Model_Queue::DATA_FACET_PRICES) {
|
1458 |
$xml .= Mage::helper('searchanise/ApiXML')->generateFacetXMLPrices();
|
1459 |
|
11 |
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
|
12 |
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
****************************************************************************/
|
14 |
+
|
15 |
class Simtech_Searchanise_Helper_ApiSe
|
16 |
{
|
17 |
const COMPRESS_RATE = 5;
|
18 |
+
const PLATFORM_NAME = 'magento';
|
|
|
|
|
19 |
const CONFIG_PREFIX = 'se_';
|
20 |
|
21 |
+
const MAX_PAGE_SIZE = 100; // The "All" variant of the items per page menu is replaced with this value if the "Allow All Products per Page" option is active.
|
22 |
+
|
23 |
// const MIN_QUANTITY_DECIMALS = '0.00001';
|
24 |
const MIN_QUANTITY_DECIMALS = ''; // not activated, because Server have floaf = decimal(12,2)
|
25 |
|
98 |
return self::getSetting('type_async');
|
99 |
}
|
100 |
|
101 |
+
public static function getEnabledSearchaniseSearch()
|
102 |
+
{
|
103 |
+
return self::getSetting('enabled_searchanise_search');
|
104 |
+
}
|
105 |
+
|
106 |
public static function checkAjaxAsync()
|
107 |
{
|
108 |
return self::getTypeAsync() == 2;
|
120 |
return self::getLabelForPricesUsergroup() . $customerGroupId;
|
121 |
}
|
122 |
|
123 |
+
public static function getMaxPageSize() {
|
124 |
+
return self::MAX_PAGE_SIZE;
|
125 |
+
}
|
126 |
+
|
127 |
public static function getFloatPrecision() {
|
128 |
return self::FLOAT_PRECISION;
|
129 |
}
|
280 |
public static function getUrl($link, $flNotUserHttpRequest = false, $storeId = '', $flCheckSecure = true)
|
281 |
{
|
282 |
if ($storeId != '') {
|
283 |
+
$prevStoreId = Mage::app()->getStore()->getId();
|
284 |
// need for generate correct url
|
285 |
+
if ($prevStoreId != $storeId) {
|
286 |
+
Mage::app()->setCurrentStore($storeId);
|
287 |
+
}
|
288 |
}
|
289 |
|
290 |
$params = array();
|
302 |
$url .= self::getParamNotUseHttpRequest();
|
303 |
}
|
304 |
|
305 |
+
if ($storeId != '') {
|
306 |
+
if ($prevStoreId != $storeId) {
|
307 |
+
Mage::app()->setCurrentStore($prevStoreId);
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
return $url;
|
312 |
}
|
313 |
|
432 |
|
433 |
$ret['parent_private_key'] = self::getParentPrivateKey();
|
434 |
$ret['private_key'] = self::getPrivateKeys();
|
435 |
+
$ret['api_key'] = self::getApiKeys();
|
436 |
$ret['export_status'] = self::getExportStatuses();
|
437 |
|
438 |
$ret['last_request'] = self::formatDate(self::getLastRequest(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
|
526 |
{
|
527 |
return self::getSettingStore('api_key', $store, self::CONFIG_PREFIX);
|
528 |
}
|
529 |
+
|
530 |
+
public static function getApiKeys()
|
531 |
+
{
|
532 |
+
$ret = array();
|
533 |
+
$stores = Mage::app()->getStores();
|
534 |
+
|
535 |
+
if ($stores != '') {
|
536 |
+
foreach ($stores as $k_store => $store) {
|
537 |
+
$ret[$store->getId()] = self::getApiKey($store);
|
538 |
+
}
|
539 |
+
}
|
540 |
+
|
541 |
+
return $ret;
|
542 |
+
}
|
543 |
|
544 |
public static function getDate()
|
545 |
{
|
1295 |
{
|
1296 |
@ignore_user_abort(true);
|
1297 |
@set_time_limit(0);
|
1298 |
+
// Need for get all products.
|
1299 |
+
Mage::app()->setCurrentStore(0);
|
1300 |
|
1301 |
$xmlHeader = Mage::helper('searchanise/ApiXML')->getXMLHeader();
|
1302 |
$xmlFooter = Mage::helper('searchanise/ApiXML')->getXMLFooter();
|
1392 |
self::echoConnectProgress('.');
|
1393 |
$sqls_arr = array();
|
1394 |
}*/
|
1395 |
+
// end fixme
|
1396 |
} while ($end <= $max);
|
1397 |
|
1398 |
if (count($sqls_arr) > 0) {
|
1436 |
|
1437 |
Mage::getModel('searchanise/queue')->setData($queueData)->save();
|
1438 |
}
|
1439 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1440 |
// add facet-tags
|
1441 |
{
|
1442 |
$queueData = array(
|
1479 |
} elseif ($q['action'] == Simtech_Searchanise_Model_Queue::ACT_FACET_UPDATE) {
|
1480 |
if ($data == Simtech_Searchanise_Model_Queue::DATA_FACET_CATEGORIES) {
|
1481 |
$xml .= Mage::helper('searchanise/ApiXML')->generateFacetXMLCategories();
|
1482 |
+
|
1483 |
} elseif ($data == Simtech_Searchanise_Model_Queue::DATA_FACET_PRICES) {
|
1484 |
$xml .= Mage::helper('searchanise/ApiXML')->generateFacetXMLPrices();
|
1485 |
|
@@ -11,10 +11,26 @@
|
|
11 |
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
|
12 |
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
****************************************************************************/
|
|
|
14 |
class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
15 |
{
|
16 |
const XML_END_LINE = "\n";
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
public static function getStockItem($product, $store = null)
|
19 |
{
|
20 |
$stockItem = null;
|
@@ -64,12 +80,12 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
64 |
$smallImage = $product->getData('small_image');
|
65 |
|
66 |
if (!empty($smallImage) && $smallImage != 'no_selection') {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
}
|
74 |
}
|
75 |
|
@@ -249,7 +265,7 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
249 |
$summary = $product->getData('short_description');
|
250 |
|
251 |
if ($summary == '') {
|
252 |
-
$summary = $product->getData('description');
|
253 |
}
|
254 |
$entry .= '<summary><![CDATA[' . $summary. ']]></summary>' . self::XML_END_LINE;
|
255 |
|
@@ -296,7 +312,10 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
296 |
$quantity = self::getProductQty($product, $store, true);
|
297 |
|
298 |
$entry .= '<cs:quantity>' . ceil($quantity) . '</cs:quantity>' . self::XML_END_LINE;
|
299 |
-
$
|
|
|
|
|
|
|
300 |
$quantity = round($quantity, Mage::helper('searchanise/ApiSe')->getFloatPrecision());
|
301 |
$entry .= '<cs:attribute name="quantity_decimals" type="float">' . $quantity . '</cs:attribute>' . self::XML_END_LINE;
|
302 |
}
|
@@ -317,13 +336,16 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
317 |
|
318 |
// <attributes_position>
|
319 |
{
|
320 |
-
$
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
|
|
|
|
327 |
}
|
328 |
// </attributes_position>
|
329 |
|
@@ -333,62 +355,194 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
333 |
$attributes = Mage::getResourceModel('catalog/product_attribute_collection');
|
334 |
$attributes
|
335 |
->setItemObjectClass('catalog/resource_eav_attribute')
|
336 |
-
->setOrder('position', 'ASC')
|
337 |
->load();
|
338 |
|
339 |
if (!empty($attributes)) {
|
340 |
foreach ($attributes as $attribute) {
|
|
|
|
|
341 |
$inputType = $attribute->getData('frontend_input');
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
347 |
|
348 |
-
} elseif ($
|
349 |
-
|
350 |
-
|
351 |
-
$entry .= '<cs:attribute name="attribute_' . $attribute->getId() . '" type="text">';
|
352 |
-
$entry .= $value;
|
353 |
-
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
354 |
}
|
|
|
|
|
|
|
355 |
|
356 |
-
|
357 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
}
|
368 |
}
|
369 |
}
|
370 |
}
|
371 |
|
372 |
-
if ($
|
373 |
-
$entry .= '<cs:attribute name="
|
374 |
// fixme in the future
|
375 |
// need for fixed bug of Server
|
376 |
$entry .= ' ';
|
|
|
377 |
|
378 |
-
$entry .= $
|
379 |
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
380 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
|
382 |
-
|
383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
|
385 |
-
|
386 |
-
|
|
|
|
|
387 |
|
388 |
-
|
|
|
|
|
389 |
|
390 |
-
|
|
|
|
|
391 |
}
|
|
|
|
|
|
|
|
|
|
|
392 |
} else {
|
393 |
// attribute is not filtrable
|
394 |
}
|
@@ -413,39 +567,49 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
413 |
// </categories>
|
414 |
|
415 |
// <status>
|
416 |
-
$entry .= '<cs:attribute name="status" type="text">' . $product->getStatus() . '</cs:attribute>' . self::XML_END_LINE;
|
417 |
// </status>
|
418 |
|
419 |
// <visibility>
|
420 |
-
$entry .= '<cs:attribute name="visibility" type="text">' . $product->getData('visibility'). '</cs:attribute>' . self::XML_END_LINE;
|
421 |
// </visibility>
|
422 |
|
423 |
// <tags>
|
424 |
{
|
425 |
-
$
|
|
|
426 |
|
427 |
$tags = self::getTagCollection($product, $store);
|
428 |
|
429 |
-
if (
|
430 |
foreach ($tags as $tag) {
|
431 |
-
if (
|
432 |
-
$
|
|
|
433 |
}
|
434 |
}
|
435 |
}
|
436 |
|
437 |
-
if ($
|
438 |
-
$entry .= '<cs:attribute name="
|
439 |
// fixme in the future
|
440 |
// need for fixed bug of Server
|
441 |
$entry .= ' ';
|
|
|
|
|
|
|
442 |
|
443 |
-
$entry .=
|
|
|
|
|
|
|
|
|
|
|
444 |
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
445 |
}
|
446 |
}
|
447 |
// </tags>
|
448 |
-
|
449 |
$entry .= '</entry>' . self::XML_END_LINE;
|
450 |
|
451 |
return $entry;
|
@@ -480,36 +644,59 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
480 |
|
481 |
return null;
|
482 |
}
|
483 |
-
|
484 |
-
public static function
|
485 |
{
|
486 |
-
$
|
487 |
-
$
|
488 |
-
$entry .= '<cs:position>' . $filter->getPosition() . '</cs:position>' . self::XML_END_LINE;
|
489 |
|
490 |
-
$
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
$
|
501 |
-
|
502 |
-
|
503 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
}
|
505 |
-
|
506 |
-
// attribute is not filtrable
|
507 |
-
} else {
|
508 |
-
return '';
|
509 |
}
|
510 |
|
511 |
-
$entry .= '</entry>' . self::XML_END_LINE;
|
512 |
-
|
513 |
return $entry;
|
514 |
}
|
515 |
|
@@ -529,9 +716,11 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
529 |
|
530 |
private static function getProducts($productIds = null, $store = null, $flagAddMinimalPrice = false, $customerGroupId = null)
|
531 |
{
|
532 |
-
//
|
533 |
if ($store) {
|
534 |
Mage::app()->setCurrentStore($store->getId());
|
|
|
|
|
535 |
}
|
536 |
|
537 |
$products = Mage::getModel('catalog/product')
|
@@ -622,7 +811,7 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
622 |
$filters = Mage::getResourceModel('catalog/product_attribute_collection')
|
623 |
->setItemObjectClass('catalog/resource_eav_attribute');
|
624 |
|
625 |
-
if (
|
626 |
$filters->addStoreLabel($store->getId());
|
627 |
}
|
628 |
|
@@ -653,28 +842,29 @@ class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
|
653 |
public static function generateFacetXMLPrices($store = null)
|
654 |
{
|
655 |
$entry = '';
|
656 |
-
$step = self::getPriceNavigationStep($store);
|
657 |
|
658 |
-
$
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
$
|
663 |
-
|
664 |
-
$entry .= '<cs:type>dynamic</cs:type>' . self::XML_END_LINE;
|
665 |
-
|
666 |
-
if (!empty($step)) {
|
667 |
-
$entry .= '<cs:min_range>' . $step . '</cs:min_range>' . self::XML_END_LINE;
|
668 |
}
|
669 |
|
670 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
|
672 |
return $entry;
|
673 |
}
|
674 |
|
675 |
public static function generateFacetXMLTags()
|
676 |
{
|
677 |
-
return self::generateFacetXMLFromCustom('Tag', 0, '
|
678 |
}
|
679 |
|
680 |
public static function getXMLHeader($store = null)
|
11 |
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
|
12 |
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
****************************************************************************/
|
14 |
+
|
15 |
class Simtech_Searchanise_Helper_ApiXML extends Mage_Core_Helper_Data
|
16 |
{
|
17 |
const XML_END_LINE = "\n";
|
18 |
+
|
19 |
+
const WEIGHT_SHORT_DESCRIPTION = 0; // not need because use in summary
|
20 |
+
const WEIGHT_DESCRIPTION = 40;
|
21 |
+
|
22 |
+
const WEIGHT_TAGS = 60;
|
23 |
+
|
24 |
+
// <if_isSearchable>
|
25 |
+
const WEIGHT_META_TITLE = 80;
|
26 |
+
const WEIGHT_META_KEYWORDS = 100;
|
27 |
+
const WEIGHT_META_DESCRIPTION = 40;
|
28 |
+
|
29 |
+
const WEIGHT_SELECT_ATTRIBUTES = 60;
|
30 |
+
const WEIGHT_TEXT_ATTRIBUTES = 60;
|
31 |
+
const WEIGHT_TEXT_AREA_ATTRIBUTES = 40;
|
32 |
+
// </if_isSearchable>
|
33 |
+
|
34 |
public static function getStockItem($product, $store = null)
|
35 |
{
|
36 |
$stockItem = null;
|
80 |
$smallImage = $product->getData('small_image');
|
81 |
|
82 |
if (!empty($smallImage) && $smallImage != 'no_selection') {
|
83 |
+
$imageLink = Mage::helper('catalog/image')
|
84 |
+
->init($product, 'small_image')
|
85 |
+
->constrainOnly(true) // Guarantee, that image picture will not be bigger, than it was.
|
86 |
+
->keepAspectRatio(true) // Guarantee, that image picture width/height will not be distorted.
|
87 |
+
->keepFrame($flagKeepFrame) // Guarantee, that image will have dimensions, set in $width/$height
|
88 |
+
->resize($width, $height);
|
89 |
}
|
90 |
}
|
91 |
|
265 |
$summary = $product->getData('short_description');
|
266 |
|
267 |
if ($summary == '') {
|
268 |
+
$summary = $product->getData('description');
|
269 |
}
|
270 |
$entry .= '<summary><![CDATA[' . $summary. ']]></summary>' . self::XML_END_LINE;
|
271 |
|
312 |
$quantity = self::getProductQty($product, $store, true);
|
313 |
|
314 |
$entry .= '<cs:quantity>' . ceil($quantity) . '</cs:quantity>' . self::XML_END_LINE;
|
315 |
+
$isInStock = $quantity > 0;
|
316 |
+
if ($isInStock) {
|
317 |
+
$entry .= '<cs:attribute name="is_in_stock" type="text" text_search="N">' . $isInStock . '</cs:attribute>' . self::XML_END_LINE;
|
318 |
+
}
|
319 |
$quantity = round($quantity, Mage::helper('searchanise/ApiSe')->getFloatPrecision());
|
320 |
$entry .= '<cs:attribute name="quantity_decimals" type="float">' . $quantity . '</cs:attribute>' . self::XML_END_LINE;
|
321 |
}
|
336 |
|
337 |
// <attributes_position>
|
338 |
{
|
339 |
+
$position = $product->getData('position');
|
340 |
+
if ($position) {
|
341 |
+
$entry .= '<cs:attribute name="position" type="int">';
|
342 |
+
|
343 |
+
// fixme in the feature
|
344 |
+
// sort by "position" disabled
|
345 |
+
$entry .= $product->getData('position');
|
346 |
+
|
347 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
348 |
+
}
|
349 |
}
|
350 |
// </attributes_position>
|
351 |
|
355 |
$attributes = Mage::getResourceModel('catalog/product_attribute_collection');
|
356 |
$attributes
|
357 |
->setItemObjectClass('catalog/resource_eav_attribute')
|
358 |
+
// ->setOrder('position', 'ASC') // not need, because "order" will slow
|
359 |
->load();
|
360 |
|
361 |
if (!empty($attributes)) {
|
362 |
foreach ($attributes as $attribute) {
|
363 |
+
$attributeCode = $attribute->getAttributeCode();
|
364 |
+
$value = $product->getData($attributeCode);
|
365 |
$inputType = $attribute->getData('frontend_input');
|
366 |
+
$isSearchable = $attribute->getIsSearchable();
|
367 |
+
$attributeName = 'attribute_' . $attribute->getId();
|
368 |
+
$attributeWeight = 0;
|
369 |
+
|
370 |
+
if ($value == '') {
|
371 |
+
// nothing
|
372 |
+
|
373 |
+
} elseif (is_array($value) && empty($value)) {
|
374 |
+
// nothing
|
375 |
+
|
376 |
+
} elseif ($attributeCode == 'price') {
|
377 |
+
// nothing
|
378 |
+
// defined in the '<cs:price>' field
|
379 |
+
|
380 |
+
} elseif ($attributeCode == 'group_price') {
|
381 |
+
// nothing
|
382 |
+
// fixme in the future if need
|
383 |
+
|
384 |
+
} elseif ($attributeCode == 'short_description') {
|
385 |
+
if ($isSearchable) {
|
386 |
+
$attributeWeight = self::WEIGHT_SHORT_DESCRIPTION;
|
387 |
+
}
|
388 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
389 |
+
$entry .= '<![CDATA[' . $value . ']]>';
|
390 |
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
391 |
|
392 |
+
} elseif ($attributeCode == 'description') {
|
393 |
+
if ($isSearchable) {
|
394 |
+
$attributeWeight = self::WEIGHT_DESCRIPTION;
|
|
|
|
|
|
|
395 |
}
|
396 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
397 |
+
$entry .= '<![CDATA[' . $value . ']]>';
|
398 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
399 |
|
400 |
+
// <meta_information>
|
401 |
+
} elseif ($attributeCode == 'meta_title') {
|
402 |
+
if ($isSearchable) {
|
403 |
+
$attributeWeight = self::WEIGHT_META_TITLE;
|
404 |
+
}
|
405 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
406 |
+
$entry .= '<![CDATA[' . $value . ']]>';
|
407 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
408 |
|
409 |
+
} elseif ($attributeCode == 'meta_description') {
|
410 |
+
if ($isSearchable) {
|
411 |
+
$attributeWeight = self::WEIGHT_META_DESCRIPTION;
|
412 |
+
}
|
413 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
414 |
+
$entry .= '<![CDATA[' . $value . ']]>';
|
415 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
416 |
+
|
417 |
+
} elseif ($attributeCode == 'meta_keyword') {
|
418 |
+
if ($isSearchable) {
|
419 |
+
$attributeWeight = self::WEIGHT_META_KEYWORDS;
|
420 |
+
}
|
421 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
422 |
+
$entry .= '<![CDATA[' . $value . ']]>';
|
423 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
424 |
+
// </meta_information>
|
425 |
+
|
426 |
+
// <unused attributes>
|
427 |
+
// <system_attributes>
|
428 |
+
} elseif ($attributeCode == 'status') {
|
429 |
+
} elseif ($attributeCode == 'visibility') {
|
430 |
+
} elseif ($attributeCode == 'has_options') {
|
431 |
+
} elseif ($attributeCode == 'required_options') {
|
432 |
+
} elseif ($attributeCode == 'custom_layout_update') {
|
433 |
+
} elseif ($attributeCode == 'tier_price') { // quantity discount
|
434 |
+
} elseif ($attributeCode == 'created_at') { // date
|
435 |
+
} elseif ($attributeCode == 'updated_at') { // date
|
436 |
+
} elseif ($attributeCode == 'image_label') {
|
437 |
+
} elseif ($attributeCode == 'small_image_label') {
|
438 |
+
} elseif ($attributeCode == 'thumbnail_label') {
|
439 |
+
} elseif ($attributeCode == 'url_key') { // seo name
|
440 |
+
// <system_attributes>
|
441 |
+
// </unused attributes>
|
442 |
+
|
443 |
+
} elseif ($inputType == 'price') {
|
444 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="float">';
|
445 |
+
$entry .= $value;
|
446 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
447 |
+
|
448 |
+
} elseif ($inputType == 'select') {
|
449 |
+
// <id_value>
|
450 |
+
// Example values: '0', '1', 'AF'.
|
451 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text" text_search="N">';
|
452 |
+
$entry .= '<![CDATA[' . $value . ']]>';
|
453 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
454 |
+
// </id_value>
|
455 |
+
|
456 |
+
// <text_value>
|
457 |
+
if ($isSearchable) {
|
458 |
+
$attributeWeight = self::WEIGHT_SELECT_ATTRIBUTES;
|
459 |
+
$textValue = $product->getResource()->getAttribute($attributeCode)->getFrontend()->getValue($product);
|
460 |
+
|
461 |
+
if ($textValue != '') {
|
462 |
+
$entry .= '<cs:attribute name="' . $attributeCode .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
463 |
+
// fixme in the future
|
464 |
+
// need for fixed bug of Server
|
465 |
+
$entry .= ' ';
|
466 |
+
// end fixme
|
467 |
+
$entry .= '<![CDATA[' . $textValue . ']]>';
|
468 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
469 |
+
}
|
470 |
+
}
|
471 |
+
// <text_value>
|
472 |
+
|
473 |
+
} elseif ($inputType == 'multiselect') {
|
474 |
+
// <id_values>
|
475 |
+
$strIdValues = '';
|
476 |
+
if ($value != '') {
|
477 |
+
$arrValues = explode(',', $value);
|
478 |
+
if (!empty($arrValues)) {
|
479 |
+
foreach ($arrValues as $v) {
|
480 |
+
if ($v != '') {
|
481 |
+
$strIdValues .= '<value>' . $v . '</value>';
|
482 |
}
|
483 |
}
|
484 |
}
|
485 |
}
|
486 |
|
487 |
+
if ($strIdValues != '') {
|
488 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text">';
|
489 |
// fixme in the future
|
490 |
// need for fixed bug of Server
|
491 |
$entry .= ' ';
|
492 |
+
// end fixme
|
493 |
|
494 |
+
$entry .= $strIdValues;
|
495 |
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
496 |
}
|
497 |
+
// </id_values>
|
498 |
+
|
499 |
+
// <text_values>
|
500 |
+
$strTextValues = '';
|
501 |
+
if ($isSearchable) {
|
502 |
+
$attributeWeight = self::WEIGHT_SELECT_ATTRIBUTES;
|
503 |
+
$textValues = $product->getResource()->getAttribute($attributeCode)->getFrontend()->getValue($product);
|
504 |
+
if ($textValues != '') {
|
505 |
+
$arrValues = explode(',', $textValues);
|
506 |
+
if (!empty($arrValues)) {
|
507 |
+
foreach ($arrValues as $v) {
|
508 |
+
if ($v != '') {
|
509 |
+
$trimValue = trim($v);
|
510 |
+
$strTextValues .= '<value><![CDATA[' . $trimValue . ']]></value>';
|
511 |
+
}
|
512 |
+
}
|
513 |
+
}
|
514 |
+
}
|
515 |
+
}
|
516 |
|
517 |
+
if ($strIdValues != '') {
|
518 |
+
$entry .= '<cs:attribute name="' . $attributeCode .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
519 |
+
// fixme in the future
|
520 |
+
// need for fixed bug of Server
|
521 |
+
$entry .= ' ';
|
522 |
+
// end fixme
|
523 |
+
$entry .= $strTextValues;
|
524 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
525 |
+
}
|
526 |
+
// <text_values>
|
527 |
|
528 |
+
} elseif ($inputType == 'text') {
|
529 |
+
if ($isSearchable) {
|
530 |
+
$attributeWeight = self::WEIGHT_TEXT_ATTRIBUTES;
|
531 |
+
}
|
532 |
|
533 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
534 |
+
$entry .= '<![CDATA[' . $value . ']]>';
|
535 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
536 |
|
537 |
+
} elseif ($inputType == 'textarea') {
|
538 |
+
if ($isSearchable) {
|
539 |
+
$attributeWeight = self::WEIGHT_TEXT_AREA_ATTRIBUTES;
|
540 |
}
|
541 |
+
|
542 |
+
$entry .= '<cs:attribute name="' . $attributeName .'" type="text" text_search="Y" weight="' . $attributeWeight . '">';
|
543 |
+
$entry .= '<![CDATA[' . $value . ']]>';
|
544 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
545 |
+
|
546 |
} else {
|
547 |
// attribute is not filtrable
|
548 |
}
|
567 |
// </categories>
|
568 |
|
569 |
// <status>
|
570 |
+
$entry .= '<cs:attribute name="status" type="text" text_search="N">' . $product->getStatus() . '</cs:attribute>' . self::XML_END_LINE;
|
571 |
// </status>
|
572 |
|
573 |
// <visibility>
|
574 |
+
$entry .= '<cs:attribute name="visibility" type="text" text_search="N">' . $product->getData('visibility'). '</cs:attribute>' . self::XML_END_LINE;
|
575 |
// </visibility>
|
576 |
|
577 |
// <tags>
|
578 |
{
|
579 |
+
$strTagIds = '';
|
580 |
+
$strTagNames = '';
|
581 |
|
582 |
$tags = self::getTagCollection($product, $store);
|
583 |
|
584 |
+
if ($tags) {
|
585 |
foreach ($tags as $tag) {
|
586 |
+
if ($tag != '') {
|
587 |
+
$strTagIds .= '<value>' . $tag->getId() . '</value>';
|
588 |
+
$strTagNames .= '<value>' . $tag->getName() . '</value>';
|
589 |
}
|
590 |
}
|
591 |
}
|
592 |
|
593 |
+
if ($strTagIds != '') {
|
594 |
+
$entry .= '<cs:attribute name="tag_ids" type="text" text_search="N">';
|
595 |
// fixme in the future
|
596 |
// need for fixed bug of Server
|
597 |
$entry .= ' ';
|
598 |
+
// end fixme
|
599 |
+
$entry .= $strTagIds;
|
600 |
+
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
601 |
|
602 |
+
$entry .= '<cs:attribute name="tags" type="text" text_search="Y" weight="' . self::WEIGHT_TAGS .'">';
|
603 |
+
// fixme in the future
|
604 |
+
// need for fixed bug of Server
|
605 |
+
$entry .= ' ';
|
606 |
+
// end fixme
|
607 |
+
$entry .= $strTagNames;
|
608 |
$entry .= '</cs:attribute>' . self::XML_END_LINE;
|
609 |
}
|
610 |
}
|
611 |
// </tags>
|
612 |
+
|
613 |
$entry .= '</entry>' . self::XML_END_LINE;
|
614 |
|
615 |
return $entry;
|
644 |
|
645 |
return null;
|
646 |
}
|
647 |
+
|
648 |
+
public static function checkFacet($attribute)
|
649 |
{
|
650 |
+
$isFilterable = $attribute->getIsFilterable();
|
651 |
+
$isFilterableInSearch = $attribute->getIsFilterableInSearch();
|
|
|
652 |
|
653 |
+
return $isFilterable || $isFilterableInSearch;
|
654 |
+
}
|
655 |
+
|
656 |
+
public static function generateFacetXMLFromFilter($filter, $store = null)
|
657 |
+
{
|
658 |
+
$entry = '';
|
659 |
+
|
660 |
+
if (self::checkFacet($filter)) {
|
661 |
+
$attributeType = '';
|
662 |
+
|
663 |
+
$inputType = $filter->getData('frontend_input');
|
664 |
+
|
665 |
+
// "Can be used only with catalog input type Dropdown, Multiple Select and Price".
|
666 |
+
if (($inputType == 'select') || ($inputType == 'multiselect')) {
|
667 |
+
$attributeType = '<cs:type>select</cs:type>' . self::XML_END_LINE;
|
668 |
+
|
669 |
+
} elseif ($inputType == 'price') {
|
670 |
+
$attributeType = '<cs:type>dynamic</cs:type>' . self::XML_END_LINE;
|
671 |
+
$step = self::getPriceNavigationStep($store);
|
672 |
+
|
673 |
+
if (!empty($step)) {
|
674 |
+
$attributeType .= '<cs:min_range>' . $step . '</cs:min_range>' . self::XML_END_LINE;
|
675 |
+
}
|
676 |
+
} else {
|
677 |
+
// attribute is not filtrable
|
678 |
+
// nothing
|
679 |
+
}
|
680 |
+
|
681 |
+
if ($attributeType != '') {
|
682 |
+
$entry = '<entry>' . self::XML_END_LINE;
|
683 |
+
$entry .= '<title><![CDATA[' . $filter->getData('frontend_label') . ']]></title>' . self::XML_END_LINE;
|
684 |
+
$entry .= '<cs:position>' . $filter->getPosition() . '</cs:position>' . self::XML_END_LINE;
|
685 |
+
|
686 |
+
$attributeCode = $filter->getAttributeCode();
|
687 |
+
|
688 |
+
if ($attributeCode == 'price') {
|
689 |
+
$labelAttribute = 'price';
|
690 |
+
} else {
|
691 |
+
$labelAttribute = 'attribute_' . $filter->getId();
|
692 |
+
}
|
693 |
+
|
694 |
+
$entry .= '<cs:attribute>' . $labelAttribute . '</cs:attribute>' . self::XML_END_LINE;
|
695 |
+
$entry .= $attributeType;
|
696 |
+
$entry .= '</entry>' . self::XML_END_LINE;
|
697 |
}
|
|
|
|
|
|
|
|
|
698 |
}
|
699 |
|
|
|
|
|
700 |
return $entry;
|
701 |
}
|
702 |
|
716 |
|
717 |
private static function getProducts($productIds = null, $store = null, $flagAddMinimalPrice = false, $customerGroupId = null)
|
718 |
{
|
719 |
+
// Need for generate correct url and get right products.
|
720 |
if ($store) {
|
721 |
Mage::app()->setCurrentStore($store->getId());
|
722 |
+
} else {
|
723 |
+
Mage::app()->setCurrentStore(0);
|
724 |
}
|
725 |
|
726 |
$products = Mage::getModel('catalog/product')
|
811 |
$filters = Mage::getResourceModel('catalog/product_attribute_collection')
|
812 |
->setItemObjectClass('catalog/resource_eav_attribute');
|
813 |
|
814 |
+
if ($store) {
|
815 |
$filters->addStoreLabel($store->getId());
|
816 |
}
|
817 |
|
842 |
public static function generateFacetXMLPrices($store = null)
|
843 |
{
|
844 |
$entry = '';
|
|
|
845 |
|
846 |
+
$filters = Mage::getResourceModel('catalog/product_attribute_collection')
|
847 |
+
->setItemObjectClass('catalog/resource_eav_attribute')
|
848 |
+
->addFieldToFilter('main_table.frontend_input', array('eq' => 'price'));
|
849 |
+
|
850 |
+
if ($store) {
|
851 |
+
$filters->addStoreLabel($store->getId());
|
|
|
|
|
|
|
|
|
852 |
}
|
853 |
|
854 |
+
$filters->load();
|
855 |
+
|
856 |
+
if (!empty($filters)) {
|
857 |
+
foreach ($filters as $filter) {
|
858 |
+
$entry .= self::generateFacetXMLFromFilter($filter, $store);
|
859 |
+
}
|
860 |
+
}
|
861 |
|
862 |
return $entry;
|
863 |
}
|
864 |
|
865 |
public static function generateFacetXMLTags()
|
866 |
{
|
867 |
+
return self::generateFacetXMLFromCustom('Tag', 0, 'tag_ids', 'select');
|
868 |
}
|
869 |
|
870 |
public static function getXMLHeader($store = null)
|
@@ -101,19 +101,19 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
101 |
if (in_array($type, self::$_searchaniseTypes)) {
|
102 |
if ($type == self::TEXT_FIND) {
|
103 |
$params['sortBy'] = 'relevance';
|
104 |
-
$params['sortOrder'] = '
|
105 |
|
106 |
} elseif ($type == self::TEXT_ADVANCED_FIND) {
|
107 |
$params['sortBy'] = 'title';
|
108 |
-
$params['sortOrder'] = '
|
109 |
|
110 |
} elseif ($type == self::VIEW_CATEGORY) {
|
111 |
$params['sortBy'] = 'position';
|
112 |
-
$params['sortOrder'] = '
|
113 |
|
114 |
} elseif ($type == self::VIEW_TAG) {
|
115 |
$params['sortBy'] = 'title';
|
116 |
-
$params['sortOrder'] = '
|
117 |
}
|
118 |
|
119 |
if (empty($params['restrictBy'])) {
|
@@ -140,9 +140,9 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
140 |
return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
|
141 |
}
|
142 |
|
143 |
-
public function execute($type = null, $controller = null, $
|
144 |
{
|
145 |
-
if (!$this->checkEnabled()) {
|
146 |
return;
|
147 |
}
|
148 |
|
@@ -154,7 +154,7 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
154 |
if (empty($params)) {
|
155 |
$params = array();
|
156 |
}
|
157 |
-
|
158 |
// Set default value.
|
159 |
$this->setDefaultSort($params, $type);
|
160 |
|
@@ -171,8 +171,8 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
171 |
if (in_array($type, self::$_searchaniseTypes)) {
|
172 |
if ($type == self::TEXT_FIND) {
|
173 |
$params['q'] = Mage::helper('catalogsearch')->getQueryText();
|
174 |
-
if ($params['q']) {
|
175 |
-
$params['q'] = trim($params['q']);
|
176 |
}
|
177 |
|
178 |
$params['facets'] = 'true';
|
@@ -218,8 +218,8 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
218 |
}
|
219 |
}
|
220 |
|
221 |
-
if ((!empty($controller)) && (!empty($
|
222 |
-
if ($availableOrders = $
|
223 |
if (in_array($type, self::$_searchaniseTypes)) {
|
224 |
if ($type == self::TEXT_FIND) {
|
225 |
unset($availableOrders['position']);
|
@@ -229,25 +229,29 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
229 |
$availableOrders
|
230 |
);
|
231 |
|
232 |
-
$
|
233 |
} elseif ($type == self::TEXT_ADVANCED_FIND) {
|
234 |
unset($availableOrders['position']);
|
235 |
-
$
|
236 |
|
237 |
} elseif ($type == self::VIEW_TAG) {
|
238 |
unset($availableOrders['position']);
|
239 |
|
240 |
-
$
|
241 |
}
|
242 |
}
|
243 |
}
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
|
|
|
|
|
|
|
|
249 |
$start_index = 0;
|
250 |
-
$cur_page = (int) $
|
251 |
$start_index = $cur_page > 1 ? ($cur_page - 1) * $max_results : 0;
|
252 |
|
253 |
if ($max_results) {
|
@@ -257,16 +261,16 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
257 |
$params['startIndex'] = $start_index;
|
258 |
}
|
259 |
|
260 |
-
if ($
|
261 |
-
if ($
|
262 |
$params['sortBy'] = 'title';
|
263 |
} else {
|
264 |
-
$params['sortBy'] = $
|
265 |
}
|
266 |
}
|
267 |
|
268 |
-
if ($
|
269 |
-
$params['sortOrder'] = $
|
270 |
}
|
271 |
}
|
272 |
|
@@ -276,13 +280,13 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
276 |
if (!empty($controller)) {
|
277 |
// CATEGORIES
|
278 |
{
|
279 |
-
$
|
280 |
|
281 |
if ((in_array($type, self::$_searchaniseTypes)) && ($type != self::VIEW_TAG)) {
|
282 |
$cat_id = (int) $controller->getRequest()->getParam('cat');
|
283 |
if (!empty($cat_id)) {
|
284 |
-
$
|
285 |
-
$
|
286 |
|
287 |
$categories = Mage::getModel('catalog/category')
|
288 |
->getCollection()
|
@@ -294,21 +298,21 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
294 |
if (!empty($categories)) {
|
295 |
foreach ($categories as $cat) {
|
296 |
if (!empty($cat)) {
|
297 |
-
$
|
298 |
}
|
299 |
}
|
300 |
}
|
301 |
} elseif (($type == self::VIEW_CATEGORY) && (!empty($data))) {
|
302 |
// data = category
|
303 |
-
$
|
304 |
}
|
305 |
}
|
306 |
|
307 |
-
if (!empty($
|
308 |
-
if (is_array($
|
309 |
-
$params['restrictBy']['categories'] = implode('|', $
|
310 |
} else {
|
311 |
-
$params['restrictBy']['categories'] = $
|
312 |
}
|
313 |
}
|
314 |
}
|
@@ -326,26 +330,26 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
326 |
}
|
327 |
|
328 |
if (!empty($arrAttributes)) {
|
329 |
-
$
|
330 |
|
331 |
-
if (!empty($
|
332 |
-
foreach ($
|
333 |
$id = array_search($name, $arrAttributes);
|
334 |
if (($name) && ($id)) {
|
335 |
-
|
|
|
336 |
if ($name == 'price') {
|
337 |
$valPrice = Mage::helper('searchanise/ApiSe')->getPriceValueFromRequest($val);
|
338 |
if ($valPrice != '') {
|
339 |
$params['restrictBy']['price'] = $valPrice;
|
340 |
}
|
341 |
-
continue;
|
342 |
-
}
|
343 |
|
344 |
-
|
|
|
345 |
$valPrice = Mage::helper('searchanise/ApiSe')->getPriceValueFromRequest($val);
|
346 |
|
347 |
if ($valPrice != '') {
|
348 |
-
$params['restrictBy'][
|
349 |
}
|
350 |
|
351 |
} elseif (($arrInputType[$id] == 'text') || ($arrInputType[$id] == 'textarea')) {
|
@@ -353,7 +357,7 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
353 |
$val = Mage::helper('searchanise/ApiSe')->escapingCharacters($val);
|
354 |
|
355 |
if ($val != '') {
|
356 |
-
$params['queryBy'][
|
357 |
}
|
358 |
}
|
359 |
|
@@ -362,9 +366,9 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
362 |
($arrInputType[$id] == 'boolean')) {
|
363 |
if ($val) {
|
364 |
if (is_array($val)) {
|
365 |
-
$params['restrictBy'][
|
366 |
} else {
|
367 |
-
$params['restrictBy'][
|
368 |
}
|
369 |
}
|
370 |
|
@@ -381,16 +385,22 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
381 |
if ((in_array($type, self::$_searchaniseTypes)) && ($type == self::VIEW_TAG)) {
|
382 |
if ($data) {
|
383 |
// data = tag
|
384 |
-
$params['restrictBy']['
|
385 |
}
|
386 |
}
|
387 |
}
|
388 |
|
389 |
// need for other sort_by
|
390 |
if (!empty($arrAttributes)) {
|
391 |
-
|
392 |
-
|
393 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
}
|
395 |
}
|
396 |
|
101 |
if (in_array($type, self::$_searchaniseTypes)) {
|
102 |
if ($type == self::TEXT_FIND) {
|
103 |
$params['sortBy'] = 'relevance';
|
104 |
+
$params['sortOrder'] = 'desc';
|
105 |
|
106 |
} elseif ($type == self::TEXT_ADVANCED_FIND) {
|
107 |
$params['sortBy'] = 'title';
|
108 |
+
$params['sortOrder'] = 'desc';
|
109 |
|
110 |
} elseif ($type == self::VIEW_CATEGORY) {
|
111 |
$params['sortBy'] = 'position';
|
112 |
+
$params['sortOrder'] = 'desc';
|
113 |
|
114 |
} elseif ($type == self::VIEW_TAG) {
|
115 |
$params['sortBy'] = 'title';
|
116 |
+
$params['sortOrder'] = 'desc';
|
117 |
}
|
118 |
|
119 |
if (empty($params['restrictBy'])) {
|
140 |
return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
|
141 |
}
|
142 |
|
143 |
+
public function execute($type = null, $controller = null, $blockToolbar = null, $data = null)
|
144 |
{
|
145 |
+
if ((!$this->checkEnabled()) || (!Mage::helper('searchanise/ApiSe')->getEnabledSearchaniseSearch())) {
|
146 |
return;
|
147 |
}
|
148 |
|
154 |
if (empty($params)) {
|
155 |
$params = array();
|
156 |
}
|
157 |
+
|
158 |
// Set default value.
|
159 |
$this->setDefaultSort($params, $type);
|
160 |
|
171 |
if (in_array($type, self::$_searchaniseTypes)) {
|
172 |
if ($type == self::TEXT_FIND) {
|
173 |
$params['q'] = Mage::helper('catalogsearch')->getQueryText();
|
174 |
+
if ($params['q'] != '') {
|
175 |
+
$params['q'] = strtolower(trim($params['q']));
|
176 |
}
|
177 |
|
178 |
$params['facets'] = 'true';
|
218 |
}
|
219 |
}
|
220 |
|
221 |
+
if ((!empty($controller)) && (!empty($blockToolbar))) {
|
222 |
+
if ($availableOrders = $blockToolbar->getAvailableOrders()) {
|
223 |
if (in_array($type, self::$_searchaniseTypes)) {
|
224 |
if ($type == self::TEXT_FIND) {
|
225 |
unset($availableOrders['position']);
|
229 |
$availableOrders
|
230 |
);
|
231 |
|
232 |
+
$blockToolbar->setAvailableOrders($availableOrders);
|
233 |
} elseif ($type == self::TEXT_ADVANCED_FIND) {
|
234 |
unset($availableOrders['position']);
|
235 |
+
$blockToolbar->setAvailableOrders($availableOrders);
|
236 |
|
237 |
} elseif ($type == self::VIEW_TAG) {
|
238 |
unset($availableOrders['position']);
|
239 |
|
240 |
+
$blockToolbar->setAvailableOrders($availableOrders);
|
241 |
}
|
242 |
}
|
243 |
}
|
244 |
+
|
245 |
+
if (isset($params['sortOrder'])) {
|
246 |
+
// need for fix error (when runing first search)
|
247 |
+
$blockToolbar->setDefaultDirection($params['sortOrder']);
|
248 |
+
}
|
249 |
+
$sortBy = $blockToolbar->getCurrentOrder();
|
250 |
+
$sortOrder = $blockToolbar->getCurrentDirection();
|
251 |
+
|
252 |
+
$max_results = (int) $blockToolbar->getLimit();
|
253 |
$start_index = 0;
|
254 |
+
$cur_page = (int) $blockToolbar->getCurrentPage();
|
255 |
$start_index = $cur_page > 1 ? ($cur_page - 1) * $max_results : 0;
|
256 |
|
257 |
if ($max_results) {
|
261 |
$params['startIndex'] = $start_index;
|
262 |
}
|
263 |
|
264 |
+
if ($sortBy) {
|
265 |
+
if ($sortBy == 'name') {
|
266 |
$params['sortBy'] = 'title';
|
267 |
} else {
|
268 |
+
$params['sortBy'] = $sortBy;
|
269 |
}
|
270 |
}
|
271 |
|
272 |
+
if ($sortOrder) {
|
273 |
+
$params['sortOrder'] = $sortOrder;
|
274 |
}
|
275 |
}
|
276 |
|
280 |
if (!empty($controller)) {
|
281 |
// CATEGORIES
|
282 |
{
|
283 |
+
$arrCat = null;
|
284 |
|
285 |
if ((in_array($type, self::$_searchaniseTypes)) && ($type != self::VIEW_TAG)) {
|
286 |
$cat_id = (int) $controller->getRequest()->getParam('cat');
|
287 |
if (!empty($cat_id)) {
|
288 |
+
$arrCat = array();
|
289 |
+
$arrCat[] = $cat_id; // need if not exist children categories
|
290 |
|
291 |
$categories = Mage::getModel('catalog/category')
|
292 |
->getCollection()
|
298 |
if (!empty($categories)) {
|
299 |
foreach ($categories as $cat) {
|
300 |
if (!empty($cat)) {
|
301 |
+
$arrCat = $cat->getAllChildren(true);
|
302 |
}
|
303 |
}
|
304 |
}
|
305 |
} elseif (($type == self::VIEW_CATEGORY) && (!empty($data))) {
|
306 |
// data = category
|
307 |
+
$arrCat = $data->getAllChildren(true);
|
308 |
}
|
309 |
}
|
310 |
|
311 |
+
if (!empty($arrCat)) {
|
312 |
+
if (is_array($arrCat)) {
|
313 |
+
$params['restrictBy']['categories'] = implode('|', $arrCat);
|
314 |
} else {
|
315 |
+
$params['restrictBy']['categories'] = $arrCat;
|
316 |
}
|
317 |
}
|
318 |
}
|
330 |
}
|
331 |
|
332 |
if (!empty($arrAttributes)) {
|
333 |
+
$requestParams = $controller->getRequest()->getParams();
|
334 |
|
335 |
+
if (!empty($requestParams)) {
|
336 |
+
foreach ($requestParams as $name => $val) {
|
337 |
$id = array_search($name, $arrAttributes);
|
338 |
if (($name) && ($id)) {
|
339 |
+
$labelAttribute = 'attribute_' . $id;
|
340 |
+
|
341 |
if ($name == 'price') {
|
342 |
$valPrice = Mage::helper('searchanise/ApiSe')->getPriceValueFromRequest($val);
|
343 |
if ($valPrice != '') {
|
344 |
$params['restrictBy']['price'] = $valPrice;
|
345 |
}
|
|
|
|
|
346 |
|
347 |
+
} elseif ($arrInputType[$id] == 'price') {
|
348 |
+
$params['union'][$labelAttribute]['min'] = Mage::helper('searchanise/ApiSe')->getCurLabelForPricesUsergroup();
|
349 |
$valPrice = Mage::helper('searchanise/ApiSe')->getPriceValueFromRequest($val);
|
350 |
|
351 |
if ($valPrice != '') {
|
352 |
+
$params['restrictBy'][$labelAttribute] = $valPrice;
|
353 |
}
|
354 |
|
355 |
} elseif (($arrInputType[$id] == 'text') || ($arrInputType[$id] == 'textarea')) {
|
357 |
$val = Mage::helper('searchanise/ApiSe')->escapingCharacters($val);
|
358 |
|
359 |
if ($val != '') {
|
360 |
+
$params['queryBy'][$labelAttribute] = $val;
|
361 |
}
|
362 |
}
|
363 |
|
366 |
($arrInputType[$id] == 'boolean')) {
|
367 |
if ($val) {
|
368 |
if (is_array($val)) {
|
369 |
+
$params['restrictBy'][$labelAttribute] = implode('|', $val);
|
370 |
} else {
|
371 |
+
$params['restrictBy'][$labelAttribute] = $val;
|
372 |
}
|
373 |
}
|
374 |
|
385 |
if ((in_array($type, self::$_searchaniseTypes)) && ($type == self::VIEW_TAG)) {
|
386 |
if ($data) {
|
387 |
// data = tag
|
388 |
+
$params['restrictBy']['tag_ids'] = $data->getId();
|
389 |
}
|
390 |
}
|
391 |
}
|
392 |
|
393 |
// need for other sort_by
|
394 |
if (!empty($arrAttributes)) {
|
395 |
+
if ($params['sortBy'] == 'price') {
|
396 |
+
// nothing
|
397 |
+
// defined in the '<cs:price>' field
|
398 |
+
|
399 |
+
} else {
|
400 |
+
$id = array_search($params['sortBy'], $arrAttributes);
|
401 |
+
if (!empty($id)) {
|
402 |
+
$params['sortBy'] = 'attribute_' . $id;
|
403 |
+
}
|
404 |
}
|
405 |
}
|
406 |
|
@@ -546,9 +546,7 @@ class Simtech_Searchanise_Model_Observer
|
|
546 |
$attribute = $observer->getEvent()->getAttribute();
|
547 |
|
548 |
if ($attribute && $attribute->getId()) {
|
549 |
-
$
|
550 |
-
$isFilterableInSearch = $attribute->getData('is_filterable_in_search');
|
551 |
-
$flFacet = ($isFilterable) || ($isFilterableInSearch);
|
552 |
|
553 |
$flFacetOld = null;
|
554 |
|
@@ -556,10 +554,7 @@ class Simtech_Searchanise_Model_Observer
|
|
556 |
->load($attribute->getId());
|
557 |
|
558 |
if (!empty($attributeOld)) {
|
559 |
-
$
|
560 |
-
$isFilterableInSearchOld = $attributeOld->getData('is_filterable_in_search');
|
561 |
-
|
562 |
-
$flFacetOld = ($isFilterableOld) || ($isFilterableInSearchOld);
|
563 |
}
|
564 |
|
565 |
if ($flFacet != $flFacetOld) {
|
@@ -597,9 +592,8 @@ class Simtech_Searchanise_Model_Observer
|
|
597 |
if ((!empty(self::$newAttributes)) &&
|
598 |
(array_key_exists($attributeCode, self::$newAttributes)) &&
|
599 |
(self::$newAttributes[$attributeCode])) {
|
600 |
-
$
|
601 |
-
|
602 |
-
$flFacet = ($isFilterable) || ($isFilterableInSearch);
|
603 |
|
604 |
if ($flFacet) {
|
605 |
Mage::getModel('searchanise/queue')->addAction(Simtech_Searchanise_Model_Queue::ACT_FACET_UPDATE, $attribute->getId());
|
@@ -621,9 +615,7 @@ class Simtech_Searchanise_Model_Observer
|
|
621 |
$attribute = $observer->getEvent()->getAttribute();
|
622 |
|
623 |
if ($attribute && $attribute->getId()) {
|
624 |
-
$
|
625 |
-
$isFilterableInSearch = $attribute->getData('is_filterable_in_search');
|
626 |
-
$flFacet = ($isFilterable) || ($isFilterableInSearch);
|
627 |
|
628 |
if ($flFacet) {
|
629 |
Mage::getModel('searchanise/queue')->addAction(Simtech_Searchanise_Model_Queue::ACT_FACET_DELETE, $attribute->getId());
|
546 |
$attribute = $observer->getEvent()->getAttribute();
|
547 |
|
548 |
if ($attribute && $attribute->getId()) {
|
549 |
+
$flFacet = Mage::helper('searchanise/ApiXML')->checkFacet($attribute);
|
|
|
|
|
550 |
|
551 |
$flFacetOld = null;
|
552 |
|
554 |
->load($attribute->getId());
|
555 |
|
556 |
if (!empty($attributeOld)) {
|
557 |
+
$flFacetOld = Mage::helper('searchanise/ApiXML')->checkFacet($attributeOld);
|
|
|
|
|
|
|
558 |
}
|
559 |
|
560 |
if ($flFacet != $flFacetOld) {
|
592 |
if ((!empty(self::$newAttributes)) &&
|
593 |
(array_key_exists($attributeCode, self::$newAttributes)) &&
|
594 |
(self::$newAttributes[$attributeCode])) {
|
595 |
+
$flFacet = Mage::helper('searchanise/ApiXML')->checkFacet($attribute);
|
596 |
+
|
|
|
597 |
|
598 |
if ($flFacet) {
|
599 |
Mage::getModel('searchanise/queue')->addAction(Simtech_Searchanise_Model_Queue::ACT_FACET_UPDATE, $attribute->getId());
|
615 |
$attribute = $observer->getEvent()->getAttribute();
|
616 |
|
617 |
if ($attribute && $attribute->getId()) {
|
618 |
+
$flFacet = Mage::helper('searchanise/ApiXML')->checkFacet($attribute);
|
|
|
|
|
619 |
|
620 |
if ($flFacet) {
|
621 |
Mage::getModel('searchanise/queue')->addAction(Simtech_Searchanise_Model_Queue::ACT_FACET_DELETE, $attribute->getId());
|
@@ -90,7 +90,22 @@ class Simtech_Searchanise_Model_Queue extends Mage_Core_Model_Abstract
|
|
90 |
|
91 |
return true;
|
92 |
}
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
public function getNextQueueArray($queueId = null, $flagIgnoreError = false)
|
95 |
{
|
96 |
$collection = $this->getCollection()
|
90 |
|
91 |
return true;
|
92 |
}
|
93 |
+
|
94 |
+
public function getTotalItems()
|
95 |
+
{
|
96 |
+
$total = 0;
|
97 |
+
|
98 |
+
$collection = $this->getCollection()
|
99 |
+
->setPageSize(0)
|
100 |
+
->load();
|
101 |
+
|
102 |
+
if ($collection) {
|
103 |
+
$total = count($collection);
|
104 |
+
}
|
105 |
+
|
106 |
+
return $total;
|
107 |
+
}
|
108 |
+
|
109 |
public function getNextQueueArray($queueId = null, $flagIgnoreError = false)
|
110 |
{
|
111 |
$collection = $this->getCollection()
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
* *
|
4 |
+
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
|
5 |
+
* *
|
6 |
+
* This is commercial software, only users who have purchased a valid *
|
7 |
+
* license and accept to the terms of the License Agreement can install *
|
8 |
+
* and use this program. *
|
9 |
+
* *
|
10 |
+
****************************************************************************
|
11 |
+
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
|
12 |
+
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
+
****************************************************************************/
|
14 |
+
|
15 |
+
// [v1.5]
|
16 |
+
class Simtech_Searchanise_Model_Resource_Eav_Mysql4_Layer_Filter_Attribute extends Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Attribute
|
17 |
+
{
|
18 |
+
/**
|
19 |
+
* Retrieve array with products counts per attribute option
|
20 |
+
*
|
21 |
+
* @param Mage_Catalog_Model_Layer_Filter_Attribute $filter
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function getCount($filter)
|
25 |
+
{
|
26 |
+
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
27 |
+
return parent::getCount($filter);
|
28 |
+
}
|
29 |
+
|
30 |
+
$collection = $filter->getLayer()->getProductCollection();
|
31 |
+
|
32 |
+
if ((!method_exists($collection, 'checkSearchaniseResult')) || (!$collection->checkSearchaniseResult()))
|
33 |
+
{
|
34 |
+
return parent::getCount($filter);
|
35 |
+
}
|
36 |
+
|
37 |
+
return $collection
|
38 |
+
->getSearchaniseRequest()
|
39 |
+
->getCountAttribute($filter);
|
40 |
+
}
|
41 |
+
}
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/***************************************************************************
|
3 |
+
* *
|
4 |
+
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
|
5 |
+
* *
|
6 |
+
* This is commercial software, only users who have purchased a valid *
|
7 |
+
* license and accept to the terms of the License Agreement can install *
|
8 |
+
* and use this program. *
|
9 |
+
* *
|
10 |
+
****************************************************************************
|
11 |
+
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
|
12 |
+
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
+
****************************************************************************/
|
14 |
+
|
15 |
+
// [v1.5]
|
16 |
+
class Simtech_Searchanise_Model_Resource_Eav_Mysql4_Layer_Filter_Price extends Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Price
|
17 |
+
{
|
18 |
+
public function getCount($filter, $range)
|
19 |
+
{
|
20 |
+
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
21 |
+
return parent::getCount($filter, $range);
|
22 |
+
}
|
23 |
+
|
24 |
+
$collection = $filter->getLayer()->getProductCollection();
|
25 |
+
|
26 |
+
if ((!method_exists($collection, 'checkSearchaniseResult')) || (!$collection->checkSearchaniseResult())) {
|
27 |
+
return parent::getCount($filter, $range);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $collection
|
31 |
+
->getSearchaniseRequest()
|
32 |
+
->getCountAttributePrice($filter, $range);
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Apply attribute filter to product collection
|
37 |
+
*
|
38 |
+
* @param Mage_Catalog_Model_Layer_Filter_Price $filter
|
39 |
+
* @param int $range
|
40 |
+
* @param int $index the range factor
|
41 |
+
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Attribute
|
42 |
+
*/
|
43 |
+
public function applyFilterToCollection($filter, $range, $index)
|
44 |
+
{
|
45 |
+
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
46 |
+
return parent::applyFilterToCollection($filter, $range, $index);
|
47 |
+
}
|
48 |
+
|
49 |
+
$collection = $filter->getLayer()->getProductCollection();
|
50 |
+
|
51 |
+
if ((!method_exists($collection, 'checkSearchaniseResult')) || (!$collection->checkSearchaniseResult())) {
|
52 |
+
return parent::applyFilterToCollection($filter, $range, $index);
|
53 |
+
}
|
54 |
+
// disable internal price filter
|
55 |
+
|
56 |
+
return $this;
|
57 |
+
}
|
58 |
+
}
|
@@ -12,6 +12,7 @@
|
|
12 |
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
****************************************************************************/
|
14 |
|
|
|
15 |
class Simtech_Searchanise_Model_Resource_Layer_Filter_Attribute extends Mage_Catalog_Model_Resource_Layer_Filter_Attribute
|
16 |
{
|
17 |
/**
|
12 |
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
****************************************************************************/
|
14 |
|
15 |
+
// [v1.6] [v1.7]
|
16 |
class Simtech_Searchanise_Model_Resource_Layer_Filter_Attribute extends Mage_Catalog_Model_Resource_Layer_Filter_Attribute
|
17 |
{
|
18 |
/**
|
@@ -12,6 +12,7 @@
|
|
12 |
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
****************************************************************************/
|
14 |
|
|
|
15 |
class Simtech_Searchanise_Model_Resource_Layer_Filter_Price extends Mage_Catalog_Model_Resource_Layer_Filter_Price
|
16 |
{
|
17 |
public function getCount($filter, $range)
|
12 |
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
13 |
****************************************************************************/
|
14 |
|
15 |
+
// [v1.6] [v1.7]
|
16 |
class Simtech_Searchanise_Model_Resource_Layer_Filter_Price extends Mage_Catalog_Model_Resource_Layer_Filter_Price
|
17 |
{
|
18 |
public function getCount($filter, $range)
|
@@ -31,13 +31,11 @@ class Simtech_Searchanise_InfoController extends Mage_Core_Controller_Front_Acti
|
|
31 |
if ((empty($parentPrivateKey)) ||
|
32 |
(Mage::helper('searchanise/ApiSe')->getParentPrivateKey() !== $parentPrivateKey)) {
|
33 |
$_options = Mage::helper('searchanise/ApiSe')->getAddonOptions();
|
34 |
-
$options = array(
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
if ($visual) {
|
42 |
Mage::helper('searchanise/ApiSe')->printR($options);
|
43 |
} else {
|
@@ -67,8 +65,18 @@ class Simtech_Searchanise_InfoController extends Mage_Core_Controller_Front_Acti
|
|
67 |
$options = array();
|
68 |
}
|
69 |
$options['next_queue'] = Mage::getModel('searchanise/queue')->getNextQueue();
|
|
|
|
|
70 |
$options['type_async'] = Mage::helper('searchanise/ApiSe')->getTypeAsync();
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
if ($visual) {
|
73 |
Mage::helper('searchanise/ApiSe')->printR($options);
|
74 |
} else {
|
31 |
if ((empty($parentPrivateKey)) ||
|
32 |
(Mage::helper('searchanise/ApiSe')->getParentPrivateKey() !== $parentPrivateKey)) {
|
33 |
$_options = Mage::helper('searchanise/ApiSe')->getAddonOptions();
|
34 |
+
$options = array(
|
35 |
+
'status' => $_options['addon_status'],
|
36 |
+
'api_key' => $_options['api_key'],
|
37 |
+
);
|
38 |
+
|
|
|
|
|
39 |
if ($visual) {
|
40 |
Mage::helper('searchanise/ApiSe')->printR($options);
|
41 |
} else {
|
65 |
$options = array();
|
66 |
}
|
67 |
$options['next_queue'] = Mage::getModel('searchanise/queue')->getNextQueue();
|
68 |
+
$options['total_items_in_queue'] = Mage::getModel('searchanise/queue')->getTotalItems();
|
69 |
+
|
70 |
$options['type_async'] = Mage::helper('searchanise/ApiSe')->getTypeAsync();
|
71 |
|
72 |
+
$options['max_execution_time'] = ini_get('max_execution_time');
|
73 |
+
@set_time_limit(0);
|
74 |
+
$options['max_execution_time_after'] = ini_get('max_execution_time');
|
75 |
+
|
76 |
+
$options['ignore_user_abort'] = ini_get('ignore_user_abort');
|
77 |
+
@ignore_user_abort(1);
|
78 |
+
$options['ignore_user_abort_after'] = ini_get('ignore_user_abort_after');
|
79 |
+
|
80 |
if ($visual) {
|
81 |
Mage::helper('searchanise/ApiSe')->printR($options);
|
82 |
} else {
|
@@ -15,8 +15,30 @@ require_once("Mage/CatalogSearch/controllers/ResultController.php");
|
|
15 |
|
16 |
class Simtech_Searchanise_ResultController extends Mage_CatalogSearch_ResultController
|
17 |
{
|
|
|
|
|
|
|
|
|
|
|
18 |
protected $_defaultToolbarBlock = 'catalog/product_list_toolbar';
|
19 |
protected $_defaultListBlock = 'catalog/product_list';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
/**
|
22 |
* Display search result
|
@@ -34,9 +56,9 @@ class Simtech_Searchanise_ResultController extends Mage_CatalogSearch_ResultCont
|
|
34 |
|
35 |
if ($query->getQueryText()) {
|
36 |
if (Mage::helper('searchanise')->checkEnabled()) {
|
37 |
-
$
|
38 |
-
|
39 |
-
Mage::helper('searchanise')->execute(Simtech_Searchanise_Helper_Data::TEXT_FIND, $this, $
|
40 |
}
|
41 |
}
|
42 |
|
15 |
|
16 |
class Simtech_Searchanise_ResultController extends Mage_CatalogSearch_ResultController
|
17 |
{
|
18 |
+
/**
|
19 |
+
* Default toolbar block name
|
20 |
+
*
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
protected $_defaultToolbarBlock = 'catalog/product_list_toolbar';
|
24 |
protected $_defaultListBlock = 'catalog/product_list';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Retrieve Toolbar block
|
28 |
+
*
|
29 |
+
* @return Mage_Catalog_Block_Product_List_Toolbar
|
30 |
+
*/
|
31 |
+
protected function _getToolbarBlock()
|
32 |
+
{
|
33 |
+
$blockName = 'product_list_toolbar';
|
34 |
+
if ($blockName) {
|
35 |
+
if ($block = $this->getLayout()->getBlock($blockName)) {
|
36 |
+
return $block;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
$block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
|
40 |
+
return $block;
|
41 |
+
}
|
42 |
|
43 |
/**
|
44 |
* Display search result
|
56 |
|
57 |
if ($query->getQueryText()) {
|
58 |
if (Mage::helper('searchanise')->checkEnabled()) {
|
59 |
+
$blockToolbar = $this->_getToolbarBlock();
|
60 |
+
|
61 |
+
Mage::helper('searchanise')->execute(Simtech_Searchanise_Helper_Data::TEXT_FIND, $this, $blockToolbar, $query);
|
62 |
}
|
63 |
}
|
64 |
|
@@ -15,7 +15,7 @@
|
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
-
<version>1.1.
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
@@ -138,6 +138,7 @@
|
|
138 |
<global>
|
139 |
<models>
|
140 |
<!-- OVERRIDE CATALOG MODEL -->
|
|
|
141 |
<catalog>
|
142 |
<rewrite>
|
143 |
<layer>Simtech_Searchanise_Model_Layer</layer>
|
@@ -145,8 +146,12 @@
|
|
145 |
<layer_filter_price>Simtech_Searchanise_Model_Layer_Filter_Price</layer_filter_price>
|
146 |
</rewrite>
|
147 |
</catalog>
|
|
|
148 |
<!-- END -->
|
|
|
149 |
<!-- <OVERRIDE CATALOG RESOURCE> -->
|
|
|
|
|
150 |
<catalog_resource>
|
151 |
<rewrite>
|
152 |
<product_collection>Simtech_Searchanise_Model_Resource_Product_Collection</product_collection>
|
@@ -154,6 +159,17 @@
|
|
154 |
<layer_filter_price>Simtech_Searchanise_Model_Resource_Layer_Filter_Price</layer_filter_price>
|
155 |
</rewrite>
|
156 |
</catalog_resource>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
<!-- [v1.5] -->
|
158 |
<catalog_resource_eav_mysql4>
|
159 |
<rewrite>
|
@@ -163,15 +179,18 @@
|
|
163 |
<!-- [/v1.5] -->
|
164 |
<!-- END -->
|
165 |
<!-- OVERRIDE CATALOGSEARCH MODEL -->
|
|
|
166 |
<catalogsearch>
|
167 |
<rewrite>
|
168 |
<layer>Simtech_Searchanise_Model_LayerCatalogSearch</layer>
|
169 |
<advanced>Simtech_Searchanise_Model_Advanced</advanced>
|
170 |
</rewrite>
|
171 |
</catalogsearch>
|
|
|
172 |
<!-- END -->
|
173 |
|
174 |
<!-- <OVERRIDE CATALOGSEARCH RESOURCE> -->
|
|
|
175 |
<!-- [v1.6] [v1.7] -->
|
176 |
<catalogsearch_resource>
|
177 |
<rewrite>
|
@@ -188,6 +207,7 @@
|
|
188 |
</rewrite>
|
189 |
</catalogsearch_mysql4>
|
190 |
<!-- [/v1.5] -->
|
|
|
191 |
<!-- END -->
|
192 |
|
193 |
<!-- OVERRIDE TAG MODEL -->
|
@@ -537,7 +557,7 @@
|
|
537 |
<config>
|
538 |
<server_version>1.2</server_version>
|
539 |
<search_timeout>3</search_timeout>
|
540 |
-
<request_timeout>
|
541 |
<ajax_async_timeout>1</ajax_async_timeout>
|
542 |
<products_per_pass>200</products_per_pass>
|
543 |
<max_error_count>25</max_error_count>
|
@@ -549,6 +569,7 @@
|
|
549 |
<input_id_search>search</input_id_search>
|
550 |
<!-- '2' - ajax -->
|
551 |
<type_async>2</type_async>
|
|
|
552 |
</config>
|
553 |
</searchanise>
|
554 |
</default>
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
+
<version>1.1.3</version>
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
138 |
<global>
|
139 |
<models>
|
140 |
<!-- OVERRIDE CATALOG MODEL -->
|
141 |
+
<!-- [disabled_searchanise_search] -->
|
142 |
<catalog>
|
143 |
<rewrite>
|
144 |
<layer>Simtech_Searchanise_Model_Layer</layer>
|
146 |
<layer_filter_price>Simtech_Searchanise_Model_Layer_Filter_Price</layer_filter_price>
|
147 |
</rewrite>
|
148 |
</catalog>
|
149 |
+
<!-- [/disabled_searchanise_search] -->
|
150 |
<!-- END -->
|
151 |
+
|
152 |
<!-- <OVERRIDE CATALOG RESOURCE> -->
|
153 |
+
<!-- [disabled_searchanise_search] -->
|
154 |
+
<!-- [v1.6] [v1.7] -->
|
155 |
<catalog_resource>
|
156 |
<rewrite>
|
157 |
<product_collection>Simtech_Searchanise_Model_Resource_Product_Collection</product_collection>
|
159 |
<layer_filter_price>Simtech_Searchanise_Model_Resource_Layer_Filter_Price</layer_filter_price>
|
160 |
</rewrite>
|
161 |
</catalog_resource>
|
162 |
+
<!-- [/v1.6] [/v1.7] -->
|
163 |
+
<!-- [v1.5] -->
|
164 |
+
<catalog_resource_eav_mysql4>
|
165 |
+
<rewrite>
|
166 |
+
<layer_filter_attribute>Simtech_Searchanise_Model_Resource_Eav_Mysql4_Layer_Filter_Attribute</layer_filter_attribute>
|
167 |
+
<layer_filter_price>Simtech_Searchanise_Model_Resource_Eav_Mysql4_Layer_Filter_Price</layer_filter_price>
|
168 |
+
</rewrite>
|
169 |
+
</catalog_resource_eav_mysql4>
|
170 |
+
<!-- [/v1.5] -->
|
171 |
+
<!-- [/disabled_searchanise_search] -->
|
172 |
+
|
173 |
<!-- [v1.5] -->
|
174 |
<catalog_resource_eav_mysql4>
|
175 |
<rewrite>
|
179 |
<!-- [/v1.5] -->
|
180 |
<!-- END -->
|
181 |
<!-- OVERRIDE CATALOGSEARCH MODEL -->
|
182 |
+
<!-- [disabled_searchanise_search] -->
|
183 |
<catalogsearch>
|
184 |
<rewrite>
|
185 |
<layer>Simtech_Searchanise_Model_LayerCatalogSearch</layer>
|
186 |
<advanced>Simtech_Searchanise_Model_Advanced</advanced>
|
187 |
</rewrite>
|
188 |
</catalogsearch>
|
189 |
+
<!-- [/disabled_searchanise_search] -->
|
190 |
<!-- END -->
|
191 |
|
192 |
<!-- <OVERRIDE CATALOGSEARCH RESOURCE> -->
|
193 |
+
<!-- [disabled_searchanise_search] -->
|
194 |
<!-- [v1.6] [v1.7] -->
|
195 |
<catalogsearch_resource>
|
196 |
<rewrite>
|
207 |
</rewrite>
|
208 |
</catalogsearch_mysql4>
|
209 |
<!-- [/v1.5] -->
|
210 |
+
<!-- [/disabled_searchanise_search] -->
|
211 |
<!-- END -->
|
212 |
|
213 |
<!-- OVERRIDE TAG MODEL -->
|
557 |
<config>
|
558 |
<server_version>1.2</server_version>
|
559 |
<search_timeout>3</search_timeout>
|
560 |
+
<request_timeout>10</request_timeout>
|
561 |
<ajax_async_timeout>1</ajax_async_timeout>
|
562 |
<products_per_pass>200</products_per_pass>
|
563 |
<max_error_count>25</max_error_count>
|
569 |
<input_id_search>search</input_id_search>
|
570 |
<!-- '2' - ajax -->
|
571 |
<type_async>2</type_async>
|
572 |
+
<enabled_searchanise_search>1</enabled_searchanise_search>
|
573 |
</config>
|
574 |
</searchanise>
|
575 |
</default>
|
@@ -0,0 +1,585 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/***************************************************************************
|
4 |
+
* *
|
5 |
+
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
|
6 |
+
* *
|
7 |
+
* This is commercial software, only users who have purchased a valid *
|
8 |
+
* license and accept to the terms of the License Agreement can install *
|
9 |
+
* and use this program. *
|
10 |
+
* *
|
11 |
+
****************************************************************************
|
12 |
+
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
|
13 |
+
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
|
14 |
+
****************************************************************************/ -->
|
15 |
+
<config>
|
16 |
+
<modules>
|
17 |
+
<Simtech_Searchanise>
|
18 |
+
<version>1.1.3</version>
|
19 |
+
</Simtech_Searchanise>
|
20 |
+
</modules>
|
21 |
+
<frontend>
|
22 |
+
<routers>
|
23 |
+
<!-- OVERRIDE CATALOG CONTOLLERS -->
|
24 |
+
<catalog>
|
25 |
+
<args>
|
26 |
+
<modules>
|
27 |
+
<Simtech_Searchanise before="Mage_Catalog">Simtech_Searchanise</Simtech_Searchanise>
|
28 |
+
</modules>
|
29 |
+
</args>
|
30 |
+
</catalog>
|
31 |
+
<!-- OVERRIDE CATALOGSEARCH CONTOLLERS -->
|
32 |
+
<catalogsearch>
|
33 |
+
<args>
|
34 |
+
<modules>
|
35 |
+
<Simtech_Searchanise before="Mage_CatalogSearch">Simtech_Searchanise</Simtech_Searchanise>
|
36 |
+
</modules>
|
37 |
+
</args>
|
38 |
+
</catalogsearch>
|
39 |
+
<!-- OVERRIDE TAG CONTOLLERS -->
|
40 |
+
<tag>
|
41 |
+
<args>
|
42 |
+
<modules>
|
43 |
+
<Simtech_Searchanise before="Mage_Tag">Simtech_Searchanise</Simtech_Searchanise>
|
44 |
+
</modules>
|
45 |
+
</args>
|
46 |
+
</tag>
|
47 |
+
<!-- END -->
|
48 |
+
<searchanise>
|
49 |
+
<use>standard</use>
|
50 |
+
<args>
|
51 |
+
<module>Simtech_Searchanise</module>
|
52 |
+
<frontName>searchanise</frontName>
|
53 |
+
</args>
|
54 |
+
</searchanise>
|
55 |
+
</routers>
|
56 |
+
<translate>
|
57 |
+
<modules>
|
58 |
+
<Simtech_Searchanise>
|
59 |
+
<files>
|
60 |
+
<default>Simtech_Searchanise.csv</default>
|
61 |
+
</files>
|
62 |
+
</Simtech_Searchanise>
|
63 |
+
</modules>
|
64 |
+
</translate>
|
65 |
+
<layout>
|
66 |
+
<updates>
|
67 |
+
<searchanise>
|
68 |
+
<file>searchanise.xml</file>
|
69 |
+
</searchanise>
|
70 |
+
</updates>
|
71 |
+
</layout>
|
72 |
+
</frontend>
|
73 |
+
<admin>
|
74 |
+
<routers>
|
75 |
+
<searchanise>
|
76 |
+
<use>admin</use>
|
77 |
+
<args>
|
78 |
+
<module>Simtech_Searchanise</module>
|
79 |
+
<frontName>searchanise</frontName>
|
80 |
+
</args>
|
81 |
+
</searchanise>
|
82 |
+
</routers>
|
83 |
+
</admin>
|
84 |
+
<adminhtml>
|
85 |
+
<menu>
|
86 |
+
<catalog>
|
87 |
+
<children>
|
88 |
+
<searchanise translate="title" module="searchanise">
|
89 |
+
<title>Searchanise</title>
|
90 |
+
<action>searchanise/index/index</action>
|
91 |
+
</searchanise>
|
92 |
+
</children>
|
93 |
+
</catalog>
|
94 |
+
</menu>
|
95 |
+
<acl>
|
96 |
+
<resources>
|
97 |
+
<all>
|
98 |
+
<title>Allow Everything</title>
|
99 |
+
</all>
|
100 |
+
<admin>
|
101 |
+
<children>
|
102 |
+
<Simtech_Searchanise>
|
103 |
+
<title>Searchanise Module</title>
|
104 |
+
<sort_order>1</sort_order>
|
105 |
+
</Simtech_Searchanise>
|
106 |
+
<system>
|
107 |
+
<children>
|
108 |
+
<config>
|
109 |
+
<children>
|
110 |
+
<searchanise translate="title" module="searchanise">
|
111 |
+
<title>Searchanise Settings</title>
|
112 |
+
</searchanise>
|
113 |
+
</children>
|
114 |
+
</config>
|
115 |
+
</children>
|
116 |
+
</system>
|
117 |
+
</children>
|
118 |
+
</admin>
|
119 |
+
</resources>
|
120 |
+
</acl>
|
121 |
+
<translate>
|
122 |
+
<modules>
|
123 |
+
<Simtech_Searchanise>
|
124 |
+
<files>
|
125 |
+
<default>Simtech_Searchanise.csv</default>
|
126 |
+
</files>
|
127 |
+
</Simtech_Searchanise>
|
128 |
+
</modules>
|
129 |
+
</translate>
|
130 |
+
<layout>
|
131 |
+
<updates>
|
132 |
+
<searchanise>
|
133 |
+
<file>searchanise.xml</file>
|
134 |
+
</searchanise>
|
135 |
+
</updates>
|
136 |
+
</layout>
|
137 |
+
</adminhtml>
|
138 |
+
<global>
|
139 |
+
<models>
|
140 |
+
<!-- OVERRIDE CATALOG MODEL -->
|
141 |
+
<!-- [disabled_searchanise_search] -->
|
142 |
+
<!-- <catalog>
|
143 |
+
<rewrite>
|
144 |
+
<layer>Simtech_Searchanise_Model_Layer</layer>
|
145 |
+
<layer_filter_category>Simtech_Searchanise_Model_Layer_Filter_Category</layer_filter_category>
|
146 |
+
<layer_filter_price>Simtech_Searchanise_Model_Layer_Filter_Price</layer_filter_price>
|
147 |
+
</rewrite>
|
148 |
+
</catalog> -->
|
149 |
+
<!-- [/disabled_searchanise_search] -->
|
150 |
+
<!-- END -->
|
151 |
+
|
152 |
+
<!-- <OVERRIDE CATALOG RESOURCE> -->
|
153 |
+
<!-- [disabled_searchanise_search] -->
|
154 |
+
<!-- [v1.6] [v1.7] -->
|
155 |
+
<!-- <catalog_resource>
|
156 |
+
<rewrite>
|
157 |
+
<product_collection>Simtech_Searchanise_Model_Resource_Product_Collection</product_collection>
|
158 |
+
<layer_filter_attribute>Simtech_Searchanise_Model_Resource_Layer_Filter_Attribute</layer_filter_attribute>
|
159 |
+
<layer_filter_price>Simtech_Searchanise_Model_Resource_Layer_Filter_Price</layer_filter_price>
|
160 |
+
</rewrite>
|
161 |
+
</catalog_resource> -->
|
162 |
+
<!-- [/v1.6] [/v1.7] -->
|
163 |
+
<!-- [v1.5] -->
|
164 |
+
<!-- <catalog_resource_eav_mysql4>
|
165 |
+
<rewrite>
|
166 |
+
<layer_filter_attribute>Simtech_Searchanise_Model_Resource_Eav_Mysql4_Layer_Filter_Attribute</layer_filter_attribute>
|
167 |
+
<layer_filter_price>Simtech_Searchanise_Model_Resource_Eav_Mysql4_Layer_Filter_Price</layer_filter_price>
|
168 |
+
</rewrite>
|
169 |
+
</catalog_resource_eav_mysql4> -->
|
170 |
+
<!-- [/v1.5] -->
|
171 |
+
<!-- [/disabled_searchanise_search] -->
|
172 |
+
|
173 |
+
<!-- [v1.5] -->
|
174 |
+
<catalog_resource_eav_mysql4>
|
175 |
+
<rewrite>
|
176 |
+
<product_action>Simtech_Searchanise_Model_Resource_Eav_Mysql4_Product_Action</product_action>
|
177 |
+
</rewrite>
|
178 |
+
</catalog_resource_eav_mysql4>
|
179 |
+
<!-- [/v1.5] -->
|
180 |
+
<!-- END -->
|
181 |
+
<!-- OVERRIDE CATALOGSEARCH MODEL -->
|
182 |
+
<!-- [disabled_searchanise_search] -->
|
183 |
+
<!-- <catalogsearch>
|
184 |
+
<rewrite>
|
185 |
+
<layer>Simtech_Searchanise_Model_LayerCatalogSearch</layer>
|
186 |
+
<advanced>Simtech_Searchanise_Model_Advanced</advanced>
|
187 |
+
</rewrite>
|
188 |
+
</catalogsearch> -->
|
189 |
+
<!-- [/disabled_searchanise_search] -->
|
190 |
+
<!-- END -->
|
191 |
+
|
192 |
+
<!-- <OVERRIDE CATALOGSEARCH RESOURCE> -->
|
193 |
+
<!-- [disabled_searchanise_search] -->
|
194 |
+
<!-- [v1.6] [v1.7] -->
|
195 |
+
<!-- <catalogsearch_resource>
|
196 |
+
<rewrite>
|
197 |
+
<fulltext_collection>Simtech_Searchanise_Model_Resource_Fulltext_Collection</fulltext_collection>
|
198 |
+
<advanced_collection>Simtech_Searchanise_Model_Resource_Advanced_Collection</advanced_collection>
|
199 |
+
</rewrite>
|
200 |
+
</catalogsearch_resource> -->
|
201 |
+
<!-- [/v1.6] [/v1.7] -->
|
202 |
+
<!-- [v1.5] -->
|
203 |
+
<!-- <catalogsearch_mysql4>
|
204 |
+
<rewrite>
|
205 |
+
<fulltext_collection>Simtech_Searchanise_Model_Mysql4_Fulltext_Collection</fulltext_collection>
|
206 |
+
<advanced_collection>Simtech_Searchanise_Model_Mysql4_Advanced_Collection</advanced_collection>
|
207 |
+
</rewrite>
|
208 |
+
</catalogsearch_mysql4> -->
|
209 |
+
<!-- [/v1.5] -->
|
210 |
+
<!-- [/disabled_searchanise_search] -->
|
211 |
+
<!-- END -->
|
212 |
+
|
213 |
+
<!-- OVERRIDE TAG MODEL -->
|
214 |
+
<tag>
|
215 |
+
<rewrite>
|
216 |
+
<tag_relation>Simtech_Searchanise_Model_Tag_Relation</tag_relation>
|
217 |
+
</rewrite>
|
218 |
+
</tag>
|
219 |
+
<!-- END -->
|
220 |
+
|
221 |
+
<!-- OVERRIDE TAG RESOURCE -->
|
222 |
+
<!-- [v1.6] [v1.7] -->
|
223 |
+
<tag_resource>
|
224 |
+
<rewrite>
|
225 |
+
<product_collection>Simtech_Searchanise_Model_Resource_Product_CollectionTag</product_collection>
|
226 |
+
</rewrite>
|
227 |
+
</tag_resource>
|
228 |
+
<!-- [/v1.6] [/v1.7] -->
|
229 |
+
<!-- [v1.5]-->
|
230 |
+
<tag_mysql4>
|
231 |
+
<rewrite>
|
232 |
+
<product_collection>Simtech_Searchanise_Model_Mysql4_Product_CollectionTag</product_collection>
|
233 |
+
</rewrite>
|
234 |
+
</tag_mysql4>
|
235 |
+
<!-- [/v1.5]-->
|
236 |
+
<!-- END -->
|
237 |
+
|
238 |
+
<!-- OVERRIDE IMPORTEXPORT MODEL -->
|
239 |
+
<importexport>
|
240 |
+
<rewrite>
|
241 |
+
<import_entity_product>Simtech_Searchanise_Model_Import_Entity_Product</import_entity_product>
|
242 |
+
</rewrite>
|
243 |
+
</importexport>
|
244 |
+
<!-- END -->
|
245 |
+
<!-- <OVERRIDE CORE RESOURCE> -->
|
246 |
+
<!-- [v1.6] [v1.7] -->
|
247 |
+
<core_resource>
|
248 |
+
<rewrite>
|
249 |
+
<store>Simtech_Searchanise_Model_Resource_Store</store>
|
250 |
+
</rewrite>
|
251 |
+
</core_resource>
|
252 |
+
<!-- [/v1.6] [/v1.7] -->
|
253 |
+
<!-- [v1.5] -->
|
254 |
+
<core_mysql4>
|
255 |
+
<rewrite>
|
256 |
+
<store>Simtech_Searchanise_Model_Mysql4_Store</store>
|
257 |
+
</rewrite>
|
258 |
+
</core_mysql4>
|
259 |
+
<!-- [/v1.5] -->
|
260 |
+
<!-- END -->
|
261 |
+
<!-- OVERRIDE ADMINHTML MODEL -->
|
262 |
+
<adminhtml>
|
263 |
+
<rewrite>
|
264 |
+
<config_data>Simtech_Searchanise_Model_Config_Data</config_data>
|
265 |
+
<layer_filter_category>Simtech_Searchanise_Model_Layer_Filter_Category</layer_filter_category>
|
266 |
+
</rewrite>
|
267 |
+
</adminhtml>
|
268 |
+
<!-- END -->
|
269 |
+
<searchanise>
|
270 |
+
<class>Simtech_Searchanise_Model</class>
|
271 |
+
<resourceModel>searchanise_mysql4</resourceModel>
|
272 |
+
</searchanise>
|
273 |
+
<searchanise_mysql4>
|
274 |
+
<class>Simtech_Searchanise_Model_Mysql4</class>
|
275 |
+
<entities>
|
276 |
+
<queue>
|
277 |
+
<table>searchanise_queue</table>
|
278 |
+
</queue>
|
279 |
+
<config>
|
280 |
+
<table>searchanise_config</table>
|
281 |
+
</config>
|
282 |
+
</entities>
|
283 |
+
</searchanise_mysql4>
|
284 |
+
</models>
|
285 |
+
<resources>
|
286 |
+
<searchanise_setup>
|
287 |
+
<setup>
|
288 |
+
<module>Simtech_Searchanise</module>
|
289 |
+
<!--<class>Simtech_Searchanise_Model_Entity_Setup</class>-->
|
290 |
+
</setup>
|
291 |
+
<connection>
|
292 |
+
<use>core_setup</use>
|
293 |
+
</connection>
|
294 |
+
</searchanise_setup>
|
295 |
+
<searchanise_write>
|
296 |
+
<connection>
|
297 |
+
<use>core_write</use>
|
298 |
+
</connection>
|
299 |
+
</searchanise_write>
|
300 |
+
<searchanise_read>
|
301 |
+
<connection>
|
302 |
+
<use>core_read</use>
|
303 |
+
</connection>
|
304 |
+
</searchanise_read>
|
305 |
+
</resources>
|
306 |
+
<helpers>
|
307 |
+
<searchanise>
|
308 |
+
<class>Simtech_Searchanise_Helper</class>
|
309 |
+
</searchanise>
|
310 |
+
</helpers>
|
311 |
+
<events>
|
312 |
+
<!-- SYSTEM -->
|
313 |
+
<clean_catalog_images_cache_after>
|
314 |
+
<observers>
|
315 |
+
<rating>
|
316 |
+
<class>searchanise/observer</class>
|
317 |
+
<method>cleanCatalogImagesCacheAfter</method>
|
318 |
+
</rating>
|
319 |
+
</observers>
|
320 |
+
</clean_catalog_images_cache_after>
|
321 |
+
<!-- END SYSTEM -->
|
322 |
+
<!-- CATALOG -->
|
323 |
+
<!-- products -->
|
324 |
+
<catalog_product_save_before>
|
325 |
+
<observers>
|
326 |
+
<rating>
|
327 |
+
<class>searchanise/observer</class>
|
328 |
+
<method>catalogProductSaveBefore</method>
|
329 |
+
</rating>
|
330 |
+
</observers>
|
331 |
+
</catalog_product_save_before>
|
332 |
+
<catalog_product_save_after>
|
333 |
+
<observers>
|
334 |
+
<rating>
|
335 |
+
<class>searchanise/observer</class>
|
336 |
+
<method>catalogProductSaveAfter</method>
|
337 |
+
</rating>
|
338 |
+
</observers>
|
339 |
+
</catalog_product_save_after>
|
340 |
+
<catalog_product_delete_before>
|
341 |
+
<observers>
|
342 |
+
<rating>
|
343 |
+
<class>searchanise/observer</class>
|
344 |
+
<method>catalogProductDeleteBefore</method>
|
345 |
+
</rating>
|
346 |
+
</observers>
|
347 |
+
</catalog_product_delete_before>
|
348 |
+
<!-- [v1.6] [v1.7] -->
|
349 |
+
<catalog_product_attribute_update_before>
|
350 |
+
<observers>
|
351 |
+
<rating>
|
352 |
+
<class>searchanise/observer</class>
|
353 |
+
<method>catalogProductAttributeUpdateBefore</method>
|
354 |
+
</rating>
|
355 |
+
</observers>
|
356 |
+
</catalog_product_attribute_update_before>
|
357 |
+
<!-- [/v1.6] [/v1.7] -->
|
358 |
+
<!-- [v1.5] -->
|
359 |
+
<searchanise_product_attribute_update_before>
|
360 |
+
<observers>
|
361 |
+
<rating>
|
362 |
+
<class>searchanise/observer</class>
|
363 |
+
<method>catalogProductAttributeUpdateBefore</method>
|
364 |
+
</rating>
|
365 |
+
</observers>
|
366 |
+
</searchanise_product_attribute_update_before>
|
367 |
+
<!-- [/v1.5] -->
|
368 |
+
<catalog_product_website_update_before>
|
369 |
+
<observers>
|
370 |
+
<rating>
|
371 |
+
<class>searchanise/observer</class>
|
372 |
+
<method>catalogProductWebsiteUpdateBefore</method>
|
373 |
+
</rating>
|
374 |
+
</observers>
|
375 |
+
</catalog_product_website_update_before>
|
376 |
+
<catalog_category_tree_move_after>
|
377 |
+
<observers>
|
378 |
+
<rating>
|
379 |
+
<class>searchanise/observer</class>
|
380 |
+
<method>catalogCategoryTreeMoveAfter</method>
|
381 |
+
</rating>
|
382 |
+
</observers>
|
383 |
+
</catalog_category_tree_move_after>
|
384 |
+
<!-- facets-->
|
385 |
+
<catalog_entity_attribute_save_before>
|
386 |
+
<observers>
|
387 |
+
<rating>
|
388 |
+
<class>searchanise/observer</class>
|
389 |
+
<method>catalogEntityAttributeSaveBefore</method>
|
390 |
+
</rating>
|
391 |
+
</observers>
|
392 |
+
</catalog_entity_attribute_save_before>
|
393 |
+
<catalog_entity_attribute_save_after>
|
394 |
+
<observers>
|
395 |
+
<rating>
|
396 |
+
<class>searchanise/observer</class>
|
397 |
+
<method>catalogEntityAttributeSaveAfter</method>
|
398 |
+
</rating>
|
399 |
+
</observers>
|
400 |
+
</catalog_entity_attribute_save_after>
|
401 |
+
<catalog_entity_attribute_delete_after>
|
402 |
+
<observers>
|
403 |
+
<rating>
|
404 |
+
<class>searchanise/observer</class>
|
405 |
+
<method>catalogEntityAttributeDeleteAfter</method>
|
406 |
+
</rating>
|
407 |
+
</observers>
|
408 |
+
</catalog_entity_attribute_delete_after>
|
409 |
+
<!-- facet-categories -->
|
410 |
+
<catalog_category_save_before>
|
411 |
+
<observers>
|
412 |
+
<rating>
|
413 |
+
<class>searchanise/observer</class>
|
414 |
+
<method>catalogCategorySaveBefore</method>
|
415 |
+
</rating>
|
416 |
+
</observers>
|
417 |
+
</catalog_category_save_before>
|
418 |
+
<catalog_category_save_after>
|
419 |
+
<observers>
|
420 |
+
<rating>
|
421 |
+
<class>searchanise/observer</class>
|
422 |
+
<method>catalogCategorySaveAfter</method>
|
423 |
+
</rating>
|
424 |
+
</observers>
|
425 |
+
</catalog_category_save_after>
|
426 |
+
<!-- END CATALOG-->
|
427 |
+
<!-- SALES -->
|
428 |
+
<!-- products -->
|
429 |
+
<sales_order_save_after>
|
430 |
+
<observers>
|
431 |
+
<rating>
|
432 |
+
<class>searchanise/observer</class>
|
433 |
+
<method>salesOrderSaveAfter</method>
|
434 |
+
</rating>
|
435 |
+
</observers>
|
436 |
+
</sales_order_save_after>
|
437 |
+
<!-- END SALES -->
|
438 |
+
<!-- IMPORTEXPORT -->
|
439 |
+
<!-- products -->
|
440 |
+
<searchanise_import_save_product_entity_after>
|
441 |
+
<observers>
|
442 |
+
<rating>
|
443 |
+
<class>searchanise/observer</class>
|
444 |
+
<method>searchaniseImportSaveProductEntityAfter</method>
|
445 |
+
</rating>
|
446 |
+
</observers>
|
447 |
+
</searchanise_import_save_product_entity_after>
|
448 |
+
<searchanise_import_delete_product_entity_after>
|
449 |
+
<observers>
|
450 |
+
<rating>
|
451 |
+
<class>searchanise/observer</class>
|
452 |
+
<method>searchaniseImportDeleteProductEntityAfter</method>
|
453 |
+
</rating>
|
454 |
+
</observers>
|
455 |
+
</searchanise_import_delete_product_entity_after>
|
456 |
+
<!-- END IMPORTEXPORT -->
|
457 |
+
<!-- CORE -->
|
458 |
+
<!-- store -->
|
459 |
+
<searchanise_core_save_store_before>
|
460 |
+
<observers>
|
461 |
+
<rating>
|
462 |
+
<class>searchanise/observer</class>
|
463 |
+
<method>searchaniseCoreSaveStoreBefore</method>
|
464 |
+
</rating>
|
465 |
+
</observers>
|
466 |
+
</searchanise_core_save_store_before>
|
467 |
+
<searchanise_core_save_store_after>
|
468 |
+
<observers>
|
469 |
+
<rating>
|
470 |
+
<class>searchanise/observer</class>
|
471 |
+
<method>searchaniseCoreSaveStoreAfter</method>
|
472 |
+
</rating>
|
473 |
+
</observers>
|
474 |
+
</searchanise_core_save_store_after>
|
475 |
+
<searchanise_core_delete_store_after>
|
476 |
+
<observers>
|
477 |
+
<rating>
|
478 |
+
<class>searchanise/observer</class>
|
479 |
+
<method>searchaniseCoreDeleteStoreAfter</method>
|
480 |
+
</rating>
|
481 |
+
</observers>
|
482 |
+
</searchanise_core_delete_store_after>
|
483 |
+
<!-- ADMINHTML-->
|
484 |
+
<searchanise_adminhtml_config_data_save_before>
|
485 |
+
<observers>
|
486 |
+
<rating>
|
487 |
+
<class>searchanise/observer</class>
|
488 |
+
<method>searchaniseAdminhtmlConfigDataSaveBefore</method>
|
489 |
+
</rating>
|
490 |
+
</observers>
|
491 |
+
</searchanise_adminhtml_config_data_save_before>
|
492 |
+
<searchanise_adminhtml_config_data_save_after>
|
493 |
+
<observers>
|
494 |
+
<rating>
|
495 |
+
<class>searchanise/observer</class>
|
496 |
+
<method>searchaniseAdminhtmlConfigDataSaveAfter</method>
|
497 |
+
</rating>
|
498 |
+
</observers>
|
499 |
+
</searchanise_adminhtml_config_data_save_after>
|
500 |
+
<!-- END ADMINHTML -->
|
501 |
+
<!-- TAG -->
|
502 |
+
<!-- tag -->
|
503 |
+
<tag_save_after>
|
504 |
+
<observers>
|
505 |
+
<rating>
|
506 |
+
<class>searchanise/observer</class>
|
507 |
+
<method>tagSaveAfter</method>
|
508 |
+
</rating>
|
509 |
+
</observers>
|
510 |
+
</tag_save_after>
|
511 |
+
<tag_delete_before>
|
512 |
+
<observers>
|
513 |
+
<rating>
|
514 |
+
<class>searchanise/observer</class>
|
515 |
+
<method>tagDeleteBefore</method>
|
516 |
+
</rating>
|
517 |
+
</observers>
|
518 |
+
</tag_delete_before>
|
519 |
+
<!-- tag_relation -->
|
520 |
+
<searchanise_tag_relation_save_after>
|
521 |
+
<observers>
|
522 |
+
<rating>
|
523 |
+
<class>searchanise/observer</class>
|
524 |
+
<method>searchaniseTagRelationSaveAfter</method>
|
525 |
+
</rating>
|
526 |
+
</observers>
|
527 |
+
</searchanise_tag_relation_save_after>
|
528 |
+
<!-- END TAG -->
|
529 |
+
</events>
|
530 |
+
<blocks>
|
531 |
+
<!-- OVERRIDE BLOCK CATALOG -->
|
532 |
+
<catalog>
|
533 |
+
<rewrite>
|
534 |
+
<product_list_toolbar>Simtech_Searchanise_Block_Product_List_Toolbar</product_list_toolbar>
|
535 |
+
</rewrite>
|
536 |
+
</catalog>
|
537 |
+
<!-- END -->
|
538 |
+
<!-- OVERRIDE BLOCK CATALOGSEARCH -->
|
539 |
+
<catalogsearch>
|
540 |
+
<rewrite>
|
541 |
+
<result>Simtech_Searchanise_Block_Result</result>
|
542 |
+
<autocomplete>Simtech_Searchanise_Block_Autocomplete</autocomplete>
|
543 |
+
</rewrite>
|
544 |
+
</catalogsearch>
|
545 |
+
<!-- END -->
|
546 |
+
<!-- OVERRIDE BLOCK TAG -->
|
547 |
+
<tag>
|
548 |
+
<rewrite>
|
549 |
+
<product_result>Simtech_Searchanise_Block_Product_Result</product_result>
|
550 |
+
</rewrite>
|
551 |
+
</tag>
|
552 |
+
<!-- END -->
|
553 |
+
</blocks>
|
554 |
+
</global>
|
555 |
+
<default>
|
556 |
+
<searchanise>
|
557 |
+
<config>
|
558 |
+
<server_version>1.2</server_version>
|
559 |
+
<search_timeout>3</search_timeout>
|
560 |
+
<request_timeout>10</request_timeout>
|
561 |
+
<ajax_async_timeout>1</ajax_async_timeout>
|
562 |
+
<products_per_pass>200</products_per_pass>
|
563 |
+
<max_error_count>25</max_error_count>
|
564 |
+
<max_processing_thread>3</max_processing_thread>
|
565 |
+
<max_processing_time>720</max_processing_time>
|
566 |
+
<max_search_request_length>8000</max_search_request_length>
|
567 |
+
<service_url>http://www.searchanise.com</service_url>
|
568 |
+
<cron_enabled>1</cron_enabled>
|
569 |
+
<input_id_search>search</input_id_search>
|
570 |
+
<!-- '2' - ajax -->
|
571 |
+
<type_async>2</type_async>
|
572 |
+
<enabled_searchanise_search>1</enabled_searchanise_search>
|
573 |
+
</config>
|
574 |
+
</searchanise>
|
575 |
+
</default>
|
576 |
+
<crontab>
|
577 |
+
<jobs>
|
578 |
+
<cronjob_name>
|
579 |
+
<!-- runs every 1 minutes as below. Change to (0 1 * * *) to run every night at 1am -->
|
580 |
+
<schedule><cron_expr>*/1 * * * *</cron_expr></schedule>
|
581 |
+
<run><model>searchanise/observer::autoSync</model></run>
|
582 |
+
</cronjob_name>
|
583 |
+
</jobs>
|
584 |
+
</crontab>
|
585 |
+
</config>
|
@@ -36,7 +36,7 @@
|
|
36 |
<show_in_website>1</show_in_website>
|
37 |
<show_in_store>1</show_in_store>
|
38 |
<fields>
|
39 |
-
<input_id_search translate="
|
40 |
<label><![CDATA[Search field ID]]></label>
|
41 |
<comment><![CDATA[ID of the search field in the customer area]]></comment>
|
42 |
<frontend_type>text</frontend_type>
|
@@ -53,12 +53,21 @@
|
|
53 |
]]></comment>
|
54 |
<frontend_type>select</frontend_type>
|
55 |
<source_model>searchanise/system_config_source_searchanise_typeAsync</source_model>
|
56 |
-
|
57 |
-
<sort_order>6</sort_order>
|
58 |
<show_in_default>1</show_in_default>
|
59 |
<show_in_website>0</show_in_website>
|
60 |
<show_in_store>0</show_in_store>
|
61 |
</type_async>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
</fields>
|
63 |
</config>
|
64 |
</groups>
|
36 |
<show_in_website>1</show_in_website>
|
37 |
<show_in_store>1</show_in_store>
|
38 |
<fields>
|
39 |
+
<input_id_search translate="labe commentl">
|
40 |
<label><![CDATA[Search field ID]]></label>
|
41 |
<comment><![CDATA[ID of the search field in the customer area]]></comment>
|
42 |
<frontend_type>text</frontend_type>
|
53 |
]]></comment>
|
54 |
<frontend_type>select</frontend_type>
|
55 |
<source_model>searchanise/system_config_source_searchanise_typeAsync</source_model>
|
56 |
+
<sort_order>2</sort_order>
|
|
|
57 |
<show_in_default>1</show_in_default>
|
58 |
<show_in_website>0</show_in_website>
|
59 |
<show_in_store>0</show_in_store>
|
60 |
</type_async>
|
61 |
+
<enabled_searchanise_search translate="labe comment">
|
62 |
+
<label><![CDATA[Use Searchanise for search and advanced search]]></label>
|
63 |
+
<comment><![CDATA[Disable in case of invalid search operation.<br>The instant search widget will <strong>remain active</strong>.]]></comment>
|
64 |
+
<frontend_type>select</frontend_type>
|
65 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
66 |
+
<sort_order>3</sort_order>
|
67 |
+
<show_in_default>1</show_in_default>
|
68 |
+
<show_in_website>0</show_in_website>
|
69 |
+
<show_in_store>0</show_in_store>
|
70 |
+
</enabled_searchanise_search>
|
71 |
</fields>
|
72 |
</config>
|
73 |
</groups>
|
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Simtech_Searchanise</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://searchanise.atlassian.net/wiki/display/DD/LICENSE+AGREEMENT">Commercial license: https://searchanise.atlassian.net/wiki/display/DD/LICENSE+AGREEMENT</license>
|
7 |
<channel>community</channel>
|
@@ -10,15 +10,19 @@
|
|
10 |
<description>Searchanise is a free SaaS solution providing fast and smart search for online stores. It provides rapid search results and instant search suggestions presented in a fancy and customizable widget.
|
11 |

|
12 |
With the help of Searchanise Connector Add-on you will be able to connect your store to the service and start using the search widget in no time. Power up your store right now!</description>
|
13 |
-
<notes>[+]
|
14 |
-
[
|
15 |
-
[
|
16 |
-
[
|
17 |
-
[!]
|
|
|
|
|
|
|
|
|
18 |
<authors><author><name>Simbirsk Technologies, Ltd.</name><user>searchanise</user><email>sales@searchanise.com</email></author></authors>
|
19 |
-
<date>2013-
|
20 |
-
<time>
|
21 |
-
<contents><target name="magecommunity"><dir name="Simtech"><dir name="Searchanise"><dir name="Block"><file name="Async.php" hash="030cb7d25ba09e32b2e8ab647cf0a2fe"/><file name="Autocomplete.php" hash="efc89ac3f897be3bc307fba6a36778f0"/><file name="Jsinit.php" hash="44d40c5d699abc2ac75a6e172dedd84b"/><dir name="Product"><dir name="List"><file name="Toolbar.php" hash="
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Simtech_Searchanise</name>
|
4 |
+
<version>1.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://searchanise.atlassian.net/wiki/display/DD/LICENSE+AGREEMENT">Commercial license: https://searchanise.atlassian.net/wiki/display/DD/LICENSE+AGREEMENT</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Searchanise is a free SaaS solution providing fast and smart search for online stores. It provides rapid search results and instant search suggestions presented in a fancy and customizable widget.
|
11 |

|
12 |
With the help of Searchanise Connector Add-on you will be able to connect your store to the service and start using the search widget in no time. Power up your store right now!</description>
|
13 |
+
<notes>[+] You can now turn off Searchanise for quick product search (the Use Searchanise for search and advanced search setting.) The autocomplete widget will work.<br>
|
14 |
+
[+] Faster indexation.<br>
|
15 |
+
[+] Search relevance improved.<br>
|
16 |
+
[+] The "All" variant of the items per page menu is replaced with "100" if the "Allow All Products per Page" option is active.<br>
|
17 |
+
[!] Multi-store improvement: Sometimes, not all product data was submitted from additional storefronts. Fixed.<br>
|
18 |
+
[!] The "Use in Quick Search" attributes are also taken into account in text search.<br>
|
19 |
+
[!] Search results could be incorrectly sorted on initial page visit. Fixed.<br>
|
20 |
+
[!] Search suggestion capitalizarion improved.<br>
|
21 |
+
[!] In v.1.5, the display of the available filter variant list was improved for the Layered Navigation block.<br></notes>
|
22 |
<authors><author><name>Simbirsk Technologies, Ltd.</name><user>searchanise</user><email>sales@searchanise.com</email></author></authors>
|
23 |
+
<date>2013-07-01</date>
|
24 |
+
<time>14:28:14</time>
|
25 |
+
<contents><target name="magecommunity"><dir name="Simtech"><dir name="Searchanise"><dir name="Block"><file name="Async.php" hash="030cb7d25ba09e32b2e8ab647cf0a2fe"/><file name="Autocomplete.php" hash="efc89ac3f897be3bc307fba6a36778f0"/><file name="Jsinit.php" hash="44d40c5d699abc2ac75a6e172dedd84b"/><dir name="Product"><dir name="List"><file name="Toolbar.php" hash="5c439fe647c7fb76bbb8a5e1a7a92f34"/></dir><file name="Result.php" hash="4e767e273ee21a38332ac226af878291"/></dir><file name="Result.php" hash="dec7b27ab9511c956680eb60eba9b95e"/></dir><dir name="Helper"><file name="ApiSe.php" hash="4fec477a23f1cb041dbc25cf03f151b3"/><file name="ApiXML.php" hash="bb4db1989ee6876665fbd5eaeb5cdaba"/><file name="Data.php" hash="6774268af2edf4da8d9f202c3d37908d"/></dir><dir name="Model"><file name="Advanced.php" hash="2a22ebcf7ac75b54681ef8a27bad2e47"/><dir name="Config"><file name="Data.php" hash="ddc558d22208f0ebc1e4378c9d050022"/></dir><file name="Config.php" hash="00ca3c7955f3ff2283c636a2074b6f03"/><dir name="Import"><dir name="Entity"><file name="Product.php" hash="4997af528b36f0f576d1c01402e14b03"/></dir></dir><dir name="Layer"><dir name="Filter"><file name="Category.php" hash="e290ab29f2d50e1acbbbb37496150ea4"/><file name="Price.php" hash="743887b32bf012274ad8a371fff96411"/></dir></dir><file name="Layer.php" hash="3e8c975d649ae6e20fcc69d35779c97c"/><file name="LayerCatalogSearch.php" hash="61728092fdb9cf42490afacdc4e731fd"/><dir name="Mysql4"><dir name="Advanced"><file name="Collection.php" hash="dd8c6f3cbb0621a5a7320f3104e68da6"/></dir><dir name="Config"><file name="Collection.php" hash="470218c1eb3f1cc1ca0e6d0e93e1b097"/></dir><file name="Config.php" hash="c95dc8ecd7ab4f955b6eaf4710ab960e"/><dir name="Fulltext"><file name="Collection.php" hash="5646955503a90020f87cfd861ac07e73"/></dir><dir name="Product"><file name="Collection.php" hash="28b478eb328502ce03e389404d9f54b5"/><file name="CollectionTag.php" hash="def509d1365374e6dede36be17e75bf3"/></dir><dir name="Queue"><file name="Collection.php" hash="30ca0f8640bdc443deb94cd2e71010c8"/></dir><file name="Queue.php" hash="286351623e8f011a21519f8d9c3e3151"/><file name="Store.php" hash="0126a4291d7dad6641bf59abb0f64cc4"/></dir><file name="Observer.php" hash="b7228e6adfedc3cce9975a7cee280d0c"/><file name="Queue.php" hash="831f5ea7e57810f9c78d09659424e9a7"/><file name="Request.php" hash="581cda79900b00e16610d0ac679dc02b"/><dir name="Resource"><dir name="Advanced"><file name="Collection.php" hash="12933839daa74d17ac82fca89071bc0a"/></dir><dir name="Eav"><dir name="Mysql4"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="982b1960bec58522f1bd8b82f86452b4"/><file name="Price.php" hash="fc1ec55d6c2aa97558e06691e690e466"/></dir></dir><dir name="Product"><file name="Action.php" hash="006e3c8c775cf31a8b9c66fb934c9d2d"/></dir></dir></dir><dir name="Fulltext"><file name="Collection.php" hash="b9e2e4884a7ecee0000e6a41c0e6d3e2"/></dir><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="0bfecbdff2458785a287c3f1de23ed56"/><file name="Price.php" hash="38d1acaa4478d678d4bb20704a81b760"/></dir></dir><dir name="Product"><file name="Collection.php" hash="6072bf2a7a4713f3db2fa96014e7453a"/><file name="CollectionTag.php" hash="e89307da7c26ee153c3f9dead94dcd13"/></dir><file name="Store.php" hash="8dd81bf57d38af2b4640bbf14063d3f8"/></dir><file name="Searchanise.php" hash="507813e92908000315aabc4256c5a05c"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Searchanise"><file name="TypeAsync.php" hash="11d1aa481094ccbeab365b1fed33440d"/></dir></dir></dir></dir><dir name="Tag"><file name="Relation.php" hash="598f81fd8b2ac77baf24211c2ed03e55"/></dir></dir><dir name="controllers"><file name="AdvancedController.php" hash="7500f6075382cd8a14816e424da2348f"/><file name="AsyncController.php" hash="da396c439c66a41ee58b3ae8997e1c46"/><file name="CategoryController.php" hash="909f99c5cf7f85405fc76ebe976c2c8e"/><file name="IndexController.php" hash="e3234ca51a7669741e29ff7c38789989"/><file name="InfoController.php" hash="a24bd87395379bf9d9ba44c20b170e71"/><file name="OptionsController.php" hash="56785c8ea24472c2047268b2d9e8e878"/><file name="ProductController.php" hash="6633fde99f35ffeaa05884f0e0d98da7"/><file name="ResultController.php" hash="4b00515cc47593704ea1178d7b44d48e"/><file name="ResyncController.php" hash="0612f929d375427326821dfc12186be8"/><file name="SignupController.php" hash="80f87a63d6272f98a068dde35f1d140e"/></dir><dir name="etc"><file name="config.xml" hash="81a12d2a961001cf6d4c7c1ec91fc530"/><file name="config_without_search.xml" hash="e59f69591934691ddab2e5b601d0ac6a"/><file name="system.xml" hash="08c1b104f59abea32a5ed2f0eaaebbdb"/></dir><dir name="sql"><dir name="searchanise_setup"><file name="mysql4-install-0.1.0.php" hash="754324c8783e9cc24de86396e1587e73"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="searchanise"><file name="dashboard.phtml" hash="8b9793a009151951e1e1f8e4cecb4db2"/></dir></dir><dir name="layout"><file name="searchanise.xml" hash="68baa611d05db05f8816ea2a8260e961"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="searchanise.xml" hash="5e904fee02cbd42324a297d513b9f582"/></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="catalogsearch"><file name="form.mini.phtml" hash="fcf8e06e66801a36c96f20ca5d187123"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Simtech_Searchanise.xml" hash="04148681a6648bd370ab62140cbf2ad9"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Simtech_Searchanise.csv" hash="1bdb7fddc596dac1460bc3054c425187"/></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
|
28 |
</package>
|