Version Notes
[+] Added the ability to change the access to the Searchanise settings.
[*] Added a tip: how to find the Searchanise admin panel in the Magento admin portal.
[*] Improved compatibility with third-party modules.
[!] Fixed. There were no ability to translate the header of Search Results widget.
[!] Fixed. You can't turn off the search and enable sorting on the Search Results page for title, sku, short_description attributes.
[!] Fixed. Force re-indexation didn't work if the Add Store Code to Urls settings were enabled.
[!] Fixed. Changes of the child products data didn't lead to sync these changes with Seachanise servers.
[!] Fixed. The pagination on the default search results page didn't work properly if Searchanise engine was turned off.
[!] Fixed. The search by short_description didn't work. If you tried to search products by description attribute on the advanced search page, then products were searched by short_description.
[!] Fixed. The count of searched products don't show correctly on the advanced search result page.
Release Info
Developer | Simbirsk Technologies, Ltd. |
Extension | Simtech_Searchanise |
Version | 3.1.5 |
Comparing to | |
See all releases |
Code changes from version 3.1.4 to 3.1.5
- app/code/community/Simtech/Searchanise/Block/Async.php +4 -2
- app/code/community/Simtech/Searchanise/Helper/ApiProducts.php +31 -1
- app/code/community/Simtech/Searchanise/Helper/Data.php +4 -2
- app/code/community/Simtech/Searchanise/Model/Mysql4/Product/Collection.php +0 -105
- app/code/community/Simtech/Searchanise/Model/Observer.php +25 -2
- app/code/community/Simtech/Searchanise/Model/Resource/Advanced/Collection.php +45 -0
- app/code/community/Simtech/Searchanise/Model/Resource/Fulltext/Collection.php +10 -2
- app/code/community/Simtech/Searchanise/Model/Resource/Product/Collection.php +0 -126
- app/code/community/Simtech/Searchanise/controllers/Adminhtml/SearchaniseController.php +12 -2
- app/code/community/Simtech/Searchanise/etc/config.xml +9 -6
- app/code/community/Simtech/Searchanise/etc/config_without_search.xml +9 -6
- app/code/community/Simtech/Searchanise/etc/system.xml +1 -0
- app/design/frontend/base/default/template/searchanise/resultwidget.phtml +1 -1
- app/locale/en_US/Simtech_Searchanise.csv +1 -0
- package.xml +14 -9
@@ -28,7 +28,9 @@ class Simtech_Searchanise_Block_Async extends Mage_Core_Block_Text
|
|
28 |
$html = '';
|
29 |
|
30 |
if (Mage::helper('searchanise/ApiSe')->checkStatusModule()) {
|
|
|
31 |
if (Mage::app()->getStore()->isAdmin()) {
|
|
|
32 |
$textNotification = '';
|
33 |
if (Mage::helper('searchanise/ApiSe')->checkModuleIsUpdated()) {
|
34 |
Mage::helper('searchanise/ApiSe')->updateInsalledModuleVersion();
|
@@ -48,7 +50,7 @@ class Simtech_Searchanise_Block_Async extends Mage_Core_Block_Text
|
|
48 |
}
|
49 |
|
50 |
if (Mage::helper('searchanise/ApiSe')->checkStartAsync()) {
|
51 |
-
$asyncUrl = Mage::helper('searchanise/ApiSe')->getAsyncUrl(false);
|
52 |
|
53 |
if (Mage::helper('searchanise/ApiSe')->checkObjectAsync()) {
|
54 |
$html .= "\n<object data=\"$asyncUrl\" width=\"0\" height=\"0\" type=\"text/html\"></object>\n";
|
@@ -67,4 +69,4 @@ class Simtech_Searchanise_Block_Async extends Mage_Core_Block_Text
|
|
67 |
|
68 |
return $html;
|
69 |
}
|
70 |
-
}
|
28 |
$html = '';
|
29 |
|
30 |
if (Mage::helper('searchanise/ApiSe')->checkStatusModule()) {
|
31 |
+
$storeId = '';
|
32 |
if (Mage::app()->getStore()->isAdmin()) {
|
33 |
+
$storeId = Mage::app()->getDefaultStoreView()->getId();
|
34 |
$textNotification = '';
|
35 |
if (Mage::helper('searchanise/ApiSe')->checkModuleIsUpdated()) {
|
36 |
Mage::helper('searchanise/ApiSe')->updateInsalledModuleVersion();
|
50 |
}
|
51 |
|
52 |
if (Mage::helper('searchanise/ApiSe')->checkStartAsync()) {
|
53 |
+
$asyncUrl = Mage::helper('searchanise/ApiSe')->getAsyncUrl(false, $storeId);
|
54 |
|
55 |
if (Mage::helper('searchanise/ApiSe')->checkObjectAsync()) {
|
56 |
$html .= "\n<object data=\"$asyncUrl\" width=\"0\" height=\"0\" type=\"text/html\"></object>\n";
|
69 |
|
70 |
return $html;
|
71 |
}
|
72 |
+
}
|
@@ -657,7 +657,7 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
657 |
// Show images without white field
|
658 |
// Example: image 360 x 535 => 47 х 70
|
659 |
if (Mage::helper('searchanise/ApiSe')->getResultsWidgetEnabled($store)) {
|
660 |
-
$image = self::getProductImageLink($product, false,
|
661 |
} else {
|
662 |
$image = self::getProductImageLink($product, false, 70, 70);
|
663 |
}
|
@@ -1068,6 +1068,9 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1068 |
private static function _getRequiredAttributes()
|
1069 |
{
|
1070 |
return array(
|
|
|
|
|
|
|
1071 |
'status',
|
1072 |
'visibility',
|
1073 |
'price',
|
@@ -1124,6 +1127,33 @@ class Simtech_Searchanise_Helper_ApiProducts extends Mage_Core_Helper_Data
|
|
1124 |
// <system_attributes>
|
1125 |
|
1126 |
} elseif ($attributeCode == 'name' || $attributeCode == 'sku' || $attributeCode == 'short_description') {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1127 |
$type = 'text';
|
1128 |
$name = 'se_grouped_' . $attributeCode;
|
1129 |
$sorting = 'N';
|
657 |
// Show images without white field
|
658 |
// Example: image 360 x 535 => 47 х 70
|
659 |
if (Mage::helper('searchanise/ApiSe')->getResultsWidgetEnabled($store)) {
|
660 |
+
$image = self::getProductImageLink($product, false, 300, 300);
|
661 |
} else {
|
662 |
$image = self::getProductImageLink($product, false, 70, 70);
|
663 |
}
|
1068 |
private static function _getRequiredAttributes()
|
1069 |
{
|
1070 |
return array(
|
1071 |
+
'name',
|
1072 |
+
'short_description',
|
1073 |
+
'sku',
|
1074 |
'status',
|
1075 |
'visibility',
|
1076 |
'price',
|
1127 |
// <system_attributes>
|
1128 |
|
1129 |
} elseif ($attributeCode == 'name' || $attributeCode == 'sku' || $attributeCode == 'short_description') {
|
1130 |
+
//for original
|
1131 |
+
if ($attributeCode == 'short_description') {
|
1132 |
+
$name = 'description';
|
1133 |
+
$sorting = 'N';
|
1134 |
+
$weight = self::WEIGHT_SHORT_DESCRIPTION;
|
1135 |
+
|
1136 |
+
} elseif ($attributeCode == 'name') {
|
1137 |
+
$name = 'title';
|
1138 |
+
$sorting = 'Y';//always (for search results widget)
|
1139 |
+
$weight = self::WEIGHT_SHORT_TITLE;
|
1140 |
+
|
1141 |
+
} elseif ($attributeCode == 'sku') {
|
1142 |
+
$name = 'product_code';
|
1143 |
+
$sorting = $sorting;
|
1144 |
+
$weight = self::WEIGHT_SHORT_TITLE;
|
1145 |
+
}
|
1146 |
+
|
1147 |
+
$items[] = array(
|
1148 |
+
'name' => $name,
|
1149 |
+
'title' => $title,
|
1150 |
+
'type' => 'text',
|
1151 |
+
'sorting' => $sorting,
|
1152 |
+
'weight' => $weight,
|
1153 |
+
'text_search' => $textSearch,
|
1154 |
+
);
|
1155 |
+
|
1156 |
+
// for grouped
|
1157 |
$type = 'text';
|
1158 |
$name = 'se_grouped_' . $attributeCode;
|
1159 |
$sorting = 'N';
|
@@ -348,8 +348,10 @@ class Simtech_Searchanise_Helper_Data extends Mage_Core_Helper_Abstract
|
|
348 |
$val = Mage::helper('searchanise/ApiSe')->escapingCharacters($val);
|
349 |
|
350 |
if ($val != '') {
|
351 |
-
$queryBy = ($name == 'name')? 'title' : $name;
|
352 |
-
$queryBy = ($name == 'sku')? 'product_code' : $queryBy;
|
|
|
|
|
353 |
$params['queryBy'][$queryBy] = $val;
|
354 |
}
|
355 |
}
|
348 |
$val = Mage::helper('searchanise/ApiSe')->escapingCharacters($val);
|
349 |
|
350 |
if ($val != '') {
|
351 |
+
$queryBy = ($name == 'name') ? 'title' : $name;
|
352 |
+
$queryBy = ($name == 'sku') ? 'product_code' : $queryBy;
|
353 |
+
$queryBy = ($name == 'description') ? 'full_description' : $queryBy;
|
354 |
+
$queryBy = ($name == 'short_description') ? 'description' : $queryBy;
|
355 |
$params['queryBy'][$queryBy] = $val;
|
356 |
}
|
357 |
}
|
@@ -1,105 +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_Collection extends Mage_Catalog_Model_Mysql4_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 |
-
$this->_searchaniseCollection->setOrder($attribute, $dir);
|
71 |
-
return $this;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Set Order field
|
76 |
-
*
|
77 |
-
* @param string $attribute
|
78 |
-
* @param string $dir
|
79 |
-
* @return Mage_CatalogSearch_Model_Mysql4_Fulltext_Collection
|
80 |
-
*/
|
81 |
-
public function setOrderParent($attribute, $dir = 'desc')
|
82 |
-
{
|
83 |
-
return parent::setOrder($attribute, $dir);
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Retrieve collection last page number
|
88 |
-
*
|
89 |
-
* @return int
|
90 |
-
*/
|
91 |
-
public function getLastPageNumber()
|
92 |
-
{
|
93 |
-
return $this->_searchaniseCollection->getLastPageNumber();
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Retrieve collection last page number
|
98 |
-
*
|
99 |
-
* @return int
|
100 |
-
*/
|
101 |
-
public function getLastPageNumberParent()
|
102 |
-
{
|
103 |
-
return parent::getLastPageNumber();
|
104 |
-
}
|
105 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -86,11 +86,34 @@ class Simtech_Searchanise_Model_Observer
|
|
86 |
*/
|
87 |
public function catalogProductSaveAfter(Varien_Event_Observer $observer)
|
88 |
{
|
|
|
89 |
// fixme in the future
|
90 |
// Add a check-up for changes of the parameters which are related to other languages and storefronts.
|
91 |
//~ Mage::getModel('searchanise/queue')->addActionUpdateProduct($observer->getEvent()->getProduct(), $observer->getEvent()->getProduct()->getStoreId());
|
92 |
-
Mage::getModel('searchanise/queue')->addActionUpdateProduct($
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
return $this;
|
95 |
}
|
96 |
|
86 |
*/
|
87 |
public function catalogProductSaveAfter(Varien_Event_Observer $observer)
|
88 |
{
|
89 |
+
$product = $observer->getEvent()->getProduct();
|
90 |
// fixme in the future
|
91 |
// Add a check-up for changes of the parameters which are related to other languages and storefronts.
|
92 |
//~ Mage::getModel('searchanise/queue')->addActionUpdateProduct($observer->getEvent()->getProduct(), $observer->getEvent()->getProduct()->getStoreId());
|
93 |
+
Mage::getModel('searchanise/queue')->addActionUpdateProduct($product);
|
94 |
+
|
95 |
+
if (!empty($product)) {
|
96 |
+
if ($product->getTypeID() == 'simple') { // Current product is a child?
|
97 |
+
$product_id = $product->getID();
|
98 |
+
|
99 |
+
if (!empty($product_id)) {
|
100 |
+
$parent_ids_arr = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product_id);
|
101 |
+
$parent_ids_arr = array_merge($parent_ids_arr, Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product_id));
|
102 |
+
$parent_ids_arr = array_merge($parent_ids_arr, Mage::getModel('bundle/product_type')->getParentIdsByChild($product_id));
|
103 |
+
|
104 |
+
if (!empty($parent_ids_arr)) { // If there is one or more parent products.
|
105 |
+
foreach ($parent_ids_arr as $product_id) { // Update all detected parent products.
|
106 |
+
$product = Mage::getModel('catalog/product')->load($product_id);
|
107 |
+
|
108 |
+
if (!empty($product)) {
|
109 |
+
Mage::getModel('searchanise/queue')->addActionUpdateProduct($product);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
return $this;
|
118 |
}
|
119 |
|
@@ -114,4 +114,49 @@ class Simtech_Searchanise_Model_Resource_Advanced_Collection extends Mage_Catalo
|
|
114 |
{
|
115 |
return parent::getLastPageNumber();
|
116 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
}
|
114 |
{
|
115 |
return parent::getLastPageNumber();
|
116 |
}
|
117 |
+
|
118 |
+
public function _loadEntities($printQuery = false, $logQuery = false)
|
119 |
+
{
|
120 |
+
$args = func_get_args();
|
121 |
+
|
122 |
+
if (!$this->checkSearchaniseResult()) {
|
123 |
+
return call_user_func_array(array(__CLASS__, 'parent::_loadEntities'), $args);
|
124 |
+
}
|
125 |
+
|
126 |
+
$pageSize = $this->_pageSize;
|
127 |
+
$this->_pageSize = false;
|
128 |
+
|
129 |
+
call_user_func_array(array(__CLASS__, 'parent::_loadEntities'), $args);
|
130 |
+
|
131 |
+
$this->_pageSize = $pageSize;
|
132 |
+
|
133 |
+
return $this;
|
134 |
+
}
|
135 |
+
|
136 |
+
public function getSize()
|
137 |
+
{
|
138 |
+
if ($this->checkSearchaniseResult()) {
|
139 |
+
return $this->getSearchaniseRequest()->getTotalProduct();
|
140 |
+
} else {
|
141 |
+
return parent::getSize();
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
public function addCountToCategories($categoryCollection)
|
146 |
+
{
|
147 |
+
if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true) || !$this->checkSearchaniseResult()) {
|
148 |
+
return parent::addCountToCategories($categoryCollection);
|
149 |
+
}
|
150 |
+
|
151 |
+
foreach ($categoryCollection as $category) {
|
152 |
+
$category->setProductCount($this->getSearchaniseRequest()->getCountProductCategory($category));
|
153 |
+
}
|
154 |
+
|
155 |
+
return $this;
|
156 |
+
}
|
157 |
+
|
158 |
+
public function setVisibility($visibility)
|
159 |
+
{
|
160 |
+
return true;
|
161 |
+
}
|
162 |
}
|
@@ -126,13 +126,21 @@ class Simtech_Searchanise_Model_Resource_Fulltext_Collection extends Mage_Catalo
|
|
126 |
|
127 |
public function _loadEntities($printQuery = false, $logQuery = false)
|
128 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
$pageSize = $this->_pageSize;
|
130 |
$this->_pageSize = false;
|
131 |
-
|
132 |
call_user_func_array(array(__CLASS__, 'parent::_loadEntities'), $args);
|
|
|
133 |
$this->_pageSize = $pageSize;
|
|
|
134 |
return $this;
|
135 |
-
}
|
136 |
|
137 |
public function getSize()
|
138 |
{
|
126 |
|
127 |
public function _loadEntities($printQuery = false, $logQuery = false)
|
128 |
{
|
129 |
+
$args = func_get_args();
|
130 |
+
|
131 |
+
if (!$this->checkSearchaniseResult()) {
|
132 |
+
return call_user_func_array(array(__CLASS__, 'parent::_loadEntities'), $args);
|
133 |
+
}
|
134 |
+
|
135 |
$pageSize = $this->_pageSize;
|
136 |
$this->_pageSize = false;
|
137 |
+
|
138 |
call_user_func_array(array(__CLASS__, 'parent::_loadEntities'), $args);
|
139 |
+
|
140 |
$this->_pageSize = $pageSize;
|
141 |
+
|
142 |
return $this;
|
143 |
+
}
|
144 |
|
145 |
public function getSize()
|
146 |
{
|
@@ -1,126 +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_Collection extends Mage_Catalog_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 __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();
|
51 |
-
}
|
52 |
-
|
53 |
-
public function checkSearchaniseResult()
|
54 |
-
{
|
55 |
-
return $this->_searchaniseCollection->checkSearchaniseResult();
|
56 |
-
}
|
57 |
-
|
58 |
-
public function setSearchaniseRequest($request)
|
59 |
-
{
|
60 |
-
return $this->_searchaniseCollection->setSearchaniseRequest($request);
|
61 |
-
}
|
62 |
-
|
63 |
-
public function getSearchaniseRequest()
|
64 |
-
{
|
65 |
-
return $this->_searchaniseCollection->getSearchaniseRequest();
|
66 |
-
}
|
67 |
-
|
68 |
-
public function addSearchaniseFilter()
|
69 |
-
{
|
70 |
-
return $this->_searchaniseCollection->addSearchaniseFilter();
|
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 setOrder($attribute, $dir = 'desc')
|
81 |
-
{
|
82 |
-
$this->_searchaniseCollection->setOrder($attribute, $dir);
|
83 |
-
return $this;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Set Order field
|
88 |
-
*
|
89 |
-
* @param string $attribute
|
90 |
-
* @param string $dir
|
91 |
-
* @return Mage_CatalogSearch_Model_Mysql4_Fulltext_Collection
|
92 |
-
*/
|
93 |
-
public function setOrderParent($attribute, $dir = 'desc')
|
94 |
-
{
|
95 |
-
return parent::setOrder($attribute, $dir);
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Retrieve collection last page number
|
100 |
-
*
|
101 |
-
* @return int
|
102 |
-
*/
|
103 |
-
public function getLastPageNumber()
|
104 |
-
{
|
105 |
-
return $this->_searchaniseCollection->getLastPageNumber();
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Retrieve collection last page number
|
110 |
-
*
|
111 |
-
* @return int
|
112 |
-
*/
|
113 |
-
public function getLastPageNumberParent()
|
114 |
-
{
|
115 |
-
return parent::getLastPageNumber();
|
116 |
-
}
|
117 |
-
|
118 |
-
public function addIdFilter($productId, $exclude = false)
|
119 |
-
{
|
120 |
-
// Reset Searchanise filter to let other product collections set id filters
|
121 |
-
if (Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
|
122 |
-
$this->getSelect()->reset(Zend_Db_Select::WHERE);
|
123 |
-
}
|
124 |
-
return parent::addIdFilter($productId, $exclude);
|
125 |
-
}
|
126 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -18,7 +18,7 @@ class Simtech_Searchanise_Adminhtml_SearchaniseController extends Mage_Adminhtml
|
|
18 |
|
19 |
protected function _initAction()
|
20 |
{
|
21 |
-
$this->_setActiveMenu('searchanise
|
22 |
|
23 |
return $this;
|
24 |
}
|
@@ -28,7 +28,7 @@ class Simtech_Searchanise_Adminhtml_SearchaniseController extends Mage_Adminhtml
|
|
28 |
*/
|
29 |
public function indexAction()
|
30 |
{
|
31 |
-
$this->loadLayout();
|
32 |
|
33 |
$this->_addContent($this->getLayout()->createBlock('core/text', 'inner-wrap-start')->setText('<div id="searchanise-settings-wrapper">'));
|
34 |
$this->_addContent(
|
@@ -94,4 +94,14 @@ class Simtech_Searchanise_Adminhtml_SearchaniseController extends Mage_Adminhtml
|
|
94 |
|
95 |
return $this;
|
96 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
18 |
|
19 |
protected function _initAction()
|
20 |
{
|
21 |
+
$this->_setActiveMenu('catalog/searchanise');
|
22 |
|
23 |
return $this;
|
24 |
}
|
28 |
*/
|
29 |
public function indexAction()
|
30 |
{
|
31 |
+
$this->loadLayout()->_initAction();
|
32 |
|
33 |
$this->_addContent($this->getLayout()->createBlock('core/text', 'inner-wrap-start')->setText('<div id="searchanise-settings-wrapper">'));
|
34 |
$this->_addContent(
|
94 |
|
95 |
return $this;
|
96 |
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Check is allowed access to action
|
100 |
+
*
|
101 |
+
* @return bool
|
102 |
+
*/
|
103 |
+
protected function _isAllowed()
|
104 |
+
{
|
105 |
+
return Mage::getSingleton('admin/session')->isAllowed('catalog/searchanise');
|
106 |
+
}
|
107 |
}
|
@@ -15,7 +15,7 @@
|
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
-
<version>3.1.
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
@@ -100,10 +100,14 @@
|
|
100 |
</all>
|
101 |
<admin>
|
102 |
<children>
|
103 |
-
<
|
104 |
-
<
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
107 |
<system>
|
108 |
<children>
|
109 |
<config>
|
@@ -154,7 +158,6 @@
|
|
154 |
<!-- [v1.6] [v1.7] [v1.8] [v1.9] -->
|
155 |
<catalog_resource>
|
156 |
<rewrite>
|
157 |
-
<product_collection>Simtech_Searchanise_Model_Resource_Product_Collection</product_collection>
|
158 |
<layer_filter_attribute>Simtech_Searchanise_Model_Resource_Layer_Filter_Attribute</layer_filter_attribute>
|
159 |
<layer_filter_price>Simtech_Searchanise_Model_Resource_Layer_Filter_Price</layer_filter_price>
|
160 |
</rewrite>
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
+
<version>3.1.5</version>
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
100 |
</all>
|
101 |
<admin>
|
102 |
<children>
|
103 |
+
<catalog>
|
104 |
+
<children>
|
105 |
+
<searchanise>
|
106 |
+
<title>Searchanise Module</title>
|
107 |
+
<sort_order>1</sort_order>
|
108 |
+
</searchanise>
|
109 |
+
</children>
|
110 |
+
</catalog>
|
111 |
<system>
|
112 |
<children>
|
113 |
<config>
|
158 |
<!-- [v1.6] [v1.7] [v1.8] [v1.9] -->
|
159 |
<catalog_resource>
|
160 |
<rewrite>
|
|
|
161 |
<layer_filter_attribute>Simtech_Searchanise_Model_Resource_Layer_Filter_Attribute</layer_filter_attribute>
|
162 |
<layer_filter_price>Simtech_Searchanise_Model_Resource_Layer_Filter_Price</layer_filter_price>
|
163 |
</rewrite>
|
@@ -15,7 +15,7 @@
|
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
-
<version>3.1.
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
@@ -100,10 +100,14 @@
|
|
100 |
</all>
|
101 |
<admin>
|
102 |
<children>
|
103 |
-
<
|
104 |
-
<
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
107 |
<system>
|
108 |
<children>
|
109 |
<config>
|
@@ -153,7 +157,6 @@
|
|
153 |
<!-- [v1.6] [v1.7] [v1.8] [v1.9] -->
|
154 |
<!-- <catalog_resource>
|
155 |
<rewrite>
|
156 |
-
<product_collection>Simtech_Searchanise_Model_Resource_Product_Collection</product_collection>
|
157 |
<layer_filter_attribute>Simtech_Searchanise_Model_Resource_Layer_Filter_Attribute</layer_filter_attribute>
|
158 |
<layer_filter_price>Simtech_Searchanise_Model_Resource_Layer_Filter_Price</layer_filter_price>
|
159 |
</rewrite>
|
15 |
<config>
|
16 |
<modules>
|
17 |
<Simtech_Searchanise>
|
18 |
+
<version>3.1.5</version>
|
19 |
</Simtech_Searchanise>
|
20 |
</modules>
|
21 |
<frontend>
|
100 |
</all>
|
101 |
<admin>
|
102 |
<children>
|
103 |
+
<catalog>
|
104 |
+
<children>
|
105 |
+
<searchanise>
|
106 |
+
<title>Searchanise Module</title>
|
107 |
+
<sort_order>1</sort_order>
|
108 |
+
</searchanise>
|
109 |
+
</children>
|
110 |
+
</catalog>
|
111 |
<system>
|
112 |
<children>
|
113 |
<config>
|
157 |
<!-- [v1.6] [v1.7] [v1.8] [v1.9] -->
|
158 |
<!-- <catalog_resource>
|
159 |
<rewrite>
|
|
|
160 |
<layer_filter_attribute>Simtech_Searchanise_Model_Resource_Layer_Filter_Attribute</layer_filter_attribute>
|
161 |
<layer_filter_price>Simtech_Searchanise_Model_Resource_Layer_Filter_Price</layer_filter_price>
|
162 |
</rewrite>
|
@@ -35,6 +35,7 @@
|
|
35 |
<show_in_default>1</show_in_default>
|
36 |
<show_in_website>1</show_in_website>
|
37 |
<show_in_store>1</show_in_store>
|
|
|
38 |
<fields>
|
39 |
<search_input_selector translate="labe commentl">
|
40 |
<label><![CDATA[Search input jQuery selector]]></label>
|
35 |
<show_in_default>1</show_in_default>
|
36 |
<show_in_website>1</show_in_website>
|
37 |
<show_in_store>1</show_in_store>
|
38 |
+
<comment><![CDATA[<i>Note: Here is only a part of Searchanise settings. To view all settings, go to <b>Catalog → Searchanise</b></i>]]></comment>
|
39 |
<fields>
|
40 |
<search_input_selector translate="labe commentl">
|
41 |
<label><![CDATA[Search input jQuery selector]]></label>
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
2 |
<div class="page-title">
|
3 |
-
<h1
|
4 |
</div>
|
5 |
|
6 |
<div class="snize" id="snize_results"></div>
|
1 |
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
2 |
<div class="page-title">
|
3 |
+
<h1><?php echo $this->__('Search results')?></h1>
|
4 |
</div>
|
5 |
|
6 |
<div class="snize" id="snize_results"></div>
|
@@ -21,3 +21,4 @@
|
|
21 |
"Sort by Relevance", "Sort by Relevance"
|
22 |
"API key", "API key"
|
23 |
"Private key", "Private key"
|
|
21 |
"Sort by Relevance", "Sort by Relevance"
|
22 |
"API key", "API key"
|
23 |
"Private key", "Private key"
|
24 |
+
"Search results", "Search results"
|
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Simtech_Searchanise</name>
|
4 |
-
<version>3.1.
|
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,15 +10,20 @@
|
|
10 |
<description>Searchanise is a SaaS solution providing fast and smart search for online stores. It provides rapid search results and instant search suggestions presented in a fancy and customizable widget.
|
11 |

|
12 |
With the help of Searchanise Connector Add-on you will be able to connect your store to the service and start using the search widget in no time. Power up your store right now!</description>
|
13 |
-
<notes>[
|
14 |
-
[
|
15 |
-
[
|
16 |
-
[!]
|
17 |
-
[!]
|
|
|
|
|
|
|
|
|
|
|
18 |
<authors><author><name>Simbirsk Technologies, Ltd.</name><user>searchanise</user><email>sales@searchanise.com</email></author></authors>
|
19 |
-
<date>
|
20 |
-
<time>
|
21 |
-
<contents><target name="magecommunity"><dir name="Simtech"><dir name="Searchanise"><dir name="Block"><file name="Async.php" hash="
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.2.13</min><max>10.0.0</max></php></required></dependencies>
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Simtech_Searchanise</name>
|
4 |
+
<version>3.1.5</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 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>[+] Added the ability to change the access to the Searchanise settings.<br>
|
14 |
+
[*] Added a tip: how to find the Searchanise admin panel in the Magento admin portal.<br>
|
15 |
+
[*] Improved compatibility with third-party modules.<br>
|
16 |
+
[!] Fixed. There were no ability to translate the header of Search Results widget.<br>
|
17 |
+
[!] Fixed. You can't turn off the search and enable sorting on the Search Results page for title, sku, short_description attributes.<br>
|
18 |
+
[!] Fixed. Force re-indexation didn't work if the Add Store Code to Urls settings were enabled.<br>
|
19 |
+
[!] Fixed. Changes of the child products data didn't lead to sync these changes with Seachanise servers.<br>
|
20 |
+
[!] Fixed. The pagination on the default search results page didn't work properly if Searchanise engine was turned off.<br>
|
21 |
+
[!] Fixed. The search by short_description didn't work. If you tried to search products by description attribute on the advanced search page, then products were searched by short_description.<br>
|
22 |
+
[!] Fixed. The count of searched products don't show correctly on the advanced search result page.<br></notes>
|
23 |
<authors><author><name>Simbirsk Technologies, Ltd.</name><user>searchanise</user><email>sales@searchanise.com</email></author></authors>
|
24 |
+
<date>2017-03-24</date>
|
25 |
+
<time>11:02:18</time>
|
26 |
+
<contents><target name="magecommunity"><dir name="Simtech"><dir name="Searchanise"><dir name="Block"><file name="Async.php" hash="cf934007365e8b4aa0727e7a4bc9cafe"/><file name="Autocomplete.php" hash="efc89ac3f897be3bc307fba6a36778f0"/><file name="Jsinit.php" hash="1434dc8d8161e9f4d25f89d5fb76fdf5"/><dir name="Product"><dir name="List"><file name="Toolbar.php" hash="5477041c73350c0f32fdaf5b7c6b99fc"/></dir></dir><file name="Result.php" hash="dec7b27ab9511c956680eb60eba9b95e"/><file name="Resultwidget.php" hash="9b3ec31ad83ca02ca79bbdfc785f8afe"/></dir><dir name="Helper"><file name="ApiCategories.php" hash="06a5d63372280ef0feaa833b23388a09"/><file name="ApiPages.php" hash="40b2c244bb969d3d1a3202e34059e14e"/><file name="ApiProducts.php" hash="1415b35013cb0434efd55a798e78a8dc"/><file name="ApiSe.php" hash="60542609fd0a8cfe3ca992915dd9344b"/><file name="Data.php" hash="f0a9285f07e26a4e83bfa6d1e26070a7"/></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="Mysql4"><dir name="Advanced"><file name="Collection.php" hash="82f14d57f16becba0a576bfa35dc18cf"/></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="431fd272a82b1a2c9cfc54426a708c9d"/></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="fdcc506582d75078cfe47ff9c5ea9a91"/><file name="Queue.php" hash="dad05d5dda35cbbf6148c2bad13f9787"/><file name="Request.php" hash="02d5d46fdbd7923cbc407c40df1d68c0"/><dir name="Resource"><dir name="Advanced"><file name="Collection.php" hash="a79a8752cb9eecc92e51ea2f76cc10b6"/></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="3bec7542847447e2217b0a0e919042ac"/></dir><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="206e81ee170a56fac499169e66ad782d"/><file name="Price.php" hash="57d56f6841c0e2b89c21947aa2a23e86"/></dir></dir><file name="Store.php" hash="6a337d4b6561aa96b96236d66cc9aa30"/></dir><file name="Searchanise.php" hash="a925b75ff5b088f447cc3369c33335a1"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Searchanise"><dir name="Sync"><file name="Modes.php" hash="806d2debaa75419b57d036ae59808c98"/></dir><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="2492cc85796563ab1e0dafa14f053fe2"/></dir><file name="AsyncController.php" hash="0b93b97c95a5bdd19f528e4de403add8"/><file name="InfoController.php" hash="49f89219f996b46487f39cd818afb24c"/><file name="ResultController.php" hash="260d0eec9bcb5d2048cf2f0c0040a1cc"/></dir><dir name="etc"><file name="config.xml" hash="769a916655cbba3fd63dbc86852ec326"/><file name="config_without_search.xml" hash="05f6d5a3c04b2b964707153833976d1f"/><file name="system.xml" hash="f2847c45454484e706169db2e6f5d889"/></dir><dir name="sql"><dir name="searchanise_setup"><file name="mysql4-install-0.1.0.php" hash="754324c8783e9cc24de86396e1587e73"/><file name="mysql4-upgrade-3.1.1-3.1.2.php" hash="e231089afcc5e6a0e3e75f754a80a6f7"/></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="31feeecd593c462b146587ce3db07132"/></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="0e2795c2e3c5f5af5544bb8471d67037"/></dir><dir name="template"><dir name="searchanise"><file name="resultwidget.phtml" hash="41fa2a8d9ac9ff2d406c153e5267f1c3"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Simtech_Searchanise.xml" hash="04148681a6648bd370ab62140cbf2ad9"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Simtech_Searchanise.csv" hash="4ffa0a947d13ab70fcf7b2077cb69a56"/></dir></target></contents>
|
27 |
<compatible/>
|
28 |
<dependencies><required><php><min>5.2.13</min><max>10.0.0</max></php></required></dependencies>
|
29 |
</package>
|