Vubla_Search - Version 1.1.0

Version Notes

First release for Magento Connect.
Includes:
Vubla Search Engine Interface, Vubla Suggestion Interface, setup of API user and role (except API-key), and integration with layered navigation by rewriting some of catalogsearch module.

Download this release

Release Info

Developer Magento Core Team
Extension Vubla_Search
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.2 to 1.1.0

app/code/community/Vubla/Search/Block/Logo.php CHANGED
@@ -24,9 +24,9 @@
24
  */
25
  class Vubla_Search_Block_Logo extends Mage_Core_Block_Template
26
  {
27
- protected function useVubla()
28
  {
29
- return Mage::helper('vubla/data')->useVubla();
30
  }
31
  }
32
 
24
  */
25
  class Vubla_Search_Block_Logo extends Mage_Core_Block_Template
26
  {
27
+ protected function displayLogo()
28
  {
29
+ return Mage::helper('vubla/data')->displayLogo();
30
  }
31
  }
32
 
app/code/community/Vubla/Search/Helper/Data.php CHANGED
@@ -65,6 +65,7 @@ class Vubla_Search_Helper_Data extends Mage_Core_Helper_Abstract
65
  $this->_useVubla = true;
66
  $this->_saveProductsForSorting();
67
  $this->_addDidYouMean();
 
68
  }
69
 
70
  return $this->_data;
@@ -83,6 +84,19 @@ class Vubla_Search_Helper_Data extends Mage_Core_Helper_Abstract
83
  return $res;
84
  }
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  public function useVubla()
87
  {
88
  if(is_null($this->_useVubla))
@@ -157,6 +171,47 @@ class Vubla_Search_Helper_Data extends Mage_Core_Helper_Abstract
157
  '</a>'));
158
  }
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  protected function _saveProductsForSorting()
161
  {
162
  $productIds = $this->getProductids();
65
  $this->_useVubla = true;
66
  $this->_saveProductsForSorting();
67
  $this->_addDidYouMean();
68
+ $this->_addRelatedSearches();
69
  }
70
 
71
  return $this->_data;
84
  return $res;
85
  }
86
 
87
+ public function displayLogo()
88
+ {
89
+ $data = $this->_getData();
90
+ if(!isset($data->display_logo) || $data->display_logo == 1)
91
+ {
92
+ return $this->useVubla();
93
+ }
94
+ else
95
+ {
96
+ return false;
97
+ }
98
+ }
99
+
100
  public function useVubla()
101
  {
102
  if(is_null($this->_useVubla))
171
  '</a>'));
172
  }
173
 
174
+ public function getRelatedSearches()
175
+ {
176
+ $data = $this->_getData();
177
+ if(is_null($data) || !isset($data->related_searches))
178
+ {
179
+ return null;
180
+ }
181
+ return $data->related_searches;
182
+ }
183
+
184
+ protected function _addRelatedSearches()
185
+ {
186
+ $related = $this->getRelatedSearches();
187
+ if(!is_array($related) or !empty($this->_getData()->products)) {
188
+ return;
189
+ }
190
+ $rs = array();
191
+ foreach ($related as $value) {
192
+
193
+ $rs[] = ' <a href="'.Mage::helper('catalogsearch')->getResultUrl($value->word).'">'.
194
+ $value->word . '(' . $value->products . ')'.
195
+ '</a>';
196
+ }
197
+ if(!empty($rs))
198
+ {
199
+ $msg = implode(', ', $rs);
200
+ $original = Mage::helper('catalogsearch')->getQueryText();;
201
+ $this->_addRelatedSearchesMessage($msg, $original);
202
+ }
203
+
204
+ }
205
+
206
+ protected function _addRelatedSearchesMessage($searches_string, $original)
207
+ {
208
+ Mage::helper('catalogsearch')->addNoteMessage(
209
+ $this->__('We did not find any results on: %s, but we found something on: %s', $original,
210
+ $searches_string));
211
+ }
212
+
213
+
214
+
215
  protected function _saveProductsForSorting()
