Version Notes
[+] Compatibility with magento SUPEE-6788 patch and version 1.9.2.2 was added.
[+] Compatibility with third-party addons that override 'catalogsearch' controllers was added.
[+] Support for product flat table was added.
[+] HHVM support added.
[+] Ability to hide categories from search was added.
[+] Ability to enable only some of the store views to be processed by Searchanise was added.
[*] Magento: Set search field ID: The setting caption updated.
[*] Redundant product attributes are now longer collected.
[*] Obsolete code with category navigation was removed.
[*] Addition cms pages was hidden from search by default.
[*] Speed of product export was increased.
[!] Due to inconsistency of Magento's standard "Category Products" index, not all products were searchable. Fixed.
[!] All categories were submitted for each store, even if it had its own default (parent) category. Fixed.
[!] If sorting by custom attribute was applied the search results were shown without using Searchanise. Fixed.
[!] Allow Qty Below 0 setting handing was fixed.
[!] Erroneous server requests were handled incorrectly, cramming store logs with notices. Fixed.
[!] Default autocomplete wasn't disabled in magento 1.9. Fixed.
Release Info
Developer | Simbirsk Technologies, Ltd. |
Extension | Simtech_Searchanise |
Version | 3.1.0 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.1.0
- app/code/community/Simtech/Searchanise/Block/Async.php +2 -11
- app/code/community/Simtech/Searchanise/Block/Jsinit.php +29 -12
- app/code/community/Simtech/Searchanise/Block/Product/Result.php +0 -51
- app/code/community/Simtech/Searchanise/Helper/ApiCategories.php +13 -5
- app/code/community/Simtech/Searchanise/Helper/ApiPages.php +3 -0
- app/code/community/Simtech/Searchanise/Helper/ApiProducts.php +107 -96
- app/code/community/Simtech/Searchanise/Helper/ApiSe.php +20 -32
- app/code/community/Simtech/Searchanise/Helper/Data.php +89 -153
- app/code/community/Simtech/Searchanise/Model/Advanced.php +0 -33
- app/code/community/Simtech/Searchanise/Model/Layer.php +0 -52
- app/code/community/Simtech/Searchanise/Model/LayerCatalogSearch.php +0 -52
- app/code/community/Simtech/Searchanise/Model/Mysql4/Product/CollectionTag.php +0 -104
- app/code/community/Simtech/Searchanise/Model/Observer.php +68 -1
- app/code/community/Simtech/Searchanise/Model/Request.php +2 -4
- app/code/community/Simtech/Searchanise/Model/Resource/Advanced/Collection.php +12 -0
- app/code/community/Simtech/Searchanise/Model/Resource/Fulltext/Collection.php +21 -0
- app/code/community/Simtech/Searchanise/Model/Resource/Product/Collection.php +12 -0
- app/code/community/Simtech/Searchanise/Model/Resource/Product/CollectionTag.php +0 -104
- app/code/community/Simtech/Searchanise/controllers/{IndexController.php → Adminhtml/SearchaniseController.php} +52 -2
- app/code/community/Simtech/Searchanise/controllers/AdvancedController.php +0 -45
- app/code/community/Simtech/Searchanise/controllers/AsyncController.php +0 -4
- app/code/community/Simtech/Searchanise/controllers/CategoryController.php +0 -70
- app/code/community/Simtech/Searchanise/controllers/InfoController.php +49 -1
- app/code/community/Simtech/Searchanise/controllers/OptionsController.php +0 -36
- app/code/community/Simtech/Searchanise/controllers/ProductController.php +0 -39
- app/code/community/Simtech/Searchanise/controllers/ResultController.php +0 -66
- app/code/community/Simtech/Searchanise/controllers/ResyncController.php +0 -34
- app/code/community/Simtech/Searchanise/controllers/SignupController.php +0 -32
- app/code/community/Simtech/Searchanise/etc/config.xml +25 -64
- app/code/community/Simtech/Searchanise/etc/config_without_search.xml +25 -64
- app/code/community/Simtech/Searchanise/etc/system.xml +2 -2
- app/design/frontend/default/default/template/catalogsearch/form.mini.phtml +0 -41
- package.xml +23 -6
@@ -16,16 +16,8 @@ class Simtech_Searchanise_Block_Async extends Mage_Core_Block_Text
|
|
16 |
{
|
17 |
private function _startSignup()
|
18 |
{
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
if ($autoInstallInBackground) {
|
23 |
-
$signupUrl = Mage::helper("adminhtml")->getUrl(Mage::helper('searchanise/ApiSe')->getConnectLink());
|
24 |
-
$html .= "\n<object data=\"$signupUrl\" width=\"0\" height=\"0\" type=\"text/html\"></object>\n";
|
25 |
-
} else {
|
26 |
-
if (Mage::helper('searchanise/ApiSe')->signup(null, false) == true) {
|
27 |
-
Mage::helper('searchanise/ApiSe')->queueImport(null, false);
|
28 |
-
}
|
29 |
}
|
30 |
|
31 |
return true;
|
@@ -48,7 +40,6 @@ class Simtech_Searchanise_Block_Async extends Mage_Core_Block_Text
|
|
48 |
|
49 |
if ($textNotification != '') {
|
50 |
Mage::helper('searchanise/ApiSe')->setNotification('N', Mage::helper('searchanise')->__('Notice'), $textNotification);
|
51 |
-
Mage::helper('searchanise/ApiSe')->showWarningFlatTables();
|
52 |
$this->_startSignup();
|
53 |
|
54 |
} else {
|
16 |
{
|
17 |
private function _startSignup()
|
18 |
{
|
19 |
+
if (Mage::helper('searchanise/ApiSe')->signup(null, false) == true) {
|
20 |
+
Mage::helper('searchanise/ApiSe')->queueImport(null, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
|
23 |
return true;
|
40 |
|
41 |
if ($textNotification != '') {
|
42 |
Mage::helper('searchanise/ApiSe')->setNotification('N', Mage::helper('searchanise')->__('Notice'), $textNotification);
|
|
|
43 |
$this->_startSignup();
|
44 |
|
45 |
} else {
|
@@ -17,8 +17,32 @@ class Simtech_Searchanise_Block_Jsinit extends Mage_Core_Block_Text
|
|
17 |
protected function _toHtml()
|
18 |
{
|
19 |
$html = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
$store = Mage::app()->getStore();
|
21 |
-
|
22 |
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true, $store)) {
|
23 |
return $html;
|
24 |
}
|
@@ -28,15 +52,7 @@ class Simtech_Searchanise_Block_Jsinit extends Mage_Core_Block_Text
|
|
28 |
if (empty($apiKey)) {
|
29 |
return $html;
|
30 |
}
|
31 |
-
|
32 |
-
$inputId = Mage::helper('searchanise/ApiSe')->getInputIdSearch();
|
33 |
-
if ($inputId == '') {
|
34 |
-
// Uncomment the lines below if it is necessary to disable search widget in frontend
|
35 |
-
//~ return '';
|
36 |
-
}
|
37 |
-
if (empty($inputId)) {
|
38 |
-
$inputId = 'search';
|
39 |
-
}
|
40 |
$union = 'Searchanise.AutoCmpParams.union = {};';
|
41 |
$restrictBy = '';
|
42 |
|
@@ -56,7 +72,7 @@ class Simtech_Searchanise_Block_Jsinit extends Mage_Core_Block_Text
|
|
56 |
if ($showOutOfStock) {
|
57 |
// nothing
|
58 |
} else {
|
59 |
-
$restrictBy .= "
|
60 |
}
|
61 |
|
62 |
$priceFormat['after'] = $priceFormat['after'] ? 'true' : 'false';
|
@@ -96,7 +112,8 @@ class Simtech_Searchanise_Block_Jsinit extends Mage_Core_Block_Text
|
|
96 |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(__se, s);
|
97 |
})();
|
98 |
//]]>
|
99 |
-
|
|
|
100 |
|
101 |
// Uncomment the lines below if it is necessary to hide price in search widget
|
102 |
// $html .= '
|
17 |
protected function _toHtml()
|
18 |
{
|
19 |
$html = '';
|
20 |
+
|
21 |
+
$inputId = Mage::helper('searchanise/ApiSe')->getInputIdSearch();
|
22 |
+
if (empty($inputId)) {
|
23 |
+
$inputId = 'search';
|
24 |
+
}
|
25 |
+
|
26 |
+
//
|
27 |
+
// Disable standart autocomplete
|
28 |
+
//
|
29 |
+
$html .=
|
30 |
+
" <script type=\"text/javascript\">
|
31 |
+
//<![CDATA[
|
32 |
+
try {
|
33 |
+
Prototype && Prototype.Version && Event && Event.observe && Event.observe(window, 'load', function()
|
34 |
+
{
|
35 |
+
if ($$('input#{$inputId}').length) {
|
36 |
+
$$('input#{$inputId}')[0].stopObserving('keydown');
|
37 |
+
}
|
38 |
+
});
|
39 |
+
} catch (e) {}
|
40 |
+
//]]>
|
41 |
+
</script>
|
42 |
+
";
|
43 |
+
|
44 |
$store = Mage::app()->getStore();
|
45 |
+
|
46 |
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true, $store)) {
|
47 |
return $html;
|
48 |
}
|
52 |
if (empty($apiKey)) {
|
53 |
return $html;
|
54 |
}
|
55 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
$union = 'Searchanise.AutoCmpParams.union = {};';
|
57 |
$restrictBy = '';
|
58 |
|
72 |
if ($showOutOfStock) {
|
73 |
// nothing
|
74 |
} else {
|
75 |
+
$restrictBy .= "Searchanise.AutoCmpParams.restrictBy.is_in_stock = '1';";
|
76 |
}
|
77 |
|
78 |
$priceFormat['after'] = $priceFormat['after'] ? 'true' : 'false';
|
112 |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(__se, s);
|
113 |
})();
|
114 |
//]]>
|
115 |
+
</script>
|
116 |
+
";
|
117 |
|
118 |
// Uncomment the lines below if it is necessary to hide price in search widget
|
119 |
// $html .= '
|
@@ -1,51 +0,0 @@
|
|
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 |
-
class Simtech_Searchanise_Block_Product_Result extends Mage_Tag_Block_Product_Result
|
16 |
-
{
|
17 |
-
protected function _getProductCollection()
|
18 |
-
{
|
19 |
-
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
20 |
-
return parent::_getProductCollection();
|
21 |
-
}
|
22 |
-
|
23 |
-
if (is_null($this->_productCollection)) {
|
24 |
-
$tagModel = Mage::getModel('tag/tag');
|
25 |
-
$collection = $tagModel->getEntityCollection();
|
26 |
-
|
27 |
-
if (method_exists($collection, 'setSearchaniseRequest')) {
|
28 |
-
$collection->setSearchaniseRequest(Mage::helper('searchanise')->getSearchaniseRequest());
|
29 |
-
}
|
30 |
-
|
31 |
-
if ((!method_exists($collection, 'checkSearchaniseResult')) || (!$collection->checkSearchaniseResult())) {
|
32 |
-
return parent::_getProductCollection();
|
33 |
-
}
|
34 |
-
|
35 |
-
$this->_productCollection = $collection;
|
36 |
-
$this->_productCollection
|
37 |
-
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
|
38 |
-
->addSearchaniseFilter()
|
39 |
-
->addTagFilter($this->getTag()->getId())
|
40 |
-
->addStoreFilter(Mage::app()->getStore()->getId())
|
41 |
-
->addMinimalPrice()
|
42 |
-
->addUrlRewrite()
|
43 |
-
->setActiveFilter();
|
44 |
-
|
45 |
-
Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_productCollection);
|
46 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this->_productCollection);
|
47 |
-
}
|
48 |
-
|
49 |
-
return $this->_productCollection;
|
50 |
-
}
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -14,6 +14,9 @@
|
|
14 |
|
15 |
class Simtech_Searchanise_Helper_ApiCategories extends Mage_Core_Helper_Data
|
16 |
{
|
|
|
|
|
|
|
17 |
public static function generateCategoryFeed($category, $store = null, $checkData = true)
|
18 |
{
|
19 |
$item = array();
|
@@ -22,7 +25,8 @@ class Simtech_Searchanise_Helper_ApiCategories extends Mage_Core_Helper_Data
|
|
22 |
if (!$category ||
|
23 |
!$category->getId() ||
|
24 |
!$category->getName() ||
|
25 |
-
!$category->getIsActive()
|
|
|
26 |
) {
|
27 |
return $item;
|
28 |
}
|
@@ -30,9 +34,6 @@ class Simtech_Searchanise_Helper_ApiCategories extends Mage_Core_Helper_Data
|
|
30 |
// Need for generate correct url.
|
31 |
if ($store) {
|
32 |
$category->getUrlInstance()->setStore($store->getId());
|
33 |
-
Mage::app()->setCurrentStore($store->getId());
|
34 |
-
} else {
|
35 |
-
Mage::app()->setCurrentStore(0);
|
36 |
}
|
37 |
|
38 |
$item['id'] = $category->getId();
|
@@ -65,6 +66,12 @@ class Simtech_Searchanise_Helper_ApiCategories extends Mage_Core_Helper_Data
|
|
65 |
|
66 |
public static function getCategories($categoryIds = Simtech_Searchanise_Model_Queue::NOT_DATA, $store = null)
|
67 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
static $arrCategories = array();
|
69 |
|
70 |
$keyCategories = '';
|
@@ -77,6 +84,7 @@ class Simtech_Searchanise_Helper_ApiCategories extends Mage_Core_Helper_Data
|
|
77 |
}
|
78 |
$storeId = $store ? $store->getId() : 0;
|
79 |
$keyCategories .= ':' . $storeId;
|
|
|
80 |
|
81 |
if (isset($arrCategories[$keyCategories])) {
|
82 |
// Nothing
|
@@ -86,7 +94,7 @@ class Simtech_Searchanise_Helper_ApiCategories extends Mage_Core_Helper_Data
|
|
86 |
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
|
87 |
$collection
|
88 |
->addAttributeToSelect('*')
|
89 |
-
->
|
90 |
|
91 |
if ($categoryIds !== Simtech_Searchanise_Model_Queue::NOT_DATA) {
|
92 |
// Already exist automatic definition 'one value' or 'array'.
|
14 |
|
15 |
class Simtech_Searchanise_Helper_ApiCategories extends Mage_Core_Helper_Data
|
16 |
{
|
17 |
+
private static $_excludedCategories = array(// use id to hide categories
|
18 |
+
);
|
19 |
+
|
20 |
public static function generateCategoryFeed($category, $store = null, $checkData = true)
|
21 |
{
|
22 |
$item = array();
|
25 |
if (!$category ||
|
26 |
!$category->getId() ||
|
27 |
!$category->getName() ||
|
28 |
+
!$category->getIsActive() ||
|
29 |
+
in_array($category->getId(), self::$_excludedCategories)
|
30 |
) {
|
31 |
return $item;
|
32 |
}
|
34 |
// Need for generate correct url.
|
35 |
if ($store) {
|
36 |
$category->getUrlInstance()->setStore($store->getId());
|
|
|
|
|
|
|
37 |
}
|
38 |
|
39 |
$item['id'] = $category->getId();
|
66 |
|
67 |
public static function getCategories($categoryIds = Simtech_Searchanise_Model_Queue::NOT_DATA, $store = null)
|
68 |
{
|
69 |
+
if ($store) {
|
70 |
+
Mage::app()->setCurrentStore($store->getId());
|
71 |
+
} else {
|
72 |
+
Mage::app()->setCurrentStore(0);
|
73 |
+
}
|
74 |
+
|
75 |
static $arrCategories = array();
|
76 |
|
77 |
$keyCategories = '';
|
84 |
}
|
85 |
$storeId = $store ? $store->getId() : 0;
|
86 |
$keyCategories .= ':' . $storeId;
|
87 |
+
$rootCategoryId = Mage::app()->getStore($storeId)->getRootCategoryId();
|
88 |
|
89 |
if (isset($arrCategories[$keyCategories])) {
|
90 |
// Nothing
|
94 |
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
|
95 |
$collection
|
96 |
->addAttributeToSelect('*')
|
97 |
+
->addAttributeToFilter('path', array('like' => "1/{$rootCategoryId}/%"));
|
98 |
|
99 |
if ($categoryIds !== Simtech_Searchanise_Model_Queue::NOT_DATA) {
|
100 |
// Already exist automatic definition 'one value' or 'array'.
|
@@ -18,6 +18,9 @@ class Simtech_Searchanise_Helper_ApiPages extends Mage_Core_Helper_Data
|
|
18 |
'no-route', // 404 page
|
19 |
'enable-cookies', // Enable Cookies
|
20 |
'privacy-policy-cookie-restriction-mode', // Privacy Policy
|
|
|
|
|
|
|
21 |
);
|
22 |
|
23 |
public static function generatePageFeed($page, $store = null, $checkData = true)
|
18 |
'no-route', // 404 page
|
19 |
'enable-cookies', // Enable Cookies
|
20 |
'privacy-policy-cookie-restriction-mode', // Privacy Policy
|
21 |
+
'service-unavailable', // 503 Service Unavailable
|
22 |
+
'private-sales', // Welcome to our Exclusive Online Store
|
23 |
+
'home', // Home
|
24 |
);
|
25 |
|
26 |
public static function generatePageFeed($page, $store = null, $checkData = true)
|
@@ -14,7 +14,7 @@
|
|
14 |
|
15 |
class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
16 |
{
|
17 |
-
const WEIGHT_SHORT_DESCRIPTION =
|
18 |
const WEIGHT_DESCRIPTION = 40;
|
19 |
const WEIGHT_DESCRIPTION_GROUPED = 30;
|
20 |
|
@@ -185,6 +185,20 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
185 |
} else {
|
186 |
$quantity = $stockItem->getQty();
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
if ($unitedProducts) {
|
189 |
$quantity = 0;
|
190 |
foreach ($unitedProducts as $itemProductKey => $itemProduct) {
|
@@ -255,14 +269,13 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
255 |
} elseif ($product->isGrouped() && $childrenProducts) {
|
256 |
// fixme in the future
|
257 |
// maybe exist better solution get `minimalPrice` for `Grouped` product
|
258 |
-
$minimalPrice =
|
259 |
|
260 |
foreach ($childrenProducts as $childrenProductsKey => $childrenProduct) {
|
261 |
if ($childrenProduct) {
|
262 |
-
$minimalPriceChildren = self::_getProductMinimalPrice($childrenProduct, $store, null, $customerGroupId);
|
263 |
|
264 |
-
if (($minimalPriceChildren < $minimalPrice) ||
|
265 |
-
($minimalPrice == '')) {
|
266 |
$minimalPrice = $minimalPriceChildren;
|
267 |
}
|
268 |
}
|
@@ -334,21 +347,34 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
334 |
|
335 |
private static function _generateProductPrices(&$item, $product, $childrenProducts = null, $store = null)
|
336 |
{
|
|
|
|
|
337 |
if ($customerGroups = self::_getCustomerGroups()) {
|
338 |
-
foreach ($customerGroups as $
|
339 |
// It is needed because the 'setCustomerGroupId' function works only once.
|
340 |
$productCurrentGroup = clone $product;
|
341 |
$customerGroupId = $customerGroup->getId();
|
342 |
|
343 |
-
$
|
344 |
-
|
345 |
-
$price = round($price, Mage::helper('searchanise/ApiSe')->getFloatPrecision());
|
346 |
-
}
|
347 |
|
348 |
-
|
349 |
-
|
350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
}
|
|
|
352 |
$label_ = Mage::helper('searchanise/ApiSe')->getLabelForPricesUsergroup() . $customerGroup->getId();
|
353 |
$item[$label_] = $price;
|
354 |
unset($productCurrentGroup);
|
@@ -458,13 +484,16 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
458 |
private static function _getIdAttributesValues($products, $attributeCode)
|
459 |
{
|
460 |
$values = array();
|
461 |
-
|
462 |
foreach ($products as $productKey => $product) {
|
463 |
$value = $product->getData($attributeCode);
|
464 |
if ($value == '') {
|
465 |
// Nothing.
|
466 |
} elseif (is_array($value) && empty($value)) {
|
467 |
// Nothing.
|
|
|
|
|
|
|
|
|
468 |
} else {
|
469 |
if (!in_array($value, $values)) {
|
470 |
$values[] = $value;
|
@@ -534,9 +563,11 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
534 |
$isSearchable = $attribute->getIsSearchable();
|
535 |
$isVisibleInAdvancedSearch = $attribute->getIsVisibleInAdvancedSearch();
|
536 |
$usedForSortBy = $attribute->getUsedForSortBy();
|
|
|
|
|
537 |
$attributeName = 'attribute_' . $attribute->getId();
|
538 |
|
539 |
-
$isNecessaryAttribute = $useFullFeed || $isSearchable || $isVisibleInAdvancedSearch || $usedForSortBy || in_array($attributeCode, $requiredAttributes);
|
540 |
|
541 |
if (!$isNecessaryAttribute) {
|
542 |
continue;
|
@@ -546,43 +577,52 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
546 |
// nothing
|
547 |
|
548 |
// <system_attributes>
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
} elseif ($attributeCode == 'has_options') {
|
565 |
-
} elseif ($attributeCode == 'required_options') {
|
566 |
-
} elseif ($attributeCode == 'custom_layout_update') {
|
567 |
-
} elseif ($attributeCode == 'tier_price') { // quantity discount
|
568 |
-
} elseif ($attributeCode == 'image_label') {
|
569 |
-
} elseif ($attributeCode == 'small_image_label') {
|
570 |
-
} elseif ($attributeCode == 'thumbnail_label') {
|
571 |
-
} elseif ($attributeCode == 'url_key') { // seo name
|
572 |
// <system_attributes>
|
573 |
|
574 |
} elseif ($attributeCode == 'group_price') {
|
575 |
// nothing
|
576 |
// fixme in the future if need
|
577 |
|
578 |
-
} elseif ($attributeCode == '
|
579 |
-
if ($value
|
580 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
}
|
582 |
-
$item['se_grouped_' . $attributeCode] = $unitedValues;
|
583 |
|
584 |
} elseif (
|
585 |
-
$attributeCode == 'short_description' ||
|
586 |
$attributeCode == 'meta_title' ||
|
587 |
$attributeCode == 'meta_description' ||
|
588 |
$attributeCode == 'meta_keyword') {
|
@@ -595,7 +635,9 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
595 |
|
596 |
} elseif ($inputType == 'select' || $inputType == 'multiselect') {
|
597 |
// <id_values>
|
598 |
-
$
|
|
|
|
|
599 |
|
600 |
// <text_values>
|
601 |
$unitedTextValues = self::_getProductAttributeTextValues($unitedProducts, $attributeCode, $inputType, $store);
|
@@ -648,10 +690,11 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
648 |
$item['title'] = $product->getName();
|
649 |
|
650 |
$summary = $product->getData('short_description');
|
651 |
-
|
652 |
-
if ($summary == '') {
|
653 |
$summary = $product->getData('description');
|
654 |
}
|
|
|
655 |
$item['summary'] = $summary;
|
656 |
|
657 |
$productUrl = $product->getProductUrl(false);
|
@@ -689,15 +732,6 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
689 |
}
|
690 |
// </image_link>
|
691 |
|
692 |
-
// <attributes_position>
|
693 |
-
{
|
694 |
-
// Fixme in the feature:
|
695 |
-
// products could have different position in different categories, sort by "position" disabled.
|
696 |
-
$item['position'] = $product->getData('position');
|
697 |
-
// end
|
698 |
-
}
|
699 |
-
// </attributes_position>
|
700 |
-
|
701 |
self::_generateProductAttributes($item, $product, $childrenProducts, $unitedProducts, $store);
|
702 |
|
703 |
// <categories>
|
@@ -780,10 +814,7 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
780 |
|
781 |
public static function isFacet($attribute)
|
782 |
{
|
783 |
-
|
784 |
-
$isFilterableInSearch = $attribute->getIsFilterableInSearch();
|
785 |
-
|
786 |
-
return $isFilterable || $isFilterableInSearch;
|
787 |
}
|
788 |
|
789 |
private static function _generateFacetFromFilter($attribute, $store = null)
|
@@ -999,6 +1030,11 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
999 |
{
|
1000 |
$items = array();
|
1001 |
|
|
|
|
|
|
|
|
|
|
|
1002 |
$products = self::getProducts($productIds, $store, null);
|
1003 |
|
1004 |
if ($products) {
|
@@ -1074,15 +1110,13 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1074 |
}
|
1075 |
|
1076 |
if ($isOnlyActive) {
|
1077 |
-
Mage::getSingleton('catalog/product_status')->
|
1078 |
-
// Fixme in the future
|
1079 |
// It may require to disable "product visibility" filter if "is full feed".
|
1080 |
-
if (Mage::helper('searchanise/ApiSe')->getUseFullFeed()
|
1081 |
-
Mage::getSingleton('catalog/product_visibility')->
|
1082 |
} else {
|
1083 |
-
Mage::getSingleton('catalog/product_visibility')->
|
1084 |
}
|
1085 |
-
// end fixme
|
1086 |
}
|
1087 |
|
1088 |
$products->load();
|
@@ -1108,9 +1142,6 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1108 |
'status',
|
1109 |
'visibility',
|
1110 |
'price',
|
1111 |
-
'weight',
|
1112 |
-
'created_at',
|
1113 |
-
'updated_at',
|
1114 |
);
|
1115 |
}
|
1116 |
|
@@ -1129,9 +1160,10 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1129 |
$isSearchable = $attribute->getIsSearchable();
|
1130 |
$isVisibleInAdvancedSearch = $attribute->getIsVisibleInAdvancedSearch();
|
1131 |
$usedForSortBy = $attribute->getUsedForSortBy();
|
|
|
1132 |
$attributeName = 'attribute_' . $attribute->getId();
|
1133 |
|
1134 |
-
$isNecessaryAttribute = $useFullFeed || $isSearchable || $isVisibleInAdvancedSearch || $usedForSortBy || in_array($attributeCode, $requiredAttributes);
|
1135 |
|
1136 |
if (!$isNecessaryAttribute) {
|
1137 |
return $items;
|
@@ -1140,6 +1172,7 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1140 |
$name = $attribute->getAttributeCode();
|
1141 |
$title = $attribute->getData('frontend_label');
|
1142 |
$type = '';
|
|
|
1143 |
$textSearch = $isSearchable ? 'Y' : 'N';
|
1144 |
$attributeWeight = 0;
|
1145 |
|
@@ -1151,19 +1184,6 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1151 |
} elseif ($attributeCode == 'status' || $attributeCode == 'visibility') {
|
1152 |
$type = 'text';
|
1153 |
$textSearch = 'N';
|
1154 |
-
} elseif ($attributeCode == 'weight') {
|
1155 |
-
$type = 'float';
|
1156 |
-
$textSearch = 'N';
|
1157 |
-
// <dates>
|
1158 |
-
} elseif ($attributeCode == 'created_at' || $attributeCode == 'updated_at') {
|
1159 |
-
$type = 'int';
|
1160 |
-
$textSearch = 'N';
|
1161 |
-
if ($attributeCode == 'created_at'){
|
1162 |
-
$title = Mage::helper('searchanise')->__('Date Created');
|
1163 |
-
} elseif ($attributeCode == 'updated_at') {
|
1164 |
-
$title = Mage::helper('searchanise')->__('Date Updated');
|
1165 |
-
}
|
1166 |
-
// </dates>
|
1167 |
} elseif ($attributeCode == 'has_options') {
|
1168 |
} elseif ($attributeCode == 'required_options') {
|
1169 |
} elseif ($attributeCode == 'custom_layout_update') {
|
@@ -1171,6 +1191,7 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1171 |
} elseif ($attributeCode == 'image_label') {
|
1172 |
} elseif ($attributeCode == 'small_image_label') {
|
1173 |
} elseif ($attributeCode == 'thumbnail_label') {
|
|
|
1174 |
} elseif ($attributeCode == 'url_key') { // seo name
|
1175 |
// <system_attributes>
|
1176 |
|
@@ -1201,6 +1222,7 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1201 |
}
|
1202 |
$type = 'text';
|
1203 |
if ($attributeCode == 'description') {
|
|
|
1204 |
$items[] = array(
|
1205 |
'name' => 'se_grouped_' . $attributeCode,
|
1206 |
'title' => $attribute->getData('frontend_label') . ' - Grouped',
|
@@ -1219,11 +1241,13 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1219 |
'name' => $name,
|
1220 |
'title' => $title,
|
1221 |
'type' => $type,
|
|
|
1222 |
'weight' => $isSearchable ? self::WEIGHT_SELECT_ATTRIBUTES : 0,
|
1223 |
'text_search' => $textSearch,
|
1224 |
);
|
1225 |
$name = $attributeName;
|
1226 |
$title = $title . ' - IDs';
|
|
|
1227 |
$textSearch = 'N';
|
1228 |
|
1229 |
} elseif ($inputType == 'text' || $inputType == 'textarea') {
|
@@ -1253,6 +1277,7 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1253 |
'name' => $name,
|
1254 |
'title' => $title,
|
1255 |
'type' => $type,
|
|
|
1256 |
'weight' => $attributeWeight,
|
1257 |
'text_search' => $textSearch,
|
1258 |
);
|
@@ -1377,20 +1402,6 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1377 |
'weight' => 0,
|
1378 |
'text_search' => 'N',
|
1379 |
);
|
1380 |
-
$schema[] = array(
|
1381 |
-
'name' => 'created_at',
|
1382 |
-
'title' => 'Created Date',
|
1383 |
-
'type' => 'text',
|
1384 |
-
'weight' => 0,
|
1385 |
-
'text_search' => 'N',
|
1386 |
-
);
|
1387 |
-
$schema[] = array(
|
1388 |
-
'name' => 'position',
|
1389 |
-
'title' => 'Position',
|
1390 |
-
'type' => 'text',
|
1391 |
-
'weight' => 0,
|
1392 |
-
'text_search' => 'N',
|
1393 |
-
);
|
1394 |
}
|
1395 |
|
1396 |
if ($attributes = self::getProductAttributes($attributeIds, $store, $isPrice)) {
|
14 |
|
15 |
class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
16 |
{
|
17 |
+
const WEIGHT_SHORT_DESCRIPTION = 40;
|
18 |
const WEIGHT_DESCRIPTION = 40;
|
19 |
const WEIGHT_DESCRIPTION_GROUPED = 30;
|
20 |
|
185 |
} else {
|
186 |
$quantity = $stockItem->getQty();
|
187 |
|
188 |
+
if ($quantity <= 0) {
|
189 |
+
|
190 |
+
$backorders = 0;
|
191 |
+
if ($stockItem->getData('use_config_backorders') == 1) {
|
192 |
+
$backorders = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_BACKORDERS);
|
193 |
+
} else {
|
194 |
+
$backorders = $stockItem->getData('backorders');
|
195 |
+
}
|
196 |
+
|
197 |
+
if ($backorders == 1 || $backorders == 2) {
|
198 |
+
$quantity = 1;
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
if ($unitedProducts) {
|
203 |
$quantity = 0;
|
204 |
foreach ($unitedProducts as $itemProductKey => $itemProduct) {
|
269 |
} elseif ($product->isGrouped() && $childrenProducts) {
|
270 |
// fixme in the future
|
271 |
// maybe exist better solution get `minimalPrice` for `Grouped` product
|
272 |
+
$minimalPrice = false;
|
273 |
|
274 |
foreach ($childrenProducts as $childrenProductsKey => $childrenProduct) {
|
275 |
if ($childrenProduct) {
|
276 |
+
$minimalPriceChildren = self::_getProductMinimalPrice(clone $childrenProduct, $store, null, $customerGroupId);
|
277 |
|
278 |
+
if (($minimalPriceChildren < $minimalPrice) || ($minimalPrice === false)) {
|
|
|
279 |
$minimalPrice = $minimalPriceChildren;
|
280 |
}
|
281 |
}
|
347 |
|
348 |
private static function _generateProductPrices(&$item, $product, $childrenProducts = null, $store = null)
|
349 |
{
|
350 |
+
$product->getGroupPrice();//preload group_price attribute
|
351 |
+
|
352 |
if ($customerGroups = self::_getCustomerGroups()) {
|
353 |
+
foreach ($customerGroups as $customerGroup) {
|
354 |
// It is needed because the 'setCustomerGroupId' function works only once.
|
355 |
$productCurrentGroup = clone $product;
|
356 |
$customerGroupId = $customerGroup->getId();
|
357 |
|
358 |
+
if ($customerGroupId == Mage_Customer_Model_Group::NOT_LOGGED_IN_ID || !isset($equalPriceForAllGroups)) {
|
359 |
+
$price = self::_getProductMinimalPrice($productCurrentGroup, $store, $childrenProducts, $customerGroupId);
|
|
|
|
|
360 |
|
361 |
+
if ($price !== false) {
|
362 |
+
$price = round($price, Mage::helper('searchanise/ApiSe')->getFloatPrecision());
|
363 |
+
}
|
364 |
+
|
365 |
+
if ($customerGroupId == Mage_Customer_Model_Group::NOT_LOGGED_IN_ID) {
|
366 |
+
$item['price'] = $price;
|
367 |
+
|
368 |
+
$groupPrices = $product->getData('group_price');
|
369 |
+
if (empty($groupPrices)) {
|
370 |
+
$equalPriceForAllGroups = $price;
|
371 |
+
}
|
372 |
+
}
|
373 |
+
|
374 |
+
} else {
|
375 |
+
$price = $equalPriceForAllGroups;
|
376 |
}
|
377 |
+
|
378 |
$label_ = Mage::helper('searchanise/ApiSe')->getLabelForPricesUsergroup() . $customerGroup->getId();
|
379 |
$item[$label_] = $price;
|
380 |
unset($productCurrentGroup);
|
484 |
private static function _getIdAttributesValues($products, $attributeCode)
|
485 |
{
|
486 |
$values = array();
|
|
|
487 |
foreach ($products as $productKey => $product) {
|
488 |
$value = $product->getData($attributeCode);
|
489 |
if ($value == '') {
|
490 |
// Nothing.
|
491 |
} elseif (is_array($value) && empty($value)) {
|
492 |
// Nothing.
|
493 |
+
|
494 |
+
} elseif ($productKey == 0 && ($attributeCode == 'name' || $attributeCode == 'sku')) {// $productKey=0 - parent product
|
495 |
+
// Nothing. Prevent dublicate.
|
496 |
+
|
497 |
} else {
|
498 |
if (!in_array($value, $values)) {
|
499 |
$values[] = $value;
|
563 |
$isSearchable = $attribute->getIsSearchable();
|
564 |
$isVisibleInAdvancedSearch = $attribute->getIsVisibleInAdvancedSearch();
|
565 |
$usedForSortBy = $attribute->getUsedForSortBy();
|
566 |
+
$isFilterableInSearch = $attribute->getIsFilterableInSearch();
|
567 |
+
|
568 |
$attributeName = 'attribute_' . $attribute->getId();
|
569 |
|
570 |
+
$isNecessaryAttribute = $useFullFeed || $isSearchable || $isVisibleInAdvancedSearch || $usedForSortBy || $isFilterableInSearch || in_array($attributeCode, $requiredAttributes);
|
571 |
|
572 |
if (!$isNecessaryAttribute) {
|
573 |
continue;
|
577 |
// nothing
|
578 |
|
579 |
// <system_attributes>
|
580 |
+
} elseif ($attributeCode == 'price') {
|
581 |
+
// already defined in the '<cs:price>' field
|
582 |
+
|
583 |
+
} elseif ($attributeCode == 'status' || $attributeCode == 'visibility') {
|
584 |
+
$item[$attributeCode] = $value;
|
585 |
+
|
586 |
+
} elseif ($attributeCode == 'has_options') {
|
587 |
+
} elseif ($attributeCode == 'required_options') {
|
588 |
+
} elseif ($attributeCode == 'custom_layout_update') {
|
589 |
+
} elseif ($attributeCode == 'tier_price') { // quantity discount
|
590 |
+
} elseif ($attributeCode == 'image_label') {
|
591 |
+
} elseif ($attributeCode == 'small_image_label') {
|
592 |
+
} elseif ($attributeCode == 'thumbnail_label') {
|
593 |
+
} elseif ($attributeCode == 'tax_class_id') {
|
594 |
+
} elseif ($attributeCode == 'url_key') { // seo name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
595 |
// <system_attributes>
|
596 |
|
597 |
} elseif ($attributeCode == 'group_price') {
|
598 |
// nothing
|
599 |
// fixme in the future if need
|
600 |
|
601 |
+
} elseif ($attributeCode == 'short_description') {
|
602 |
+
if (!empty($value)) {// if not empty value already sent in summary
|
603 |
+
if (count($unitedValues) > 1) {
|
604 |
+
$item[$attributeCode] = array_slice($unitedValues, 1);
|
605 |
+
}
|
606 |
+
|
607 |
+
} elseif (!empty($unitedValues)) {
|
608 |
+
$item[$attributeCode] = $unitedValues;
|
609 |
+
|
610 |
+
} else {
|
611 |
+
// nothing
|
612 |
+
}
|
613 |
+
|
614 |
+
} elseif ($attributeCode == 'description') {//$product->getData('short_description')
|
615 |
+
$short_description = $product->getData('short_description');
|
616 |
+
|
617 |
+
if (!empty($short_description)) {
|
618 |
+
$item['full_description'] = $value;
|
619 |
+
}
|
620 |
+
|
621 |
+
if (count($unitedValues) > 1) {
|
622 |
+
$item['se_grouped_' . $attributeCode] = array_slice($unitedValues, 1);
|
623 |
}
|
|
|
624 |
|
625 |
} elseif (
|
|
|
626 |
$attributeCode == 'meta_title' ||
|
627 |
$attributeCode == 'meta_description' ||
|
628 |
$attributeCode == 'meta_keyword') {
|
635 |
|
636 |
} elseif ($inputType == 'select' || $inputType == 'multiselect') {
|
637 |
// <id_values>
|
638 |
+
if ($useFullFeed || $isVisibleInAdvancedSearch || $usedForSortBy || $isFilterableInSearch) {
|
639 |
+
$item[$attributeName] = $unitedValues;
|
640 |
+
}
|
641 |
|
642 |
// <text_values>
|
643 |
$unitedTextValues = self::_getProductAttributeTextValues($unitedProducts, $attributeCode, $inputType, $store);
|
690 |
$item['title'] = $product->getName();
|
691 |
|
692 |
$summary = $product->getData('short_description');
|
693 |
+
|
694 |
+
if ($summary == '') {
|
695 |
$summary = $product->getData('description');
|
696 |
}
|
697 |
+
|
698 |
$item['summary'] = $summary;
|
699 |
|
700 |
$productUrl = $product->getProductUrl(false);
|
732 |
}
|
733 |
// </image_link>
|
734 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
735 |
self::_generateProductAttributes($item, $product, $childrenProducts, $unitedProducts, $store);
|
736 |
|
737 |
// <categories>
|
814 |
|
815 |
public static function isFacet($attribute)
|
816 |
{
|
817 |
+
return $attribute->getIsFilterableInSearch();
|
|
|
|
|
|
|
818 |
}
|
819 |
|
820 |
private static function _generateFacetFromFilter($attribute, $store = null)
|
1030 |
{
|
1031 |
$items = array();
|
1032 |
|
1033 |
+
if (Mage::helper('catalog/product_flat')->isEnabled()) {
|
1034 |
+
Mage::helper('searchanise/ApiProducts')->setIsGetProductsByItems(true);//workaround for get all attributes
|
1035 |
+
Mage::getResourceModel('catalog/product_collection')->setStore($store->getId());//workaround for magento flat products table bug
|
1036 |
+
}
|
1037 |
+
|
1038 |
$products = self::getProducts($productIds, $store, null);
|
1039 |
|
1040 |
if ($products) {
|
1110 |
}
|
1111 |
|
1112 |
if ($isOnlyActive) {
|
1113 |
+
$products->addAttributeToFilter('status', array('in'=> Mage::getSingleton('catalog/product_status')->getVisibleStatusIds()));
|
|
|
1114 |
// It may require to disable "product visibility" filter if "is full feed".
|
1115 |
+
if (Mage::helper('searchanise/ApiSe')->getUseFullFeed()) {
|
1116 |
+
$products->addAttributeToFilter('visibility', array('in' => Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds()));
|
1117 |
} else {
|
1118 |
+
$products->addAttributeToFilter('visibility', array('in' => Mage::getSingleton('catalog/product_visibility')->getVisibleInSearchIds()));
|
1119 |
}
|
|
|
1120 |
}
|
1121 |
|
1122 |
$products->load();
|
1142 |
'status',
|
1143 |
'visibility',
|
1144 |
'price',
|
|
|
|
|
|
|
1145 |
);
|
1146 |
}
|
1147 |
|
1160 |
$isSearchable = $attribute->getIsSearchable();
|
1161 |
$isVisibleInAdvancedSearch = $attribute->getIsVisibleInAdvancedSearch();
|
1162 |
$usedForSortBy = $attribute->getUsedForSortBy();
|
1163 |
+
$isFilterableInSearch = $attribute->getIsFilterableInSearch();
|
1164 |
$attributeName = 'attribute_' . $attribute->getId();
|
1165 |
|
1166 |
+
$isNecessaryAttribute = $useFullFeed || $isSearchable || $isVisibleInAdvancedSearch || $usedForSortBy || $isFilterableInSearch || in_array($attributeCode, $requiredAttributes);
|
1167 |
|
1168 |
if (!$isNecessaryAttribute) {
|
1169 |
return $items;
|
1172 |
$name = $attribute->getAttributeCode();
|
1173 |
$title = $attribute->getData('frontend_label');
|
1174 |
$type = '';
|
1175 |
+
$sorting = $usedForSortBy ? 'Y' : 'N';
|
1176 |
$textSearch = $isSearchable ? 'Y' : 'N';
|
1177 |
$attributeWeight = 0;
|
1178 |
|
1184 |
} elseif ($attributeCode == 'status' || $attributeCode == 'visibility') {
|
1185 |
$type = 'text';
|
1186 |
$textSearch = 'N';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1187 |
} elseif ($attributeCode == 'has_options') {
|
1188 |
} elseif ($attributeCode == 'required_options') {
|
1189 |
} elseif ($attributeCode == 'custom_layout_update') {
|
1191 |
} elseif ($attributeCode == 'image_label') {
|
1192 |
} elseif ($attributeCode == 'small_image_label') {
|
1193 |
} elseif ($attributeCode == 'thumbnail_label') {
|
1194 |
+
} elseif ($attributeCode == 'tax_class_id') {
|
1195 |
} elseif ($attributeCode == 'url_key') { // seo name
|
1196 |
// <system_attributes>
|
1197 |
|
1222 |
}
|
1223 |
$type = 'text';
|
1224 |
if ($attributeCode == 'description') {
|
1225 |
+
$name = 'full_description';
|
1226 |
$items[] = array(
|
1227 |
'name' => 'se_grouped_' . $attributeCode,
|
1228 |
'title' => $attribute->getData('frontend_label') . ' - Grouped',
|
1241 |
'name' => $name,
|
1242 |
'title' => $title,
|
1243 |
'type' => $type,
|
1244 |
+
'sorting' => $sorting,
|
1245 |
'weight' => $isSearchable ? self::WEIGHT_SELECT_ATTRIBUTES : 0,
|
1246 |
'text_search' => $textSearch,
|
1247 |
);
|
1248 |
$name = $attributeName;
|
1249 |
$title = $title . ' - IDs';
|
1250 |
+
$sorting = 'N';
|
1251 |
$textSearch = 'N';
|
1252 |
|
1253 |
} elseif ($inputType == 'text' || $inputType == 'textarea') {
|
1277 |
'name' => $name,
|
1278 |
'title' => $title,
|
1279 |
'type' => $type,
|
1280 |
+
'sorting' => $sorting,
|
1281 |
'weight' => $attributeWeight,
|
1282 |
'text_search' => $textSearch,
|
1283 |
);
|
1402 |
'weight' => 0,
|
1403 |
'text_search' => 'N',
|
1404 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1405 |
}
|
1406 |
|
1407 |
if ($attributes = self::getProductAttributes($attributeIds, $store, $isPrice)) {
|
@@ -57,6 +57,8 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
57 |
const FL_SHOW_STATUS_ASYNC = 'show_status';
|
58 |
const FL_SHOW_STATUS_ASYNC_KEY = 'Y';
|
59 |
|
|
|
|
|
60 |
public static function getParamNotUseHttpRequest()
|
61 |
{
|
62 |
return self::NOT_USE_HTTP_REQUEST . '=' . self::NOT_USE_HTTP_REQUEST_KEY;
|
@@ -192,18 +194,6 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
192 |
{
|
193 |
return self::getStatusModule($store, $moduleName) == 'Y';
|
194 |
}
|
195 |
-
|
196 |
-
public static function setUseNavigation($value = null)
|
197 |
-
{
|
198 |
-
self::setSetting('use_navigation', $value, self::CONFIG_PREFIX);
|
199 |
-
|
200 |
-
return true;
|
201 |
-
}
|
202 |
-
|
203 |
-
public static function getUseNavigation($value = null)
|
204 |
-
{
|
205 |
-
return self::getSetting('use_navigation', self::CONFIG_PREFIX);
|
206 |
-
}
|
207 |
|
208 |
public static function setUseFullFeed($value = null)
|
209 |
{
|
@@ -243,7 +233,7 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
243 |
|
244 |
public static function getSearchaniseLink()
|
245 |
{
|
246 |
-
return 'searchanise/index';
|
247 |
}
|
248 |
|
249 |
public static function getAsyncLink($flNotUserHttpRequest = false)
|
@@ -264,17 +254,17 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
264 |
|
265 |
public static function getReSyncLink()
|
266 |
{
|
267 |
-
return 'searchanise/resync';
|
268 |
}
|
269 |
|
270 |
public static function getOptionsLink()
|
271 |
{
|
272 |
-
return 'searchanise/options';
|
273 |
}
|
274 |
|
275 |
public static function getModuleLink()
|
276 |
{
|
277 |
-
return 'searchanise/index
|
278 |
}
|
279 |
|
280 |
public static function getModuleUrl()
|
@@ -284,7 +274,7 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
284 |
|
285 |
public static function getConnectLink()
|
286 |
{
|
287 |
-
return 'searchanise/signup';
|
288 |
}
|
289 |
|
290 |
public static function getConnectUrl($flNotUserHttpRequest = false, $storeId = '', $flCheckSecure = true)
|
@@ -630,6 +620,14 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
630 |
} else {
|
631 |
$stores = Mage::app()->getStores();
|
632 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
|
634 |
return $stores;
|
635 |
}
|
@@ -638,8 +636,6 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
638 |
{
|
639 |
if (self::checkImportIsDone()) {
|
640 |
if (self::checkNotificationAsyncComleted()) {
|
641 |
-
Mage::helper('searchanise/ApiSe')->showWarningFlatTables();
|
642 |
-
|
643 |
$textNotification = Mage::helper('searchanise')->__('Catalog indexation is complete. Configure Searchanise via the <a href="%s">Admin Panel</a>.', Mage::helper('searchanise/ApiSe')->getModuleUrl());
|
644 |
|
645 |
Mage::helper('searchanise/ApiSe')->setNotification('N', Mage::helper('searchanise')->__('Searchanise'), $textNotification);
|
@@ -650,15 +646,6 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
650 |
return true;
|
651 |
}
|
652 |
|
653 |
-
public static function showWarningFlatTables()
|
654 |
-
{
|
655 |
-
if (Mage::getStoreConfigFlag(Mage_Catalog_Helper_Product_Flat::XML_PATH_USE_PRODUCT_FLAT) && count(self::getStores()) > 1) {
|
656 |
-
Mage::helper('searchanise/ApiSe')->setNotification('W', Mage::helper('searchanise')->__('Searchanise'), Mage::helper('searchanise')->__("Please disable the Use Flat Catalog Product (Configuration -> Catalog -> Frontend) setting if you have multiple store views. Otherwise, Searchanise may work incorrectly."));
|
657 |
-
}
|
658 |
-
|
659 |
-
return true;
|
660 |
-
}
|
661 |
-
|
662 |
/**
|
663 |
* Set notification message
|
664 |
*
|
@@ -705,6 +692,7 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
705 |
$client->setUri($url);
|
706 |
|
707 |
$client->setConfig(array(
|
|
|
708 |
'maxredirects' => $maxredirects,
|
709 |
'timeout' => $timeout,
|
710 |
));
|
@@ -1282,7 +1270,8 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
1282 |
|
1283 |
return $ret;
|
1284 |
}
|
1285 |
-
|
|
|
1286 |
{
|
1287 |
$i = 0;
|
1288 |
$step = 50;
|
@@ -1655,11 +1644,10 @@ class Simtech_Searchanise_Helper_ApiSe
|
|
1655 |
} elseif (is_array($data) && !empty($data['errors'])) {
|
1656 |
foreach ($data['errors'] as $e) {
|
1657 |
if ($showNotification == true) {
|
1658 |
-
self::setNotification('E', Mage::helper('searchanise')->__('Error'), 'Searchanise:
|
1659 |
}
|
1660 |
-
self::log('parseResponse : ' . $e->getMessage());
|
1661 |
}
|
1662 |
-
|
1663 |
$result = false;
|
1664 |
} elseif ($data === 'ok') {
|
1665 |
$result = true;
|
57 |
const FL_SHOW_STATUS_ASYNC = 'show_status';
|
58 |
const FL_SHOW_STATUS_ASYNC_KEY = 'Y';
|
59 |
|
60 |
+
public static $seStoreIds = array();
|
61 |
+
|
62 |
public static function getParamNotUseHttpRequest()
|
63 |
{
|
64 |
return self::NOT_USE_HTTP_REQUEST . '=' . self::NOT_USE_HTTP_REQUEST_KEY;
|
194 |
{
|
195 |
return self::getStatusModule($store, $moduleName) == 'Y';
|
196 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
198 |
public static function setUseFullFeed($value = null)
|
199 |
{
|
233 |
|
234 |
public static function getSearchaniseLink()
|
235 |
{
|
236 |
+
return 'adminhtml/searchanise/index';
|
237 |
}
|
238 |
|
239 |
public static function getAsyncLink($flNotUserHttpRequest = false)
|
254 |
|
255 |
public static function getReSyncLink()
|
256 |
{
|
257 |
+
return 'adminhtml/searchanise/resync';
|
258 |
}
|
259 |
|
260 |
public static function getOptionsLink()
|
261 |
{
|
262 |
+
return 'adminhtml/searchanise/options';
|
263 |
}
|
264 |
|
265 |
public static function getModuleLink()
|
266 |
{
|
267 |
+
return 'adminhtml/searchanise/index';
|
268 |
}
|
269 |
|
270 |
public static function getModuleUrl()
|
274 |
|
275 |
public static function getConnectLink()
|
276 |
{
|
277 |
+
return 'adminhtml/searchanise/signup';
|
278 |
}
|
279 |
|
280 |
public static function getConnectUrl($flNotUserHttpRequest = false, $storeId = '', $flCheckSecure = true)
|
620 |
} else {
|
621 |
$stores = Mage::app()->getStores();
|
622 |
}
|
623 |
+
|
624 |
+
if (!empty(self::$seStoreIds)) {
|
625 |
+
foreach ($stores as $key => $store) {
|
626 |
+
if (!in_array($store->getId(), self::$seStoreIds)) {
|
627 |
+
unset($stores[$key]);
|
628 |
+
}
|
629 |
+
}
|
630 |
+
}
|
631 |
|
632 |
return $stores;
|
633 |
}
|
636 |
{
|
637 |
if (self::checkImportIsDone()) {
|
638 |
if (self::checkNotificationAsyncComleted()) {
|
|
|
|
|
639 |
$textNotification = Mage::helper('searchanise')->__('Catalog indexation is complete. Configure Searchanise via the <a href="%s">Admin Panel</a>.', Mage::helper('searchanise/ApiSe')->getModuleUrl());
|
640 |
|
641 |
Mage::helper('searchanise/ApiSe')->setNotification('N', Mage::helper('searchanise')->__('Searchanise'), $textNotification);
|
646 |
return true;
|
647 |
}
|
648 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
649 |
/**
|
650 |
* Set notification message
|
651 |
*
|
692 |
$client->setUri($url);
|
693 |
|
694 |
$client->setConfig(array(
|
695 |
+
'httpversion' => Zend_Http_Client::HTTP_0,
|
696 |
'maxredirects' => $maxredirects,
|
697 |
'timeout' => $timeout,
|
698 |
));
|
1270 |
|
1271 |
return $ret;
|
1272 |
}
|
1273 |
+
|
1274 |
+
public static function _addTaskByChunk($store, $action = Simtech_Searchanise_Model_Queue::ACT_UPDATE_PRODUCTS, $isOnlyActive = false)
|
1275 |
{
|
1276 |
$i = 0;
|
1277 |
$step = 50;
|
1644 |
} elseif (is_array($data) && !empty($data['errors'])) {
|
1645 |
foreach ($data['errors'] as $e) {
|
1646 |
if ($showNotification == true) {
|
1647 |
+
self::setNotification('E', Mage::helper('searchanise')->__('Error'), 'Searchanise: ' . $e);
|
1648 |
}
|
|
|
1649 |
}
|
1650 |
+
|
1651 |
$result = false;
|
1652 |
} elseif ($data === 'ok') {
|
1653 |
$result = true;
|
@@ -24,8 +24,6 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
24 |
|
25 |
const TEXT_FIND = 'TEXT_FIND';
|
26 |
const TEXT_ADVANCED_FIND = 'TEXT_ADVANCED_FIND';
|
27 |
-
const VIEW_CATEGORY = 'VIEW_CATEGORY';
|
28 |
-
const VIEW_TAG = 'VIEW_TAG';
|
29 |
|
30 |
protected $_disableText;
|
31 |
protected $_debugText;
|
@@ -33,8 +31,6 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
33 |
protected static $_searchaniseTypes = array(
|
34 |
self::TEXT_FIND,
|
35 |
self::TEXT_ADVANCED_FIND,
|
36 |
-
self::VIEW_CATEGORY,
|
37 |
-
self::VIEW_TAG,
|
38 |
);
|
39 |
|
40 |
/**
|
@@ -136,33 +132,25 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
136 |
$params = array();
|
137 |
}
|
138 |
|
139 |
-
if (
|
140 |
-
|
141 |
-
|
142 |
-
$params['sortOrder'] = 'desc';
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
}
|
156 |
|
157 |
-
|
158 |
-
|
159 |
-
}
|
160 |
-
if (empty($params['queryBy'])) {
|
161 |
-
$params['queryBy'] = array();
|
162 |
-
}
|
163 |
-
if (empty($params['union'])) {
|
164 |
-
$params['union'] = array();
|
165 |
-
}
|
166 |
}
|
167 |
|
168 |
return $this;
|
@@ -188,15 +176,8 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
188 |
$check = false;
|
189 |
|
190 |
$type = $this->getSearchaniseCurentType();
|
191 |
-
|
192 |
if ($type) {
|
193 |
-
|
194 |
-
$check = true;
|
195 |
-
} else {
|
196 |
-
if (($type == self::TEXT_FIND) || ($type == self::TEXT_ADVANCED_FIND)) {
|
197 |
-
$check = true;
|
198 |
-
}
|
199 |
-
}
|
200 |
}
|
201 |
|
202 |
return $check;
|
@@ -208,12 +189,7 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
208 |
if ((!$this->checkEnabled()) || (!Mage::helper('searchanise/ApiSe')->getEnabledSearchaniseSearch())) {
|
209 |
return;
|
210 |
}
|
211 |
-
|
212 |
-
if (!Mage::helper('searchanise/ApiSe')->getUseNavigation()) {
|
213 |
-
if (($type != self::TEXT_FIND) && ($type != self::TEXT_ADVANCED_FIND)) {
|
214 |
-
return;
|
215 |
-
}
|
216 |
-
}
|
217 |
$this->setSearchaniseCurentType($type);
|
218 |
if (empty($params)) {
|
219 |
$params = array();
|
@@ -232,89 +208,63 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
232 |
$params['restrictBy']['is_in_stock'] = '1';
|
233 |
}
|
234 |
|
235 |
-
if (
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
}
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
$params['restrictBy']['visibility'] = '3|4';
|
248 |
-
$minQuantityDecimals = Mage::helper('searchanise/ApiSe')->getMinQuantityDecimals();
|
249 |
-
if (!empty($minQuantityDecimals)) {
|
250 |
-
$params['restrictBy']['quantity_decimals'] = $minQuantityDecimals . ',';
|
251 |
-
}
|
252 |
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
$params['
|
257 |
-
|
258 |
-
$params['restrictBy']['visibility'] = '3|4';
|
259 |
-
$minQuantityDecimals = Mage::helper('searchanise/ApiSe')->getMinQuantityDecimals();
|
260 |
-
if (!empty($minQuantityDecimals)) {
|
261 |
-
$params['restrictBy']['quantity_decimals'] = $minQuantityDecimals . ',';
|
262 |
-
}
|
263 |
-
|
264 |
-
} elseif ($type == self::VIEW_CATEGORY) {
|
265 |
-
// fixme in the future
|
266 |
-
// need to add check to display block "Layered Navigation"
|
267 |
-
if (true) {
|
268 |
-
$params['facets'] = 'true';
|
269 |
-
|
270 |
-
} else {
|
271 |
-
$params['facets'] = 'false';
|
272 |
-
}
|
273 |
-
|
274 |
-
$params['suggestions'] = 'false';
|
275 |
-
$params['restrictBy']['visibility'] = '2|4';
|
276 |
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
|
|
|
|
|
|
|
|
282 |
}
|
283 |
}
|
284 |
|
285 |
if ((!empty($controller)) && (!empty($blockToolbar))) {
|
286 |
if ($availableOrders = $blockToolbar->getAvailableOrders()) {
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
$fl_change_orders = true;
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
if ($type == self::TEXT_FIND) {
|
298 |
-
if (!isset($availableOrders['relevance'])) {
|
299 |
-
$fl_change_orders = true;
|
300 |
-
$availableOrders = array_merge(
|
301 |
-
array('relevance' => $controller->__('Relevance')),
|
302 |
-
$availableOrders
|
303 |
-
);
|
304 |
-
}
|
305 |
-
} elseif ($type == self::TEXT_ADVANCED_FIND) {
|
306 |
-
// Nothing.
|
307 |
-
} elseif ($type == self::VIEW_CATEGORY) {
|
308 |
-
// Nothing.
|
309 |
-
} elseif ($type == self::VIEW_TAG) {
|
310 |
-
// Nothing.
|
311 |
-
}
|
312 |
-
if ($fl_change_orders) {
|
313 |
-
$blockToolbar->setAvailableOrders($availableOrders);
|
314 |
-
// If it changed orders then necessary set new default order and default direction.
|
315 |
-
$blockToolbar->setDefaultOrder($params['sortBy']);
|
316 |
-
$blockToolbar->setDefaultDirection($params['sortOrder']);
|
317 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
}
|
319 |
}
|
320 |
|
@@ -325,18 +275,19 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
325 |
$startIndex = 0;
|
326 |
$curPage = (int) $blockToolbar->getCurrentPage();
|
327 |
$startIndex = $curPage > 1 ? ($curPage - 1) * $maxResults : 0;
|
328 |
-
|
329 |
if ($maxResults) {
|
330 |
$params['maxResults'] = $maxResults;
|
331 |
}
|
|
|
332 |
if ($startIndex) {
|
333 |
$params['startIndex'] = $startIndex;
|
334 |
}
|
335 |
-
|
336 |
if ($sortBy) {
|
337 |
$params['sortBy'] = $sortBy;
|
338 |
}
|
339 |
-
|
340 |
if ($sortOrder) {
|
341 |
$params['sortOrder'] = $sortOrder;
|
342 |
}
|
@@ -344,7 +295,7 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
344 |
// Fixme in the future
|
345 |
// Need add check the 'sort By' parameter on the existence of Server.
|
346 |
// $params['sortBy']
|
347 |
-
|
348 |
//ADD FACETS
|
349 |
$arrAttributes = array();
|
350 |
$arrInputType = array(); // need for save type $arrAttributes
|
@@ -352,33 +303,27 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
352 |
// CATEGORIES
|
353 |
{
|
354 |
$arrCat = null;
|
355 |
-
|
356 |
-
if ((
|
357 |
-
$
|
358 |
-
|
359 |
-
|
360 |
-
|
|
|
|
|
|
|
|
|
|
|
361 |
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
->load()
|
367 |
-
;
|
368 |
-
|
369 |
-
if (!empty($categories)) {
|
370 |
-
foreach ($categories as $cat) {
|
371 |
-
if (!empty($cat)) {
|
372 |
-
$arrCat = $cat->getAllChildren(true);
|
373 |
-
}
|
374 |
}
|
375 |
}
|
376 |
-
} elseif (($type == self::VIEW_CATEGORY) && (!empty($data))) {
|
377 |
-
// data = category
|
378 |
-
$arrCat = $data->getAllChildren(true);
|
379 |
}
|
380 |
}
|
381 |
-
|
382 |
if (!empty($arrCat)) {
|
383 |
if (is_array($arrCat)) {
|
384 |
$params['restrictBy']['category_ids'] = implode('|', $arrCat);
|
@@ -452,21 +397,12 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
452 |
}
|
453 |
}
|
454 |
}
|
455 |
-
// TAGS
|
456 |
-
if ((in_array($type, self::$_searchaniseTypes)) && ($type == self::VIEW_TAG)) {
|
457 |
-
if ($data) {
|
458 |
-
// data = tag
|
459 |
-
$params['restrictBy']['tag_ids'] = $data->getId();
|
460 |
-
}
|
461 |
-
}
|
462 |
}
|
463 |
|
464 |
-
if (
|
465 |
-
|
466 |
-
return;
|
467 |
-
}
|
468 |
}
|
469 |
-
|
470 |
Mage::helper('searchanise')
|
471 |
->initSearchaniseRequest()
|
472 |
->getSearchaniseRequest()
|
@@ -477,7 +413,7 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
477 |
|
478 |
//add suggestions
|
479 |
$suggestionsMaxResults = Mage::helper('searchanise/ApiSe')->getSuggestionsMaxResults();
|
480 |
-
if (
|
481 |
$res = Mage::helper('searchanise')->getSearchaniseRequest();
|
482 |
|
483 |
if ($res->getTotalProduct() == 0) {
|
24 |
|
25 |
const TEXT_FIND = 'TEXT_FIND';
|
26 |
const TEXT_ADVANCED_FIND = 'TEXT_ADVANCED_FIND';
|
|
|
|
|
27 |
|
28 |
protected $_disableText;
|
29 |
protected $_debugText;
|
31 |
protected static $_searchaniseTypes = array(
|
32 |
self::TEXT_FIND,
|
33 |
self::TEXT_ADVANCED_FIND,
|
|
|
|
|
34 |
);
|
35 |
|
36 |
/**
|
132 |
$params = array();
|
133 |
}
|
134 |
|
135 |
+
if ($type == self::TEXT_FIND) {
|
136 |
+
$params['sortBy'] = 'relevance';
|
137 |
+
$params['sortOrder'] = 'desc';
|
|
|
138 |
|
139 |
+
} elseif ($type == self::TEXT_ADVANCED_FIND) {
|
140 |
+
$params['sortBy'] = 'name';
|
141 |
+
$params['sortOrder'] = 'asc';
|
142 |
+
}
|
143 |
|
144 |
+
if (empty($params['restrictBy'])) {
|
145 |
+
$params['restrictBy'] = array();
|
146 |
+
}
|
147 |
|
148 |
+
if (empty($params['queryBy'])) {
|
149 |
+
$params['queryBy'] = array();
|
150 |
+
}
|
|
|
151 |
|
152 |
+
if (empty($params['union'])) {
|
153 |
+
$params['union'] = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
}
|
155 |
|
156 |
return $this;
|
176 |
$check = false;
|
177 |
|
178 |
$type = $this->getSearchaniseCurentType();
|
|
|
179 |
if ($type) {
|
180 |
+
$check = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
}
|
182 |
|
183 |
return $check;
|
189 |
if ((!$this->checkEnabled()) || (!Mage::helper('searchanise/ApiSe')->getEnabledSearchaniseSearch())) {
|
190 |
return;
|
191 |
}
|
192 |
+
|
|
|
|
|
|
|
|
|
|
|
193 |
$this->setSearchaniseCurentType($type);
|
194 |
if (empty($params)) {
|
195 |
$params = array();
|
208 |
$params['restrictBy']['is_in_stock'] = '1';
|
209 |
}
|
210 |
|
211 |
+
if ($type == self::TEXT_FIND) {
|
212 |
+
$params['q'] = Mage::helper('catalogsearch')->getQueryText();
|
213 |
+
if ($params['q'] != '') {
|
214 |
+
$params['q'] = strtolower(trim($params['q']));
|
215 |
+
}
|
|
|
216 |
|
217 |
+
$params['facets'] = 'true';
|
218 |
+
$params['suggestions'] = 'true';
|
219 |
+
$params['query_correction'] = 'false';
|
220 |
+
$params['suggestionsMaxResults'] = Mage::helper('searchanise/ApiSe')->getSuggestionsMaxResults();
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
+
$params['restrictBy']['visibility'] = '3|4';
|
223 |
+
$minQuantityDecimals = Mage::helper('searchanise/ApiSe')->getMinQuantityDecimals();
|
224 |
+
if (!empty($minQuantityDecimals)) {
|
225 |
+
$params['restrictBy']['quantity_decimals'] = $minQuantityDecimals . ',';
|
226 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
+
} elseif ($type == self::TEXT_ADVANCED_FIND) {
|
229 |
+
$params['facets'] = 'false';
|
230 |
+
$params['suggestions'] = 'false';
|
231 |
+
$params['query_correction'] = 'false';
|
232 |
+
|
233 |
+
$params['restrictBy']['visibility'] = '3|4';
|
234 |
+
$minQuantityDecimals = Mage::helper('searchanise/ApiSe')->getMinQuantityDecimals();
|
235 |
+
if (!empty($minQuantityDecimals)) {
|
236 |
+
$params['restrictBy']['quantity_decimals'] = $minQuantityDecimals . ',';
|
237 |
}
|
238 |
}
|
239 |
|
240 |
if ((!empty($controller)) && (!empty($blockToolbar))) {
|
241 |
if ($availableOrders = $blockToolbar->getAvailableOrders()) {
|
242 |
+
$fl_change_orders = false;
|
243 |
+
// Fixme in the feature:
|
244 |
+
// products could have different position in different categories, sort by "position" disabled.
|
245 |
+
if (isset($availableOrders['position'])) {
|
246 |
+
$fl_change_orders = true;
|
247 |
+
unset($availableOrders['position']);
|
248 |
+
}
|
249 |
+
// end
|
250 |
+
|
251 |
+
if ($type == self::TEXT_FIND) {
|
252 |
+
if (!isset($availableOrders['relevance'])) {
|
253 |
$fl_change_orders = true;
|
254 |
+
$availableOrders = array_merge(
|
255 |
+
array('relevance' => $controller->__('Relevance')),
|
256 |
+
$availableOrders
|
257 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
}
|
259 |
+
} elseif ($type == self::TEXT_ADVANCED_FIND) {
|
260 |
+
// Nothing.
|
261 |
+
}
|
262 |
+
|
263 |
+
if ($fl_change_orders) {
|
264 |
+
$blockToolbar->setAvailableOrders($availableOrders);
|
265 |
+
// If it changed orders then necessary set new default order and default direction.
|
266 |
+
$blockToolbar->setDefaultOrder($params['sortBy']);
|
267 |
+
$blockToolbar->setDefaultDirection($params['sortOrder']);
|
268 |
}
|
269 |
}
|
270 |
|
275 |
$startIndex = 0;
|
276 |
$curPage = (int) $blockToolbar->getCurrentPage();
|
277 |
$startIndex = $curPage > 1 ? ($curPage - 1) * $maxResults : 0;
|
278 |
+
|
279 |
if ($maxResults) {
|
280 |
$params['maxResults'] = $maxResults;
|
281 |
}
|
282 |
+
|
283 |
if ($startIndex) {
|
284 |
$params['startIndex'] = $startIndex;
|
285 |
}
|
286 |
+
|
287 |
if ($sortBy) {
|
288 |
$params['sortBy'] = $sortBy;
|
289 |
}
|
290 |
+
|
291 |
if ($sortOrder) {
|
292 |
$params['sortOrder'] = $sortOrder;
|
293 |
}
|
295 |
// Fixme in the future
|
296 |
// Need add check the 'sort By' parameter on the existence of Server.
|
297 |
// $params['sortBy']
|
298 |
+
|
299 |
//ADD FACETS
|
300 |
$arrAttributes = array();
|
301 |
$arrInputType = array(); // need for save type $arrAttributes
|
303 |
// CATEGORIES
|
304 |
{
|
305 |
$arrCat = null;
|
306 |
+
$cat_id = (int) $controller->getRequest()->getParam('cat');
|
307 |
+
if (!empty($cat_id)) {
|
308 |
+
$arrCat = array();
|
309 |
+
$arrCat[] = $cat_id; // need if not exist children categories
|
310 |
+
|
311 |
+
$categories = Mage::getModel('catalog/category')
|
312 |
+
->getCollection()
|
313 |
+
->setStoreId(Mage::app()->getStore()->getId())
|
314 |
+
->addFieldToFilter('entity_id', $cat_id)
|
315 |
+
->load()
|
316 |
+
;
|
317 |
|
318 |
+
if (!empty($categories)) {
|
319 |
+
foreach ($categories as $cat) {
|
320 |
+
if (!empty($cat)) {
|
321 |
+
$arrCat = $cat->getAllChildren(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
}
|
323 |
}
|
|
|
|
|
|
|
324 |
}
|
325 |
}
|
326 |
+
|
327 |
if (!empty($arrCat)) {
|
328 |
if (is_array($arrCat)) {
|
329 |
$params['restrictBy']['category_ids'] = implode('|', $arrCat);
|
397 |
}
|
398 |
}
|
399 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
}
|
401 |
|
402 |
+
if (empty($params['queryBy']) && (!isset($params['q']) || $params['q'] == '')) {
|
403 |
+
return;
|
|
|
|
|
404 |
}
|
405 |
+
|
406 |
Mage::helper('searchanise')
|
407 |
->initSearchaniseRequest()
|
408 |
->getSearchaniseRequest()
|
413 |
|
414 |
//add suggestions
|
415 |
$suggestionsMaxResults = Mage::helper('searchanise/ApiSe')->getSuggestionsMaxResults();
|
416 |
+
if (!empty($suggestionsMaxResults) && $type == self::TEXT_FIND) {
|
417 |
$res = Mage::helper('searchanise')->getSearchaniseRequest();
|
418 |
|
419 |
if ($res->getTotalProduct() == 0) {
|
@@ -34,37 +34,4 @@ class Simtech_Searchanise_Model_Advanced extends Mage_CatalogSearch_Model_Advanc
|
|
34 |
|
35 |
return $this;
|
36 |
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Prepare product collection
|
40 |
-
*
|
41 |
-
* @param Mage_CatalogSearch_Model_Resource_Advanced_Collection $collection
|
42 |
-
* @return Mage_Catalog_Model_Layer
|
43 |
-
*/
|
44 |
-
public function prepareProductCollection($collection)
|
45 |
-
{
|
46 |
-
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
47 |
-
return parent::prepareProductCollection($collection);
|
48 |
-
}
|
49 |
-
|
50 |
-
if (method_exists($collection, 'setSearchaniseRequest')) {
|
51 |
-
$collection->setSearchaniseRequest(Mage::helper('searchanise')->getSearchaniseRequest());
|
52 |
-
}
|
53 |
-
|
54 |
-
if (!$collection && !method_exists($collection, 'checkSearchaniseResult') || !$collection->checkSearchaniseResult()) {
|
55 |
-
return parent::prepareProductCollection($collection);
|
56 |
-
}
|
57 |
-
|
58 |
-
$collection->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
|
59 |
-
->addSearchaniseFilter()
|
60 |
-
->setStore(Mage::app()->getStore())
|
61 |
-
->addMinimalPrice()
|
62 |
-
->addTaxPercents()
|
63 |
-
->addStoreFilter();
|
64 |
-
|
65 |
-
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
66 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
|
67 |
-
|
68 |
-
return $this;
|
69 |
-
}
|
70 |
}
|
34 |
|
35 |
return $this;
|
36 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
@@ -1,52 +0,0 @@
|
|
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 |
-
class Simtech_Searchanise_Model_Layer extends Mage_Catalog_Model_Layer
|
16 |
-
{
|
17 |
-
/**
|
18 |
-
* Prepare product collection
|
19 |
-
*
|
20 |
-
* @param Mage_Catalog_Model_Resource_Eav_Resource_Product_Collection $collection
|
21 |
-
* @return Mage_Catalog_Model_Layer
|
22 |
-
*/
|
23 |
-
public function prepareProductCollection($collection)
|
24 |
-
{
|
25 |
-
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
26 |
-
return parent::prepareProductCollection($collection);
|
27 |
-
}
|
28 |
-
|
29 |
-
if (method_exists($collection, 'setSearchaniseRequest')) {
|
30 |
-
$collection->setSearchaniseRequest(Mage::helper('searchanise')->getSearchaniseRequest());
|
31 |
-
}
|
32 |
-
|
33 |
-
if ((!method_exists($collection, 'checkSearchaniseResult')) || (!$collection->checkSearchaniseResult())) {
|
34 |
-
return parent::prepareProductCollection($collection);
|
35 |
-
}
|
36 |
-
|
37 |
-
$collection
|
38 |
-
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
|
39 |
-
->addSearchaniseFilter()
|
40 |
-
->addMinimalPrice()
|
41 |
-
->addFinalPrice()
|
42 |
-
->addTaxPercents()
|
43 |
-
//->addStoreFilter()
|
44 |
-
->addUrlRewrite($this->getCurrentCategory()->getId());
|
45 |
-
|
46 |
-
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
47 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
|
48 |
-
|
49 |
-
return $this;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,52 +0,0 @@
|
|
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 |
-
class Simtech_Searchanise_Model_LayerCatalogSearch extends Mage_CatalogSearch_Model_Layer
|
16 |
-
{
|
17 |
-
/**
|
18 |
-
* Prepare product collection
|
19 |
-
*
|
20 |
-
* @param Mage_Catalog_Model_Resource_Product_Collection [v1.6] [v1.7] [v1.8] [v1.9], Mage_Catalog_Model_Mysql4_Product_Collection [v1.5] $collection
|
21 |
-
* @return Mage_Catalog_Model_Layer
|
22 |
-
*/
|
23 |
-
public function prepareProductCollection($collection)
|
24 |
-
{
|
25 |
-
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
26 |
-
return parent::prepareProductCollection($collection);
|
27 |
-
}
|
28 |
-
|
29 |
-
if (method_exists($collection, 'setSearchaniseRequest')) {
|
30 |
-
$collection->setSearchaniseRequest(Mage::helper('searchanise')->getSearchaniseRequest());
|
31 |
-
}
|
32 |
-
|
33 |
-
if ((!method_exists($collection, 'checkSearchaniseResult')) || (!$collection->checkSearchaniseResult())) {
|
34 |
-
return parent::prepareProductCollection($collection);
|
35 |
-
}
|
36 |
-
|
37 |
-
$collection
|
38 |
-
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
|
39 |
-
->addSearchaniseFilter()
|
40 |
-
->setStore(Mage::app()->getStore())
|
41 |
-
->addMinimalPrice()
|
42 |
-
->addFinalPrice()
|
43 |
-
->addTaxPercents()
|
44 |
-
->addStoreFilter()
|
45 |
-
->addUrlRewrite();
|
46 |
-
|
47 |
-
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
48 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
|
49 |
-
|
50 |
-
return $this;
|
51 |
-
}
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,104 +0,0 @@
|
|
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_Mysql4_Product_CollectionTag extends Mage_Tag_Model_Mysql4_Product_Collection
|
17 |
-
{
|
18 |
-
/**
|
19 |
-
* Product Collection
|
20 |
-
*
|
21 |
-
* @var Mage_Catalog_Model_Resource_Collection [v1.6] [v1.7] [v1.8] [v1.9], Mage_Catalog_Model_Mysql4_Collection [v1.5]
|
22 |
-
*/
|
23 |
-
protected $_searchaniseCollection = null;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Initialize resource
|
27 |
-
* @return Simtech_Searchanise_Model_Mysql4_Product_CollectionSearhanise
|
28 |
-
*/
|
29 |
-
protected function _construct()
|
30 |
-
{
|
31 |
-
parent::_construct();
|
32 |
-
$this->_searchaniseCollection = Mage::getModel('searchanise/searchanise');
|
33 |
-
$this->_searchaniseCollection->setCollection($this);
|
34 |
-
}
|
35 |
-
|
36 |
-
public function initSearchaniseRequest()
|
37 |
-
{
|
38 |
-
return $this->_searchaniseCollection->initSearchaniseRequest();
|
39 |
-
}
|
40 |
-
|
41 |
-
public function checkSearchaniseResult()
|
42 |
-
{
|
43 |
-
return $this->_searchaniseCollection->checkSearchaniseResult();
|
44 |
-
}
|
45 |
-
|
46 |
-
public function setSearchaniseRequest($request)
|
47 |
-
{
|
48 |
-
return $this->_searchaniseCollection->setSearchaniseRequest($request);
|
49 |
-
}
|
50 |
-
|
51 |
-
public function getSearchaniseRequest()
|
52 |
-
{
|
53 |
-
return $this->_searchaniseCollection->getSearchaniseRequest();
|
54 |
-
}
|
55 |
-
|
56 |
-
public function addSearchaniseFilter()
|
57 |
-
{
|
58 |
-
return $this->_searchaniseCollection->addSearchaniseFilter();
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Set Order field
|
63 |
-
*
|
64 |
-
* @param string $attribute
|
65 |
-
* @param string $dir
|
66 |
-
* @return Mage_Catalog_Model_Resource_Collection [v1.6] [v1.7] [v1.8] [v1.9], Mage_Catalog_Model_Mysql4_Collection [v1.5]
|
67 |
-
*/
|
68 |
-
public function setOrder($attribute, $dir = 'desc')
|
69 |
-
{
|
70 |
-
return $this->_searchaniseCollection->setOrder($attribute, $dir);
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Set Order field
|
75 |
-
*
|
76 |
-
* @param string $attribute
|
77 |
-
* @param string $dir
|
78 |
-
* @return Mage_Catalog_Model_Resource_Collection [v1.6] [v1.7] [v1.8] [v1.9], Mage_Catalog_Model_Mysql4_Collection [v1.5]
|
79 |
-
*/
|
80 |
-
public function setOrderParent($attribute, $dir = 'desc')
|
81 |
-
{
|
82 |
-
return parent::setOrder($attribute, $dir);
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Retrieve collection last page number
|
87 |
-
*
|
88 |
-
* @return int
|
89 |
-
*/
|
90 |
-
public function getLastPageNumber()
|
91 |
-
{
|
92 |
-
return $this->_searchaniseCollection->getLastPageNumber();
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Retrieve collection last page number
|
97 |
-
*
|
98 |
-
* @return int
|
99 |
-
*/
|
100 |
-
public function getLastPageNumberParent()
|
101 |
-
{
|
102 |
-
return parent::getLastPageNumber();
|
103 |
-
}
|
104 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -736,4 +736,71 @@ class Simtech_Searchanise_Model_Observer
|
|
736 |
|
737 |
return $this;
|
738 |
}
|
739 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
736 |
|
737 |
return $this;
|
738 |
}
|
739 |
+
|
740 |
+
/**
|
741 |
+
* Before catalogSearchResultIndex dispatch
|
742 |
+
*
|
743 |
+
* @param Varien_Event_Observer $observer
|
744 |
+
* @return Mage_CatalogIndex_Model_Observer
|
745 |
+
*/
|
746 |
+
public function controllerActionPredispatchCatalogSearchResultIndex(Varien_Event_Observer $observer)
|
747 |
+
{
|
748 |
+
$data = $observer->getData();
|
749 |
+
$controller = $data['controller_action'];
|
750 |
+
|
751 |
+
$defaultToolbarBlock = 'catalog/product_list_toolbar';
|
752 |
+
|
753 |
+
if (Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
754 |
+
|
755 |
+
$query = Mage::helper('catalogsearch')->getQuery();
|
756 |
+
|
757 |
+
$query->setStoreId(Mage::app()->getStore()->getId());
|
758 |
+
|
759 |
+
if ($query->getQueryText() != '') {
|
760 |
+
if (Mage::helper('searchanise')->checkEnabled()) {
|
761 |
+
$blockToolbar = $controller->getLayout()->getBlock('product_list_toolbar');
|
762 |
+
if (!$blockToolbar) {
|
763 |
+
$blockToolbar = $controller->getLayout()->createBlock($defaultToolbarBlock, microtime());
|
764 |
+
}
|
765 |
+
|
766 |
+
Mage::helper('searchanise')->execute(Simtech_Searchanise_Helper_Data::TEXT_FIND, $controller, $blockToolbar, $query);
|
767 |
+
}
|
768 |
+
}
|
769 |
+
}
|
770 |
+
|
771 |
+
return $this;
|
772 |
+
}
|
773 |
+
|
774 |
+
/**
|
775 |
+
* Before catalogSerachAdvancedResult dispatch
|
776 |
+
*
|
777 |
+
* @param Varien_Event_Observer $observer
|
778 |
+
* @return Mage_CatalogIndex_Model_Observer
|
779 |
+
*/
|
780 |
+
public function controllerActionPredispatchCatalogSearchAdvancedResult(Varien_Event_Observer $observer)
|
781 |
+
{
|
782 |
+
$data = $observer->getData();
|
783 |
+
$controller = $data['controller_action'];
|
784 |
+
|
785 |
+
$default_toolbar_block = 'catalog/product_list_toolbar';
|
786 |
+
|
787 |
+
if (Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
788 |
+
|
789 |
+
try {
|
790 |
+
$query = $controller->getRequest()->getQuery();
|
791 |
+
} catch (Mage_Core_Exception $e) {
|
792 |
+
return $this;
|
793 |
+
}
|
794 |
+
|
795 |
+
if ($query) {
|
796 |
+
if (Mage::helper('searchanise')->checkEnabled()) {
|
797 |
+
$block_toolbar = $controller->getLayout()->createBlock($default_toolbar_block, microtime());
|
798 |
+
|
799 |
+
Mage::helper('searchanise')->execute(Simtech_Searchanise_Helper_Data::TEXT_ADVANCED_FIND, $controller, $block_toolbar, $query);
|
800 |
+
}
|
801 |
+
}
|
802 |
+
}
|
803 |
+
|
804 |
+
return $this;
|
805 |
+
}
|
806 |
+
}
|
@@ -275,7 +275,7 @@ class Simtech_Searchanise_Model_Request extends Mage_Core_Model_Abstract
|
|
275 |
$query = Mage::helper('searchanise/ApiSe')->buildQuery($this->getSearchParams());
|
276 |
$this->setSearchParam('api_key', $this->getApiKey());
|
277 |
if (Mage::helper('searchanise')->checkDebug()) {
|
278 |
-
Mage::helper('searchanise/ApiSe')->printR($this->getSearchParamsStr());
|
279 |
Mage::helper('searchanise/ApiSe')->printR($this->getSearchParams());
|
280 |
}
|
281 |
|
@@ -334,8 +334,6 @@ class Simtech_Searchanise_Model_Request extends Mage_Core_Model_Abstract
|
|
334 |
// nothing
|
335 |
} elseif ($result['error'] == 'NEED_RESYNC_YOUR_CATALOG') {
|
336 |
Mage::helper('searchanise/ApiSe')->queueImport($this->getStore(), false);
|
337 |
-
} elseif ($result['error'] == 'NAVIGATION_DISABLED') {
|
338 |
-
Mage::helper('searchanise/ApiSe')->setUseNavigation(false);
|
339 |
} elseif ($result['error'] == 'FULL_FEED_DISABLED') {
|
340 |
Mage::helper('searchanise/ApiSe')->setUseFullFeed(false);
|
341 |
}
|
@@ -350,7 +348,7 @@ class Simtech_Searchanise_Model_Request extends Mage_Core_Model_Abstract
|
|
350 |
}
|
351 |
|
352 |
$this->setSearchResult($result);
|
353 |
-
|
354 |
return $this;
|
355 |
}
|
356 |
|
275 |
$query = Mage::helper('searchanise/ApiSe')->buildQuery($this->getSearchParams());
|
276 |
$this->setSearchParam('api_key', $this->getApiKey());
|
277 |
if (Mage::helper('searchanise')->checkDebug()) {
|
278 |
+
Mage::helper('searchanise/ApiSe')->printR(Mage::helper('searchanise/ApiSe')->getServiceUrl() . '/search?api_key=' . $this->getApiKey() . $this->getSearchParamsStr());
|
279 |
Mage::helper('searchanise/ApiSe')->printR($this->getSearchParams());
|
280 |
}
|
281 |
|
334 |
// nothing
|
335 |
} elseif ($result['error'] == 'NEED_RESYNC_YOUR_CATALOG') {
|
336 |
Mage::helper('searchanise/ApiSe')->queueImport($this->getStore(), false);
|
|
|
|
|
337 |
} elseif ($result['error'] == 'FULL_FEED_DISABLED') {
|
338 |
Mage::helper('searchanise/ApiSe')->setUseFullFeed(false);
|
339 |
}
|
348 |
}
|
349 |
|
350 |
$this->setSearchResult($result);
|
351 |
+
|
352 |
return $this;
|
353 |
}
|
354 |
|
@@ -33,6 +33,18 @@ class Simtech_Searchanise_Model_Resource_Advanced_Collection extends Mage_Catalo
|
|
33 |
$this->_searchaniseCollection->setCollection($this);
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
public function initSearchaniseRequest()
|
37 |
{
|
38 |
return $this->_searchaniseCollection->initSearchaniseRequest();
|
33 |
$this->_searchaniseCollection->setCollection($this);
|
34 |
}
|
35 |
|
36 |
+
public function __construct($resource = null, array $args = array())
|
37 |
+
{
|
38 |
+
parent::__construct($resource, $args);
|
39 |
+
|
40 |
+
if (Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
41 |
+
$this->setSearchaniseRequest(Mage::helper('searchanise')->getSearchaniseRequest());
|
42 |
+
if ($this->checkSearchaniseResult()) {
|
43 |
+
$this->addSearchaniseFilter();
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
public function initSearchaniseRequest()
|
49 |
{
|
50 |
return $this->_searchaniseCollection->initSearchaniseRequest();
|
@@ -33,6 +33,18 @@ class Simtech_Searchanise_Model_Resource_Fulltext_Collection extends Mage_Catalo
|
|
33 |
$this->_searchaniseCollection->setCollection($this);
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
public function initSearchaniseRequest()
|
37 |
{
|
38 |
return $this->_searchaniseCollection->initSearchaniseRequest();
|
@@ -52,6 +64,15 @@ class Simtech_Searchanise_Model_Resource_Fulltext_Collection extends Mage_Catalo
|
|
52 |
{
|
53 |
return $this->_searchaniseCollection->getSearchaniseRequest();
|
54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
public function addSearchaniseFilter()
|
57 |
{
|
33 |
$this->_searchaniseCollection->setCollection($this);
|
34 |
}
|
35 |
|
36 |
+
public function __construct($resource = null, array $args = array())
|
37 |
+
{
|
38 |
+
parent::__construct($resource, $args);
|
39 |
+
|
40 |
+
if (Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
41 |
+
$this->setSearchaniseRequest(Mage::helper('searchanise')->getSearchaniseRequest());
|
42 |
+
if ($this->checkSearchaniseResult()) {
|
43 |
+
$this->addSearchaniseFilter();
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
public function initSearchaniseRequest()
|
49 |
{
|
50 |
return $this->_searchaniseCollection->initSearchaniseRequest();
|
64 |
{
|
65 |
return $this->_searchaniseCollection->getSearchaniseRequest();
|
66 |
}
|
67 |
+
|
68 |
+
public function addSearchFilter($query)
|
69 |
+
{
|
70 |
+
if ($this->checkSearchaniseResult()) {
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
return parent::addSearchFilter($query);
|
75 |
+
}
|
76 |
|
77 |
public function addSearchaniseFilter()
|
78 |
{
|
@@ -33,6 +33,18 @@ class Simtech_Searchanise_Model_Resource_Product_Collection extends Mage_Catalog
|
|
33 |
$this->_searchaniseCollection->setCollection($this);
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
public function initSearchaniseRequest()
|
37 |
{
|
38 |
return $this->_searchaniseCollection->initSearchaniseRequest();
|
33 |
$this->_searchaniseCollection->setCollection($this);
|
34 |
}
|
35 |
|
36 |
+
public function __construct($resource = null, array $args = array())
|
37 |
+
{
|
38 |
+
parent::__construct($resource, $args);
|
39 |
+
|
40 |
+
if (Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
41 |
+
$this->setSearchaniseRequest(Mage::helper('searchanise')->getSearchaniseRequest());
|
42 |
+
if ($this->checkSearchaniseResult()) {
|
43 |
+
$this->addSearchaniseFilter();
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
public function initSearchaniseRequest()
|
49 |
{
|
50 |
return $this->_searchaniseCollection->initSearchaniseRequest();
|
@@ -1,104 +0,0 @@
|
|
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.6] [v1.7] [v1.8] [v1.9]
|
16 |
-
class Simtech_Searchanise_Model_Resource_Product_CollectionTag extends Mage_Tag_Model_Resource_Product_Collection
|
17 |
-
{
|
18 |
-
/**
|
19 |
-
* Searchanise Collection Product
|
20 |
-
*
|
21 |
-
* @var Simtech_Searchanise_Model_Searchanise
|
22 |
-
*/
|
23 |
-
protected $_searchaniseCollection = null;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Initialize resource
|
27 |
-
* @return Simtech_Searchanise_Model_Mysql4_Product_CollectionSearhanise
|
28 |
-
*/
|
29 |
-
protected function _construct()
|
30 |
-
{
|
31 |
-
parent::_construct();
|
32 |
-
$this->_searchaniseCollection = Mage::getModel('searchanise/searchanise');
|
33 |
-
$this->_searchaniseCollection->setCollection($this);
|
34 |
-
}
|
35 |
-
|
36 |
-
public function initSearchaniseRequest()
|
37 |
-
{
|
38 |
-
return $this->_searchaniseCollection->initSearchaniseRequest();
|
39 |
-
}
|
40 |
-
|
41 |
-
public function checkSearchaniseResult()
|
42 |
-
{
|
43 |
-
return $this->_searchaniseCollection->checkSearchaniseResult();
|
44 |
-
}
|
45 |
-
|
46 |
-
public function setSearchaniseRequest($request)
|
47 |
-
{
|
48 |
-
return $this->_searchaniseCollection->setSearchaniseRequest($request);
|
49 |
-
}
|
50 |
-
|
51 |
-
public function getSearchaniseRequest()
|
52 |
-
{
|
53 |
-
return $this->_searchaniseCollection->getSearchaniseRequest();
|
54 |
-
}
|
55 |
-
|
56 |
-
public function addSearchaniseFilter()
|
57 |
-
{
|
58 |
-
return $this->_searchaniseCollection->addSearchaniseFilter();
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Set Order field
|
63 |
-
*
|
64 |
-
* @param string $attribute
|
65 |
-
* @param string $dir
|
66 |
-
* @return Mage_CatalogSearch_Model_Mysql4_Fulltext_Collection
|
67 |
-
*/
|
68 |
-
public function setOrder($attribute, $dir = 'desc')
|
69 |
-
{
|
70 |
-
return $this->_searchaniseCollection->setOrder($attribute, $dir);
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Set Order field
|
75 |
-
*
|
76 |
-
* @param string $attribute
|
77 |
-
* @param string $dir
|
78 |
-
* @return Mage_CatalogSearch_Model_Mysql4_Fulltext_Collection
|
79 |
-
*/
|
80 |
-
public function setOrderParent($attribute, $dir = 'desc')
|
81 |
-
{
|
82 |
-
return parent::setOrder($attribute, $dir);
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Retrieve collection last page number
|
87 |
-
*
|
88 |
-
* @return int
|
89 |
-
*/
|
90 |
-
public function getLastPageNumber()
|
91 |
-
{
|
92 |
-
return $this->_searchaniseCollection->getLastPageNumber();
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Retrieve collection last page number
|
97 |
-
*
|
98 |
-
* @return int
|
99 |
-
*/
|
100 |
-
public function getLastPageNumberParent()
|
101 |
-
{
|
102 |
-
return parent::getLastPageNumber();
|
103 |
-
}
|
104 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -11,8 +11,11 @@
|
|
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
|
15 |
{
|
|
|
|
|
|
|
16 |
protected function _initAction()
|
17 |
{
|
18 |
$this->_setActiveMenu('searchanise/index/index');
|
@@ -44,4 +47,51 @@ class Simtech_Searchanise_IndexController extends Mage_Adminhtml_Controller_Acti
|
|
44 |
print $this->getLayout()->createBlock("searchanise/Adminhtml_Index_Terms")->toHtml();
|
45 |
exit();
|
46 |
}
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Adminhtml_SearchaniseController extends Mage_Adminhtml_Controller_Action
|
15 |
{
|
16 |
+
|
17 |
+
const PARAM_USE_FULL_FEED = 'snize_use_full_feed';
|
18 |
+
|
19 |
protected function _initAction()
|
20 |
{
|
21 |
$this->_setActiveMenu('searchanise/index/index');
|
47 |
print $this->getLayout()->createBlock("searchanise/Adminhtml_Index_Terms")->toHtml();
|
48 |
exit();
|
49 |
}
|
50 |
+
|
51 |
+
/*
|
52 |
+
* options
|
53 |
+
*/
|
54 |
+
public function optionsAction()
|
55 |
+
{
|
56 |
+
$useFullFeed = $this->getRequest()->getParam(self::PARAM_USE_FULL_FEED);
|
57 |
+
if ($useFullFeed != '') {
|
58 |
+
Mage::helper('searchanise/ApiSe')->setUseFullFeed($useFullFeed == 'true' ? true : false);
|
59 |
+
}
|
60 |
+
|
61 |
+
exit;
|
62 |
+
}
|
63 |
+
|
64 |
+
/*
|
65 |
+
* resync
|
66 |
+
*/
|
67 |
+
public function resyncAction()
|
68 |
+
{
|
69 |
+
if (Mage::helper('searchanise/ApiSe')->getStatusModule() == 'Y') {
|
70 |
+
if (Mage::helper('searchanise/ApiSe')->signup() != true) {
|
71 |
+
|
72 |
+
$this->_redirect(Mage::helper('searchanise/ApiSe')->getSearchaniseLink());
|
73 |
+
}
|
74 |
+
Mage::helper('searchanise/ApiSe')->queueImport();
|
75 |
+
|
76 |
+
$this->_redirect(Mage::helper('searchanise/ApiSe')->getSearchaniseLink());
|
77 |
+
}
|
78 |
+
|
79 |
+
return $this;
|
80 |
+
}
|
81 |
+
|
82 |
+
/*
|
83 |
+
* Signup
|
84 |
+
*/
|
85 |
+
public function signupAction()
|
86 |
+
{
|
87 |
+
if (Mage::helper('searchanise/ApiSe')->getStatusModule() == 'Y') {
|
88 |
+
if (Mage::helper('searchanise/ApiSe')->signup() == true) {
|
89 |
+
Mage::helper('searchanise/ApiSe')->queueImport();
|
90 |
+
}
|
91 |
+
|
92 |
+
$this->_redirect(Mage::helper('searchanise/ApiSe')->getSearchaniseLink());
|
93 |
+
}
|
94 |
+
|
95 |
+
return $this;
|
96 |
+
}
|
97 |
+
}
|
@@ -1,45 +0,0 @@
|
|
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 |
-
require_once("Mage/CatalogSearch/controllers/AdvancedController.php");
|
15 |
-
|
16 |
-
class Simtech_Searchanise_AdvancedController extends Mage_CatalogSearch_AdvancedController
|
17 |
-
{
|
18 |
-
protected $_defaultToolbarBlock = 'catalog/product_list_toolbar';
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Display search result
|
22 |
-
*/
|
23 |
-
public function resultAction()
|
24 |
-
{
|
25 |
-
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
26 |
-
return parent::resultAction();
|
27 |
-
}
|
28 |
-
|
29 |
-
try {
|
30 |
-
$query = $this->getRequest()->getQuery();
|
31 |
-
} catch (Mage_Core_Exception $e) {
|
32 |
-
return parent::resultAction();
|
33 |
-
}
|
34 |
-
|
35 |
-
if ($query) {
|
36 |
-
if (Mage::helper('searchanise')->checkEnabled()) {
|
37 |
-
$block_toolbar = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
|
38 |
-
|
39 |
-
Mage::helper('searchanise')->execute(Simtech_Searchanise_Helper_Data::TEXT_ADVANCED_FIND, $this, $block_toolbar, $query);
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
return parent::resultAction();
|
44 |
-
}
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -100,10 +100,6 @@ class Simtech_Searchanise_AsyncController extends Mage_Core_Controller_Front_Act
|
|
100 |
$flIgnoreProcessing = true;
|
101 |
}
|
102 |
|
103 |
-
if (Mage::helper('catalog/product_flat')->isEnabled()) {
|
104 |
-
Mage::helper('searchanise/ApiProducts')->setIsGetProductsByItems(true);
|
105 |
-
}
|
106 |
-
|
107 |
$result = Mage::helper('searchanise/ApiSe')->async($flIgnoreProcessing);
|
108 |
|
109 |
if ($this->checkShowSatusAsync()) {
|
100 |
$flIgnoreProcessing = true;
|
101 |
}
|
102 |
|
|
|
|
|
|
|
|
|
103 |
$result = Mage::helper('searchanise/ApiSe')->async($flIgnoreProcessing);
|
104 |
|
105 |
if ($this->checkShowSatusAsync()) {
|
@@ -1,70 +0,0 @@
|
|
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 |
-
require_once("Mage/Catalog/controllers/CategoryController.php");
|
15 |
-
|
16 |
-
class Simtech_Searchanise_CategoryController extends Mage_Catalog_CategoryController
|
17 |
-
{
|
18 |
-
protected $_defaultToolbarBlock = 'catalog/product_list_toolbar';
|
19 |
-
|
20 |
-
protected function _getCurCategory()
|
21 |
-
{
|
22 |
-
$categoryId = (int) $this->getRequest()->getParam('id', false);
|
23 |
-
|
24 |
-
if (!$categoryId) {
|
25 |
-
return null;
|
26 |
-
}
|
27 |
-
|
28 |
-
$category = Mage::getModel('catalog/category')
|
29 |
-
->setStoreId(Mage::app()->getStore()->getId())
|
30 |
-
->load($categoryId);
|
31 |
-
|
32 |
-
if (!Mage::helper('catalog/category')->canShow($category)) {
|
33 |
-
return null;
|
34 |
-
}
|
35 |
-
|
36 |
-
return $category;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Category view action
|
41 |
-
*/
|
42 |
-
public function viewAction()
|
43 |
-
{
|
44 |
-
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
45 |
-
return parent::viewAction();
|
46 |
-
}
|
47 |
-
|
48 |
-
if ($category = $this->_getCurCategory()) {
|
49 |
-
// If you need a this check, please, uncomment
|
50 |
-
//~ $is_anchor = $category->getData('is_anchor');
|
51 |
-
//~
|
52 |
-
//~ if ($is_anchor == 'Y')
|
53 |
-
{
|
54 |
-
$display_mode = $category->getData('display_mode');
|
55 |
-
|
56 |
-
// This check not need
|
57 |
-
// if (($display_mode == 'PRODUCTS') || ($display_mode == 'PRODUCTS_AND_PAGE'))
|
58 |
-
{
|
59 |
-
if (Mage::helper('searchanise')->checkEnabled()) {
|
60 |
-
$block_toolbar = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
|
61 |
-
|
62 |
-
Mage::helper('searchanise')->execute(Simtech_Searchanise_Helper_Data::VIEW_CATEGORY, $this, $block_toolbar, $category);
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
return parent::viewAction();
|
69 |
-
}
|
70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -179,7 +179,9 @@ class Simtech_Searchanise_InfoController extends Mage_Core_Controller_Front_Acti
|
|
179 |
$options['ajax_async_enabled'] = Mage::helper('searchanise/ApiSe')->checkAjaxAsync();
|
180 |
$options['object_async_enabled'] = Mage::helper('searchanise/ApiSe')->checkObjectAsync();
|
181 |
|
182 |
-
$options['
|
|
|
|
|
183 |
$options['use_full_feed'] = Mage::helper('searchanise/ApiSe')->getUseFullFeed();
|
184 |
|
185 |
$options['max_execution_time'] = ini_get('max_execution_time');
|
@@ -197,6 +199,52 @@ class Simtech_Searchanise_InfoController extends Mage_Core_Controller_Front_Acti
|
|
197 |
}
|
198 |
$options['memory_limit_after'] = ini_get('memory_limit');
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
if ($visual) {
|
201 |
Mage::helper('searchanise/ApiSe')->printR($options);
|
202 |
} else {
|
179 |
$options['ajax_async_enabled'] = Mage::helper('searchanise/ApiSe')->checkAjaxAsync();
|
180 |
$options['object_async_enabled'] = Mage::helper('searchanise/ApiSe')->checkObjectAsync();
|
181 |
|
182 |
+
$options['input_id'] = Mage::helper('searchanise/ApiSe')->getInputIdSearch();
|
183 |
+
$options['search_enabled'] = Mage::helper('searchanise/ApiSe')->getEnabledSearchaniseSearch();
|
184 |
+
|
185 |
$options['use_full_feed'] = Mage::helper('searchanise/ApiSe')->getUseFullFeed();
|
186 |
|
187 |
$options['max_execution_time'] = ini_get('max_execution_time');
|
199 |
}
|
200 |
$options['memory_limit_after'] = ini_get('memory_limit');
|
201 |
|
202 |
+
$models = array(
|
203 |
+
'catalog/layer_filter_category' => 'Simtech_Searchanise_Model_Layer_Filter_Category',
|
204 |
+
'catalog/layer_filter_price' => 'Simtech_Searchanise_Model_Layer_Filter_Price',
|
205 |
+
'catalog_resource/product_collection' => 'Simtech_Searchanise_Model_Resource_Product_Collection',
|
206 |
+
'catalog_resource/layer_filter_attribute' => 'Simtech_Searchanise_Model_Resource_Layer_Filter_Attribute',
|
207 |
+
'catalog_resource/layer_filter_price' => 'Simtech_Searchanise_Model_Resource_Layer_Filter_Price',
|
208 |
+
'catalog_resource_eav_mysql4/layer_filter_attribute' => 'Simtech_Searchanise_Model_Resource_Eav_Mysql4_Layer_Filter_Attribute',
|
209 |
+
'catalog_resource_eav_mysql4/layer_filter_price' => 'Simtech_Searchanise_Model_Resource_Eav_Mysql4_Layer_Filter_Price',
|
210 |
+
'catalog_resource_eav_mysql4/product_action' => 'Simtech_Searchanise_Model_Resource_Eav_Mysql4_Product_Action',
|
211 |
+
'catalogsearch/advanced' => 'Simtech_Searchanise_Model_Advanced',
|
212 |
+
'catalogsearch_resource/fulltext_collection' => 'Simtech_Searchanise_Model_Resource_Fulltext_Collection',
|
213 |
+
'catalogsearch_resource/advanced_collection' => 'Simtech_Searchanise_Model_Resource_Advanced_Collection',
|
214 |
+
'tag/tag_relation' => 'Simtech_Searchanise_Model_Tag_Relation',
|
215 |
+
'importexport/import_entity_product' => 'Simtech_Searchanise_Model_Import_Entity_Product',
|
216 |
+
'core_resource/store' => 'Simtech_Searchanise_Model_Resource_Store',
|
217 |
+
'core_mysql4/store' => 'Simtech_Searchanise_Model_Mysql4_Store',
|
218 |
+
'adminhtml/config_data' => 'Simtech_Searchanise_Model_Config_Data',
|
219 |
+
'adminhtml/layer_filter_category' => 'Simtech_Searchanise_Model_Layer_Filter_Category',
|
220 |
+
);
|
221 |
+
|
222 |
+
foreach($models as $patch => $needed) {
|
223 |
+
$used = get_class(Mage::getModel($patch));
|
224 |
+
if ($used != $needed) {
|
225 |
+
$options['wrong_models'][$patch] = array(
|
226 |
+
'needed' => $needed,
|
227 |
+
'used' => $used,
|
228 |
+
);
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
+
$blocks = array(
|
233 |
+
'global/blocks/catalog/rewrite/product_list_toolbar' => 'Simtech_Searchanise_Block_Product_List_Toolbar',
|
234 |
+
'global/blocks/catalogsearch/rewrite/result' => 'Simtech_Searchanise_Block_Result',
|
235 |
+
'global/blocks/catalogsearch/rewrite/autocomplete' => 'Simtech_Searchanise_Block_Autocomplete',
|
236 |
+
);
|
237 |
+
|
238 |
+
foreach($blocks as $patch => $needed) {
|
239 |
+
$used = Mage::getConfig()->getNode($patch)->__toString();
|
240 |
+
if ($used != $needed) {
|
241 |
+
$options['wrong_blocks'][$patch] = array(
|
242 |
+
'needed' => $needed,
|
243 |
+
'used' => $used,
|
244 |
+
);
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
if ($visual) {
|
249 |
Mage::helper('searchanise/ApiSe')->printR($options);
|
250 |
} else {
|
@@ -1,36 +0,0 @@
|
|
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 |
-
class Simtech_Searchanise_OptionsController extends Mage_Adminhtml_Controller_Action
|
15 |
-
{
|
16 |
-
const PARAM_USE_NAVIGATION = 'snize_use_navigation';
|
17 |
-
const PARAM_USE_FULL_FEED = 'snize_use_full_feed';
|
18 |
-
|
19 |
-
/*
|
20 |
-
* options
|
21 |
-
*/
|
22 |
-
public function indexAction()
|
23 |
-
{
|
24 |
-
$useNavigation = $this->getRequest()->getParam(self::PARAM_USE_NAVIGATION);
|
25 |
-
if ($useNavigation != '') {
|
26 |
-
Mage::helper('searchanise/ApiSe')->setUseNavigation($useNavigation == 'true' ? true : false);
|
27 |
-
}
|
28 |
-
|
29 |
-
$useFullFeed = $this->getRequest()->getParam(self::PARAM_USE_FULL_FEED);
|
30 |
-
if ($useFullFeed != '') {
|
31 |
-
Mage::helper('searchanise/ApiSe')->setUseFullFeed($useFullFeed == 'true' ? true : false);
|
32 |
-
}
|
33 |
-
|
34 |
-
exit;
|
35 |
-
}
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,39 +0,0 @@
|
|
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 |
-
require_once("Mage/Tag/controllers/ProductController.php");
|
15 |
-
|
16 |
-
class Simtech_Searchanise_ProductController extends Mage_Tag_ProductController
|
17 |
-
{
|
18 |
-
protected $_defaultToolbarBlock = 'catalog/product_list_toolbar';
|
19 |
-
|
20 |
-
public function listAction()
|
21 |
-
{
|
22 |
-
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
23 |
-
return parent::listAction();
|
24 |
-
}
|
25 |
-
|
26 |
-
$tagId = $this->getRequest()->getParam('tagId');
|
27 |
-
$tag = Mage::getModel('tag/tag')->load($tagId);
|
28 |
-
|
29 |
-
if ($tag->getId() && $tag->isAvailableInStore()) {
|
30 |
-
if (Mage::helper('searchanise')->checkEnabled()) {
|
31 |
-
$block_toolbar = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
|
32 |
-
|
33 |
-
Mage::helper('searchanise')->execute(Simtech_Searchanise_Helper_Data::VIEW_TAG, $this, $block_toolbar, $tag);
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
-
return parent::listAction();
|
38 |
-
}
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,66 +0,0 @@
|
|
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 |
-
require_once("Mage/CatalogSearch/controllers/ResultController.php");
|
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 |
-
|
25 |
-
/**
|
26 |
-
* Retrieve Toolbar block
|
27 |
-
*
|
28 |
-
* @return Mage_Catalog_Block_Product_List_Toolbar
|
29 |
-
*/
|
30 |
-
protected function _getToolbarBlock()
|
31 |
-
{
|
32 |
-
$blockName = 'product_list_toolbar';
|
33 |
-
if ($blockName) {
|
34 |
-
if ($block = $this->getLayout()->getBlock($blockName)) {
|
35 |
-
return $block;
|
36 |
-
}
|
37 |
-
}
|
38 |
-
$block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
|
39 |
-
return $block;
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Display search result
|
44 |
-
*/
|
45 |
-
public function indexAction()
|
46 |
-
{
|
47 |
-
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
48 |
-
return parent::indexAction();
|
49 |
-
}
|
50 |
-
|
51 |
-
$query = Mage::helper('catalogsearch')->getQuery();
|
52 |
-
/* @var $query Mage_CatalogSearch_Model_Query */
|
53 |
-
|
54 |
-
$query->setStoreId(Mage::app()->getStore()->getId());
|
55 |
-
|
56 |
-
if ($query->getQueryText() != '') {
|
57 |
-
if (Mage::helper('searchanise')->checkEnabled()) {
|
58 |
-
$blockToolbar = $this->_getToolbarBlock();
|
59 |
-
|
60 |
-
Mage::helper('searchanise')->execute(Simtech_Searchanise_Helper_Data::TEXT_FIND, $this, $blockToolbar, $query);
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
return parent::indexAction();
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,34 +0,0 @@
|
|
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 |
-
class Simtech_Searchanise_ResyncController extends Mage_Adminhtml_Controller_Action
|
16 |
-
{
|
17 |
-
/*
|
18 |
-
* resync
|
19 |
-
*/
|
20 |
-
public function indexAction()
|
21 |
-
{
|
22 |
-
if (Mage::helper('searchanise/ApiSe')->getStatusModule() == 'Y') {
|
23 |
-
if (Mage::helper('searchanise/ApiSe')->signup() != true) {
|
24 |
-
|
25 |
-
$this->_redirect(Mage::helper('searchanise/ApiSe')->getSearchaniseLink());
|
26 |
-
}
|
27 |
-
Mage::helper('searchanise/ApiSe')->queueImport();
|
28 |
-
|
29 |
-
$this->_redirect(Mage::helper('searchanise/ApiSe')->getSearchaniseLink());
|
30 |
-
}
|
31 |
-
|
32 |
-
return $this;
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,32 +0,0 @@
|
|
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 |
-
class Simtech_Searchanise_SignupController extends Mage_Adminhtml_Controller_Action
|
16 |
-
{
|
17 |
-
/*
|
18 |
-
* Signup
|
19 |
-
*/
|
20 |
-
public function indexAction()
|
21 |
-
{
|
22 |
-
if (Mage::helper('searchanise/ApiSe')->getStatusModule() == 'Y') {
|
23 |
-
if (Mage::helper('searchanise/ApiSe')->signup() == true) {
|
24 |
-
Mage::helper('searchanise/ApiSe')->queueImport();
|
25 |
-
}
|
26 |
-
|
27 |
-
$this->_redirect(Mage::helper('searchanise/ApiSe')->getSearchaniseLink());
|
28 |
-
}
|
29 |
-
|
30 |
-
return $this;
|
31 |
-
}
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -15,42 +15,11 @@
|
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
-
<version>3.0
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
22 |
<routers>
|
23 |
-
<!-- OVERRIDE CATALOG CONTOLLERS -->
|
24 |
-
<!-- [disabled_searchanise_search] -->
|
25 |
-
<catalog>
|
26 |
-
<args>
|
27 |
-
<modules>
|
28 |
-
<Simtech_Searchanise before="Mage_Catalog">Simtech_Searchanise</Simtech_Searchanise>
|
29 |
-
</modules>
|
30 |
-
</args>
|
31 |
-
</catalog>
|
32 |
-
<!-- [/disabled_searchanise_search] -->
|
33 |
-
<!-- OVERRIDE CATALOGSEARCH CONTOLLERS -->
|
34 |
-
<!-- [disabled_searchanise_search] -->
|
35 |
-
<catalogsearch>
|
36 |
-
<args>
|
37 |
-
<modules>
|
38 |
-
<Simtech_Searchanise before="Mage_CatalogSearch">Simtech_Searchanise</Simtech_Searchanise>
|
39 |
-
</modules>
|
40 |
-
</args>
|
41 |
-
</catalogsearch>
|
42 |
-
<!-- [/disabled_searchanise_search] -->
|
43 |
-
<!-- OVERRIDE TAG CONTOLLERS -->
|
44 |
-
<!-- [disabled_searchanise_search] -->
|
45 |
-
<tag>
|
46 |
-
<args>
|
47 |
-
<modules>
|
48 |
-
<Simtech_Searchanise before="Mage_Tag">Simtech_Searchanise</Simtech_Searchanise>
|
49 |
-
</modules>
|
50 |
-
</args>
|
51 |
-
</tag>
|
52 |
-
<!-- [/disabled_searchanise_search] -->
|
53 |
-
<!-- END -->
|
54 |
<searchanise>
|
55 |
<use>standard</use>
|
56 |
<args>
|
@@ -75,16 +44,34 @@
|
|
75 |
</searchanise>
|
76 |
</updates>
|
77 |
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
</frontend>
|
79 |
<admin>
|
80 |
<routers>
|
81 |
-
<
|
82 |
-
<use>admin</use>
|
83 |
<args>
|
84 |
-
<
|
85 |
-
|
|
|
86 |
</args>
|
87 |
-
</
|
88 |
</routers>
|
89 |
</admin>
|
90 |
<adminhtml>
|
@@ -93,7 +80,7 @@
|
|
93 |
<children>
|
94 |
<searchanise translate="title" module="searchanise">
|
95 |
<title>Searchanise</title>
|
96 |
-
<action>searchanise/index
|
97 |
</searchanise>
|
98 |
</children>
|
99 |
</catalog>
|
@@ -147,7 +134,6 @@
|
|
147 |
<!-- [disabled_searchanise_search] -->
|
148 |
<catalog>
|
149 |
<rewrite>
|
150 |
-
<layer>Simtech_Searchanise_Model_Layer</layer>
|
151 |
<layer_filter_category>Simtech_Searchanise_Model_Layer_Filter_Category</layer_filter_category>
|
152 |
<layer_filter_price>Simtech_Searchanise_Model_Layer_Filter_Price</layer_filter_price>
|
153 |
</rewrite>
|
@@ -188,7 +174,6 @@
|
|
188 |
<!-- [disabled_searchanise_search] -->
|
189 |
<catalogsearch>
|
190 |
<rewrite>
|
191 |
-
<layer>Simtech_Searchanise_Model_LayerCatalogSearch</layer>
|
192 |
<advanced>Simtech_Searchanise_Model_Advanced</advanced>
|
193 |
</rewrite>
|
194 |
</catalogsearch>
|
@@ -224,23 +209,6 @@
|
|
224 |
</tag>
|
225 |
<!-- END -->
|
226 |
|
227 |
-
<!-- OVERRIDE TAG RESOURCE -->
|
228 |
-
<!-- [v1.6] [v1.7] [v1.8] [v1.9] -->
|
229 |
-
<tag_resource>
|
230 |
-
<rewrite>
|
231 |
-
<product_collection>Simtech_Searchanise_Model_Resource_Product_CollectionTag</product_collection>
|
232 |
-
</rewrite>
|
233 |
-
</tag_resource>
|
234 |
-
<!-- [/v1.6] [/v1.7] [/v1.8] [/v1.9] -->
|
235 |
-
<!-- [v1.5]-->
|
236 |
-
<tag_mysql4>
|
237 |
-
<rewrite>
|
238 |
-
<product_collection>Simtech_Searchanise_Model_Mysql4_Product_CollectionTag</product_collection>
|
239 |
-
</rewrite>
|
240 |
-
</tag_mysql4>
|
241 |
-
<!-- [/v1.5]-->
|
242 |
-
<!-- END -->
|
243 |
-
|
244 |
<!-- OVERRIDE IMPORTEXPORT MODEL -->
|
245 |
<importexport>
|
246 |
<rewrite>
|
@@ -583,13 +551,6 @@
|
|
583 |
</rewrite>
|
584 |
</catalogsearch>
|
585 |
<!-- END -->
|
586 |
-
<!-- OVERRIDE BLOCK TAG -->
|
587 |
-
<tag>
|
588 |
-
<rewrite>
|
589 |
-
<product_result>Simtech_Searchanise_Block_Product_Result</product_result>
|
590 |
-
</rewrite>
|
591 |
-
</tag>
|
592 |
-
<!-- END -->
|
593 |
<!-- [/disabled_searchanise_search] -->
|
594 |
</blocks>
|
595 |
</global>
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
+
<version>3.1.0</version>
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
22 |
<routers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
<searchanise>
|
24 |
<use>standard</use>
|
25 |
<args>
|
44 |
</searchanise>
|
45 |
</updates>
|
46 |
</layout>
|
47 |
+
<events>
|
48 |
+
<controller_action_predispatch_catalogsearch_result_index>
|
49 |
+
<observers>
|
50 |
+
<rating>
|
51 |
+
<class>searchanise/observer</class>
|
52 |
+
<method>controllerActionPredispatchCatalogSearchResultIndex</method>
|
53 |
+
</rating>
|
54 |
+
</observers>
|
55 |
+
</controller_action_predispatch_catalogsearch_result_index>
|
56 |
+
<controller_action_predispatch_catalogsearch_advanced_result>
|
57 |
+
<observers>
|
58 |
+
<rating>
|
59 |
+
<class>searchanise/observer</class>
|
60 |
+
<method>controllerActionPredispatchCatalogSearchAdvancedResult</method>
|
61 |
+
</rating>
|
62 |
+
</observers>
|
63 |
+
</controller_action_predispatch_catalogsearch_advanced_result>
|
64 |
+
</events>
|
65 |
</frontend>
|
66 |
<admin>
|
67 |
<routers>
|
68 |
+
<adminhtml>
|
|
|
69 |
<args>
|
70 |
+
<modules>
|
71 |
+
<searchanise before="Mage_Adminhtml">Simtech_Searchanise_Adminhtml</searchanise>
|
72 |
+
</modules>
|
73 |
</args>
|
74 |
+
</adminhtml>
|
75 |
</routers>
|
76 |
</admin>
|
77 |
<adminhtml>
|
80 |
<children>
|
81 |
<searchanise translate="title" module="searchanise">
|
82 |
<title>Searchanise</title>
|
83 |
+
<action>adminhtml/searchanise/index</action>
|
84 |
</searchanise>
|
85 |
</children>
|
86 |
</catalog>
|
134 |
<!-- [disabled_searchanise_search] -->
|
135 |
<catalog>
|
136 |
<rewrite>
|
|
|
137 |
<layer_filter_category>Simtech_Searchanise_Model_Layer_Filter_Category</layer_filter_category>
|
138 |
<layer_filter_price>Simtech_Searchanise_Model_Layer_Filter_Price</layer_filter_price>
|
139 |
</rewrite>
|
174 |
<!-- [disabled_searchanise_search] -->
|
175 |
<catalogsearch>
|
176 |
<rewrite>
|
|
|
177 |
<advanced>Simtech_Searchanise_Model_Advanced</advanced>
|
178 |
</rewrite>
|
179 |
</catalogsearch>
|
209 |
</tag>
|
210 |
<!-- END -->
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
<!-- OVERRIDE IMPORTEXPORT MODEL -->
|
213 |
<importexport>
|
214 |
<rewrite>
|
551 |
</rewrite>
|
552 |
</catalogsearch>
|
553 |
<!-- END -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
<!-- [/disabled_searchanise_search] -->
|
555 |
</blocks>
|
556 |
</global>
|
@@ -15,42 +15,11 @@
|
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
-
<version>3.0.
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
22 |
<routers>
|
23 |
-
<!-- OVERRIDE CATALOG CONTOLLERS -->
|
24 |
-
<!-- [disabled_searchanise_search] -->
|
25 |
-
<!-- <catalog>
|
26 |
-
<args>
|
27 |
-
<modules>
|
28 |
-
<Simtech_Searchanise before="Mage_Catalog">Simtech_Searchanise</Simtech_Searchanise>
|
29 |
-
</modules>
|
30 |
-
</args>
|
31 |
-
</catalog> -->
|
32 |
-
<!-- [/disabled_searchanise_search] -->
|
33 |
-
<!-- OVERRIDE CATALOGSEARCH CONTOLLERS -->
|
34 |
-
<!-- [disabled_searchanise_search] -->
|
35 |
-
<!-- <catalogsearch>
|
36 |
-
<args>
|
37 |
-
<modules>
|
38 |
-
<Simtech_Searchanise before="Mage_CatalogSearch">Simtech_Searchanise</Simtech_Searchanise>
|
39 |
-
</modules>
|
40 |
-
</args>
|
41 |
-
</catalogsearch> -->
|
42 |
-
<!-- [/disabled_searchanise_search] -->
|
43 |
-
<!-- OVERRIDE TAG CONTOLLERS -->
|
44 |
-
<!-- [disabled_searchanise_search] -->
|
45 |
-
<!-- <tag>
|
46 |
-
<args>
|
47 |
-
<modules>
|
48 |
-
<Simtech_Searchanise before="Mage_Tag">Simtech_Searchanise</Simtech_Searchanise>
|
49 |
-
</modules>
|
50 |
-
</args>
|
51 |
-
</tag> -->
|
52 |
-
<!-- [/disabled_searchanise_search] -->
|
53 |
-
<!-- END -->
|
54 |
<searchanise>
|
55 |
<use>standard</use>
|
56 |
<args>
|
@@ -75,16 +44,34 @@
|
|
75 |
</searchanise>
|
76 |
</updates>
|
77 |
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
</frontend>
|
79 |
<admin>
|
80 |
<routers>
|
81 |
-
<
|
82 |
-
<use>admin</use>
|
83 |
<args>
|
84 |
-
<
|
85 |
-
|
|
|
86 |
</args>
|
87 |
-
</
|
88 |
</routers>
|
89 |
</admin>
|
90 |
<adminhtml>
|
@@ -93,7 +80,7 @@
|
|
93 |
<children>
|
94 |
<searchanise translate="title" module="searchanise">
|
95 |
<title>Searchanise</title>
|
96 |
-
<action>searchanise/index
|
97 |
</searchanise>
|
98 |
</children>
|
99 |
</catalog>
|
@@ -147,7 +134,6 @@
|
|
147 |
<!-- [disabled_searchanise_search] -->
|
148 |
<!-- <catalog>
|
149 |
<rewrite>
|
150 |
-
<layer>Simtech_Searchanise_Model_Layer</layer>
|
151 |
<layer_filter_category>Simtech_Searchanise_Model_Layer_Filter_Category</layer_filter_category>
|
152 |
<layer_filter_price>Simtech_Searchanise_Model_Layer_Filter_Price</layer_filter_price>
|
153 |
</rewrite>
|
@@ -188,7 +174,6 @@
|
|
188 |
<!-- [disabled_searchanise_search] -->
|
189 |
<!-- <catalogsearch>
|
190 |
<rewrite>
|
191 |
-
<layer>Simtech_Searchanise_Model_LayerCatalogSearch</layer>
|
192 |
<advanced>Simtech_Searchanise_Model_Advanced</advanced>
|
193 |
</rewrite>
|
194 |
</catalogsearch> -->
|
@@ -224,23 +209,6 @@
|
|
224 |
</tag>
|
225 |
<!-- END -->
|
226 |
|
227 |
-
<!-- OVERRIDE TAG RESOURCE -->
|
228 |
-
<!-- [v1.6] [v1.7] [v1.8] [v1.9] -->
|
229 |
-
<tag_resource>
|
230 |
-
<rewrite>
|
231 |
-
<product_collection>Simtech_Searchanise_Model_Resource_Product_CollectionTag</product_collection>
|
232 |
-
</rewrite>
|
233 |
-
</tag_resource>
|
234 |
-
<!-- [/v1.6] [/v1.7] [/v1.8] [/v1.9] -->
|
235 |
-
<!-- [v1.5]-->
|
236 |
-
<tag_mysql4>
|
237 |
-
<rewrite>
|
238 |
-
<product_collection>Simtech_Searchanise_Model_Mysql4_Product_CollectionTag</product_collection>
|
239 |
-
</rewrite>
|
240 |
-
</tag_mysql4>
|
241 |
-
<!-- [/v1.5]-->
|
242 |
-
<!-- END -->
|
243 |
-
|
244 |
<!-- OVERRIDE IMPORTEXPORT MODEL -->
|
245 |
<importexport>
|
246 |
<rewrite>
|
@@ -583,13 +551,6 @@
|
|
583 |
</rewrite>
|
584 |
</catalogsearch> -->
|
585 |
<!-- END -->
|
586 |
-
<!-- OVERRIDE BLOCK TAG -->
|
587 |
-
<!-- <tag>
|
588 |
-
<rewrite>
|
589 |
-
<product_result>Simtech_Searchanise_Block_Product_Result</product_result>
|
590 |
-
</rewrite>
|
591 |
-
</tag> -->
|
592 |
-
<!-- END -->
|
593 |
<!-- [/disabled_searchanise_search] -->
|
594 |
</blocks>
|
595 |
</global>
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
+
<version>3.0.6</version>
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
22 |
<routers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
<searchanise>
|
24 |
<use>standard</use>
|
25 |
<args>
|
44 |
</searchanise>
|
45 |
</updates>
|
46 |
</layout>
|
47 |
+
<!--<events>
|
48 |
+
<controller_action_predispatch_catalogsearch_result_index>
|
49 |
+
<observers>
|
50 |
+
<rating>
|
51 |
+
<class>searchanise/observer</class>
|
52 |
+
<method>controllerActionPredispatchCatalogSearchResultIndex</method>
|
53 |
+
</rating>
|
54 |
+
</observers>
|
55 |
+
</controller_action_predispatch_catalogsearch_result_index>
|
56 |
+
<controller_action_predispatch_catalogsearch_advanced_result>
|
57 |
+
<observers>
|
58 |
+
<rating>
|
59 |
+
<class>searchanise/observer</class>
|
60 |
+
<method>controllerActionPredispatchCatalogSearchAdvancedResult</method>
|
61 |
+
</rating>
|
62 |
+
</observers>
|
63 |
+
</controller_action_predispatch_catalogsearch_advanced_result>
|
64 |
+
</events>-->
|
65 |
</frontend>
|
66 |
<admin>
|
67 |
<routers>
|
68 |
+
<adminhtml>
|
|
|
69 |
<args>
|
70 |
+
<modules>
|
71 |
+
<searchanise before="Mage_Adminhtml">Simtech_Searchanise_Adminhtml</searchanise>
|
72 |
+
</modules>
|
73 |
</args>
|
74 |
+
</adminhtml>
|
75 |
</routers>
|
76 |
</admin>
|
77 |
<adminhtml>
|
80 |
<children>
|
81 |
<searchanise translate="title" module="searchanise">
|
82 |
<title>Searchanise</title>
|
83 |
+
<action>adminhtml/searchanise/index</action>
|
84 |
</searchanise>
|
85 |
</children>
|
86 |
</catalog>
|
134 |
<!-- [disabled_searchanise_search] -->
|
135 |
<!-- <catalog>
|
136 |
<rewrite>
|
|
|
137 |
<layer_filter_category>Simtech_Searchanise_Model_Layer_Filter_Category</layer_filter_category>
|
138 |
<layer_filter_price>Simtech_Searchanise_Model_Layer_Filter_Price</layer_filter_price>
|
139 |
</rewrite>
|
174 |
<!-- [disabled_searchanise_search] -->
|
175 |
<!-- <catalogsearch>
|
176 |
<rewrite>
|
|
|
177 |
<advanced>Simtech_Searchanise_Model_Advanced</advanced>
|
178 |
</rewrite>
|
179 |
</catalogsearch> -->
|
209 |
</tag>
|
210 |
<!-- END -->
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
<!-- OVERRIDE IMPORTEXPORT MODEL -->
|
213 |
<importexport>
|
214 |
<rewrite>
|
551 |
</rewrite>
|
552 |
</catalogsearch> -->
|
553 |
<!-- END -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
<!-- [/disabled_searchanise_search] -->
|
555 |
</blocks>
|
556 |
</global>
|
@@ -37,8 +37,8 @@
|
|
37 |
<show_in_store>1</show_in_store>
|
38 |
<fields>
|
39 |
<input_id_search translate="labe commentl">
|
40 |
-
<label><![CDATA[Search
|
41 |
-
<comment><![CDATA[
|
42 |
<frontend_type>text</frontend_type>
|
43 |
<validate></validate>
|
44 |
<sort_order>1</sort_order>
|
37 |
<show_in_store>1</show_in_store>
|
38 |
<fields>
|
39 |
<input_id_search translate="labe commentl">
|
40 |
+
<label><![CDATA[Search input HTML DOM ID]]></label>
|
41 |
+
<comment><![CDATA[Important: Edit only if your custom theme changes the default search input ID!]]></comment>
|
42 |
<frontend_type>text</frontend_type>
|
43 |
<validate></validate>
|
44 |
<sort_order>1</sort_order>
|
@@ -1,41 +0,0 @@
|
|
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 |
-
<form id="search_mini_form" action="<?php echo $this->helper('catalogsearch')->getResultUrl() ?>" method="get">
|
16 |
-
<div class="form-search">
|
17 |
-
<label for="search"><?php echo $this->__('Search:') ?></label>
|
18 |
-
<input id="search" type="text" name="<?php echo $this->helper('catalogsearch')->getQueryParamName() ?>" value="<?php echo $this->helper('catalogsearch')->getEscapedQueryText() ?>" class="input-text" />
|
19 |
-
<button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
|
20 |
-
<div id="search_autocomplete" class="search-autocomplete"></div>
|
21 |
-
<?php
|
22 |
-
$showDefaultAutocomplete = true;
|
23 |
-
$searchaniseDisabled = Mage::getStoreConfigFlag('advanced/modules_disable_output/Simtech_Searchanise');
|
24 |
-
if (!$searchaniseDisabled) {
|
25 |
-
$store = Mage::app()->getStore();
|
26 |
-
$showDefaultAutocomplete = !Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true, $store);
|
27 |
-
}
|
28 |
-
|
29 |
-
if ($showDefaultAutocomplete) {
|
30 |
-
?>
|
31 |
-
<script type="text/javascript">
|
32 |
-
//<![CDATA[
|
33 |
-
var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->__('Search entire store here...') ?>');
|
34 |
-
searchForm.initAutocomplete('<?php echo $this->helper('catalogsearch')->getSuggestUrl() ?>', 'search_autocomplete');
|
35 |
-
//]]>
|
36 |
-
</script>
|
37 |
-
<?php
|
38 |
-
}
|
39 |
-
?>
|
40 |
-
</div>
|
41 |
-
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Simtech_Searchanise</name>
|
4 |
-
<version>3.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://docs.searchanise.com/connector_addon/license_agreement.html">Commercial license: http://docs.searchanise.com/connector_addon/license_agreement.html</license>
|
7 |
<channel>community</channel>
|
@@ -10,12 +10,29 @@
|
|
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 |
<authors><author><name>Simbirsk Technologies, Ltd.</name><user>searchanise</user><email>sales@searchanise.com</email></author></authors>
|
16 |
-
<date>2015-
|
17 |
-
<time>
|
18 |
-
<contents><target name="magecommunity"><dir name="Simtech"><dir name="Searchanise"><dir name="Block"><file name="Async.php" hash="
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Simtech_Searchanise</name>
|
4 |
+
<version>3.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://docs.searchanise.com/connector_addon/license_agreement.html">Commercial license: http://docs.searchanise.com/connector_addon/license_agreement.html</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>[+] Compatibility with magento SUPEE-6788 patch and version 1.9.2.2 was added.<br>
|
14 |
+
[+] Compatibility with third-party addons that override 'catalogsearch' controllers was added.<br>
|
15 |
+
[+] Support for product flat table was added.<br>
|
16 |
+
[+] HHVM support added.<br>
|
17 |
+
[+] Ability to hide categories from search was added.<br>
|
18 |
+
[+] Ability to enable only some of the store views to be processed by Searchanise was added.<br>
|
19 |
+
<br>
|
20 |
+
[*] Magento: Set search field ID: The setting caption updated.<br>
|
21 |
+
[*] Redundant product attributes are now longer collected.<br>
|
22 |
+
[*] Obsolete code with category navigation was removed.<br>
|
23 |
+
[*] Addition cms pages was hidden from search by default.<br>
|
24 |
+
[*] Speed of product export was increased.<br>
|
25 |
+
<br>
|
26 |
+
[!] Due to inconsistency of Magento's standard "Category Products" index, not all products were searchable. Fixed.<br>
|
27 |
+
[!] All categories were submitted for each store, even if it had its own default (parent) category. Fixed.<br>
|
28 |
+
[!] If sorting by custom attribute was applied the search results were shown without using Searchanise. Fixed.<br>
|
29 |
+
[!] Allow Qty Below 0 setting handing was fixed.<br>
|
30 |
+
[!] Erroneous server requests were handled incorrectly, cramming store logs with notices. Fixed.<br>
|
31 |
+
[!] Default autocomplete wasn't disabled in magento 1.9. Fixed.<br></notes>
|
32 |
<authors><author><name>Simbirsk Technologies, Ltd.</name><user>searchanise</user><email>sales@searchanise.com</email></author></authors>
|
33 |
+
<date>2015-11-10</date>
|
34 |
+
<time>08:50:13</time>
|
35 |
+
<contents><target name="magecommunity"><dir name="Simtech"><dir name="Searchanise"><dir name="Block"><file name="Async.php" hash="7fb3859416e0d468235082ca41c5a96b"/><file name="Autocomplete.php" hash="efc89ac3f897be3bc307fba6a36778f0"/><file name="Jsinit.php" hash="3411676a466ce1d4023f1be831a8ed12"/><dir name="Product"><dir name="List"><file name="Toolbar.php" hash="759854378cb8c35c37a8a7f44076194f"/></dir></dir><file name="Result.php" hash="dec7b27ab9511c956680eb60eba9b95e"/></dir><dir name="Helper"><file name="ApiCategories.php" hash="693fb12e14eccb273bd9a775134df5c6"/><file name="ApiPages.php" hash="40b2c244bb969d3d1a3202e34059e14e"/><file name="ApiProducts.php" hash="1c937aeff0059a416c362f10fd679181"/><file name="ApiSe.php" hash="e1f78439586c184d93cd0e815eaa5326"/><file name="Data.php" hash="7cc7514c9a23bd084baaed1f97a5b3c7"/></dir><dir name="Model"><file name="Advanced.php" hash="e0c92b53cec8fbbfdd79690612c7ee84"/><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><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"/></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="a478dac639df52979587b01043f7eb97"/><file name="Queue.php" hash="f862b207d2dc9bb7f56c829b8a1480fe"/><file name="Request.php" hash="236d321c6f32fdc664923e000f9f2e71"/><dir name="Resource"><dir name="Advanced"><file name="Collection.php" hash="41256fb10dff7e97d0c9136dc0500bf3"/></dir><dir name="Eav"><dir name="Mysql4"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="05320757b9289edac4f15230cd06c0e1"/><file name="Price.php" hash="ed4e21a18c552e3a92b21ff6e8bc5d61"/></dir></dir><dir name="Product"><file name="Action.php" hash="006e3c8c775cf31a8b9c66fb934c9d2d"/></dir></dir></dir><dir name="Fulltext"><file name="Collection.php" hash="54aca41551e47b62570e9071340b8edb"/></dir><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="e61907b6fbe825511ea3dc590cd9009f"/><file name="Price.php" hash="57d56f6841c0e2b89c21947aa2a23e86"/></dir></dir><dir name="Product"><file name="Collection.php" hash="ad006af84576dab614a08beec5200964"/></dir><file name="Store.php" hash="6a337d4b6561aa96b96236d66cc9aa30"/></dir><file name="Searchanise.php" hash="d38d587354466e3a36e9c0a4f078d5fd"/><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"><dir name="Adminhtml"><file name="SearchaniseController.php" hash="b05fe6f1b3d318a7186ec60b15e0fb04"/></dir><file name="AsyncController.php" hash="1fcec63f99231fc260995ae98aaaf86f"/><file name="InfoController.php" hash="212aa6e66052e3e1f62431367422be24"/></dir><dir name="etc"><file name="config.xml" hash="b26051acd6d6d7f9585d248abeba355e"/><file name="config_without_search.xml" hash="f68b16f43d5437847fbc393615b41c6f"/><file name="system.xml" hash="9d6e139bc5ba5c1bdc789bb8fab01d1c"/></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="0ec8814b915e8594b019062c071cc485"/></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></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="955cdb2011b7abf04227aae37db5bb0b"/></dir></target></contents>
|
36 |
<compatible/>
|
37 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
|
38 |
</package>
|