216
  {
217
  $productIds = $this->getProductids();
app/code/community/Vubla/Search/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Vubla_Search>
6
- <version>1.0.2</version>
7
  </Vubla_Search>
8
  </modules>
9
  <global>
3
  <config>
4
  <modules>
5
  <Vubla_Search>
6
+ <version>1.1.0</version>
7
  </Vubla_Search>
8
  </modules>
9
  <global>
app/code/community/Vubla/Search/sql/vubla_setup/{install-1.0.2.php → install-1.1.0.php} RENAMED
File without changes
app/code/community/Vubla/Search/sql/vubla_setup/{mysql4-install-1.0.2.php → mysql4-install-1.1.0.php} RENAMED
File without changes
app/design/frontend/base/default/layout/vublasearch.xml CHANGED
@@ -24,7 +24,7 @@
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  -->
27
- <layout version="1.0.2">
28
 
29
  <default>
30
  <reference name="header">
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  -->
27
+ <layout version="1.1.0">
28
 
29
  <default>
30
  <reference name="header">
app/design/frontend/base/default/template/vubla/logo.phtml CHANGED
@@ -23,7 +23,7 @@
23
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24
  */
25
  ?>
26
- <?php if($this->useVubla()): ?>
27
  <div class="block-vubla-logo">
28
  <a target="_blank" href="http://www.vubla.com">
29
  <img alt="Search powered by Vubla" style="display: block; margin-left: auto;margin-right: auto" src="http://www.vubla.dk/downloads/images/powered-by-logo.png" />
23
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24
  */
25
  ?>
26
+ <?php if($this->displayLogo()): ?>
27
  <div class="block-vubla-logo">
28
  <a target="_blank" href="http://www.vubla.com">
29
  <img alt="Search powered by Vubla" style="display: block; margin-left: auto;margin-right: auto" src="http://www.vubla.dk/downloads/images/powered-by-logo.png" />
app/locale/da_DK/Vubla_Search.csv CHANGED
@@ -1 +1,2 @@
1
  "Did you mean: %s?","Mente du: %s?"
 
1
  "Did you mean: %s?","Mente du: %s?"
2
+ "We did not find any results on: %s, but we found something on: %s","Vi fandt ikke nogen resultater på: %s, men vi fandt noget på: %s"
app/locale/en_US/Vubla_Search.csv CHANGED
@@ -1 +1,2 @@
1
  "Did you mean: %s?","Did you mean: %s?"
 
1
  "Did you mean: %s?","Did you mean: %s?"
2
+ "We did not find any results on: %s, but we found something on: %s","We did not find any results on: %s, but we found something on: %s"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Vubla_Search</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -12,9 +12,9 @@
12
  Includes:&#xD;
13
  Vubla Search Engine Interface, Vubla Suggestion Interface, setup of API user and role (except API-key), and integration with layered navigation by rewriting some of catalogsearch module.</notes>
14
  <authors><author><name>Vubla Development Team</name><user>auto-converted</user><email>info@vubla.com</email></author></authors>
15
- <date>2012-08-15</date>
16
- <time>13:30:30</time>
17
- <contents><target name="magecommunity"><dir name="Vubla"><dir name="Search"><dir name="Block"><file name="Autocomplete.php" hash="1b422be99be594d3287913c768904a83"/><file name="Logo.php" hash="bb9709c432d5e1a85e24bae6cebca57e"/></dir><dir name="Helper"><file name="Data.php" hash="f277543d54c07610fddadd76e86a985b"/><file name="Url.php" hash="3a68eb7b99ef0c887f63dfc5533a912b"/></dir><dir name="Model"><dir name="Resource"><dir name="Fulltext"><file name="Collection.php" hash="2393bde964091973d053bbba4c7bca06"/></dir><dir name="Suggestion"><file name="Collection.php" hash="d2c653e2de735c6b091d4525c359c7f9"/></dir><file name="Setup.php" hash="d20b58f8994c113d6f3a7fcd2a27557b"/></dir><file name="Api.php" hash="06e45deaac3aa4130001086f7627962b"/><file name="Suggestion.php" hash="15136e73a17bd6442312eb0bd5445f28"/></dir><dir name="etc"><file name="api.xml" hash="43dcbb78fe02e9173f4f82080f5c8ac3"/><file name="config.xml" hash="ca8ca1b48360efdea05da19c18dde2bf"/></dir><dir name="sql"><dir name="vubla_setup"><file name="install-1.0.2.php" hash="fdc8bdbd6e69298ad6efff1efcb545fd"/><file name="mysql4-install-1.0.2.php" hash="fdc8bdbd6e69298ad6efff1efcb545fd"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vubla_Search.xml" hash="852f8041351e4b346e3a89de246e8e1c"/></dir></target><target name="mageweb"><dir name="js"><dir name="vubla"><file name="suggestion.js" hash="65aa0b5ee0dbe3102765d16523280c67"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="vubla"><file name="form.mini.phtml" hash="6992ac2e116e61a8ea9c693e4bbc01a4"/><file name="logo.phtml" hash="3971511e80a79ad27fb997281ebe591a"/></dir></dir><dir name="layout"><file name="vublasearch.xml" hash="3212465dcc88dd2705ef563a1501394c"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="da_DK"><file name="Vubla_Search.csv" hash="e8478cff765e893d756d776b8ec0ea87"/></dir><dir name="en_US"><file name="Vubla_Search.csv" hash="f04e410fd1f54285b696f99ac546891e"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><package><name>Catalog_Search</name><channel>community</channel><min></min><max></max></package><package><name>Catalog</name><channel>community</channel><min></min><max></max></package></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Vubla_Search</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
12
  Includes:&#xD;
13
  Vubla Search Engine Interface, Vubla Suggestion Interface, setup of API user and role (except API-key), and integration with layered navigation by rewriting some of catalogsearch module.</notes>
14
  <authors><author><name>Vubla Development Team</name><user>auto-converted</user><email>info@vubla.com</email></author></authors>
15
+ <date>2012-08-17</date>
16
+ <time>13:18:20</time>
17
+ <contents><target name="magecommunity"><dir name="Vubla"><dir name="Search"><dir name="Block"><file name="Autocomplete.php" hash="1b422be99be594d3287913c768904a83"/><file name="Logo.php" hash="80d37f33478f44f9d4f08e85d1d43bbf"/></dir><dir name="Helper"><file name="Data.php" hash="bae261409776675e8435c14495fdd830"/><file name="Url.php" hash="3a68eb7b99ef0c887f63dfc5533a912b"/></dir><dir name="Model"><dir name="Resource"><dir name="Fulltext"><file name="Collection.php" hash="2393bde964091973d053bbba4c7bca06"/></dir><dir name="Suggestion"><file name="Collection.php" hash="d2c653e2de735c6b091d4525c359c7f9"/></dir><file name="Setup.php" hash="d20b58f8994c113d6f3a7fcd2a27557b"/></dir><file name="Api.php" hash="06e45deaac3aa4130001086f7627962b"/><file name="Suggestion.php" hash="15136e73a17bd6442312eb0bd5445f28"/></dir><dir name="etc"><file name="api.xml" hash="43dcbb78fe02e9173f4f82080f5c8ac3"/><file name="config.xml" hash="e1cf95d58f57b52bca05811fc8c29212"/></dir><dir name="sql"><dir name="vubla_setup"><file name="install-1.1.0.php" hash="fdc8bdbd6e69298ad6efff1efcb545fd"/><file name="mysql4-install-1.1.0.php" hash="fdc8bdbd6e69298ad6efff1efcb545fd"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vubla_Search.xml" hash="852f8041351e4b346e3a89de246e8e1c"/></dir></target><target name="mageweb"><dir name="js"><dir name="vubla"><file name="suggestion.js" hash="65aa0b5ee0dbe3102765d16523280c67"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="vubla"><file name="form.mini.phtml" hash="6992ac2e116e61a8ea9c693e4bbc01a4"/><file name="logo.phtml" hash="edaad93197bed7a261bc38aaf79d8a16"/></dir></dir><dir name="layout"><file name="vublasearch.xml" hash="61edba5d80946254eff1e9c5ff9575f5"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="da_DK"><file name="Vubla_Search.csv" hash="2c722f45007427c169db0363eb9cec1c"/></dir><dir name="en_US"><file name="Vubla_Search.csv" hash="be0a01ab6d5c799c80db857708e93cd3"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><package><name>Catalog_Search</name><channel>community</channel><min></min><max></max></package><package><name>Catalog</name><channel>community</channel><min></min><max></max></package></required></dependencies>
20
  </package>