Vubla_Search - Version 1.0.2

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.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/Vubla/Search/Helper/Data.php CHANGED
@@ -34,6 +34,8 @@ class Vubla_Search_Helper_Data extends Mage_Core_Helper_Abstract
34
35
protected function _getData()
36
{
37
if(is_null($this->_data)){
38
$queryURL = $this->_getVublaUrl();
39
// Create the stream context
34
35
protected function _getData()
36
{
37
+
38
+
39
if(is_null($this->_data)){
40
$queryURL = $this->_getVublaUrl();
41
// Create the stream context
app/code/community/Vubla/Search/Helper/Url.php CHANGED
@@ -24,8 +24,6 @@
24
*/
25
class Vubla_Search_Helper_Url extends Mage_Core_Helper_Abstract
26
{
27
-
28
-
29
private $_param = array();
30
31
public function setParam($name, $value)
@@ -63,7 +61,7 @@ class Vubla_Search_Helper_Url extends Mage_Core_Helper_Abstract
63
64
private function _getVublaHost()
65
{
66
- return 'alex.vubla.com/development/api';
67
}
68
69
public function getUrl()
24
*/
25
class Vubla_Search_Helper_Url extends Mage_Core_Helper_Abstract
26
{
27
private $_param = array();
28
29
public function setParam($name, $value)
61
62
private function _getVublaHost()
63
{
64
+ return 'api.vubla.com';
65
}
66
67
public function getUrl()
app/code/community/Vubla/Search/Model/Api.php ADDED
@@ -0,0 +1,44 @@
1
+ <?php
2
+ /**
3
+ * ############################################################################
4
+ * _ _ _ _ _ _ _ _ _ _
5
+ * (_) (_)(_) (_)(_)(_)(_)(_) _ (_) _(_)_
6
+ * (_) (_)(_) (_) (_) (_)(_) _(_) (_)_
7
+ * (_)_ _(_)(_) (_) (_) _ _ _(_)(_) _(_) (_)_
8
+ * (_) (_) (_) (_) (_)(_)(_)(_)_ (_) (_) _ _ _ (_)
9
+ * (_) (_) (_) (_) (_) (_)(_) (_)(_)(_)(_)(_)
10
+ * (_)_(_) (_)_ _ _ _(_) (_)_ _ _ (_)(_) _ _ _ _ (_) (_)
11
+ * (_) (_)(_)(_)(_) (_)(_)(_)(_) (_)(_)(_)(_)(_)(_) (_)
12
+ * ############################ NOTICE OF LICENSE #############################
13
+ *
14
+ * This source file is subject to the Open Software License (OSL 3.0)
15
+ * It is available through the world-wide-web at this URL:
16
+ * http://opensource.org/licenses/osl-3.0.php
17
+ * If you are unable to obtain a copy from the above URL, please don't
18
+ * hesitate to contact info@vubla.com.
19
+ *
20
+ * @category Vubla
21
+ * @package Vubla_Search
22
+ * @copyright Copyright (c) 2012 Vubla I/S. (http://www.vubla.com)
23
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24
+ */
25
+ class Vubla_Search_Model_Api extends Mage_Api_Model_Resource_Abstract
26
+ {
27
+
28
+ public function fetch()
29
+ {
30
+ $entries = Mage::getSingleton('core/resource')
31
+ ->getConnection('core_read')
32
+ ->select()
33
+ ->from(array('catalogsearch_query'))
34
+ ->query()
35
+ ->fetchAll();
36
+
37
+ return (array) $entries;
38
+
39
+
40
+ }
41
+
42
+
43
+ }
44
+
app/code/community/Vubla/Search/Model/Resource/Setup.php CHANGED
@@ -26,6 +26,7 @@ class Vubla_Search_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
26
{
27
private final function getApiKey()
28
{
29
$salt = 'aa72cc2d9ae77ea226537e6c929f68bd';
30
return md5(print_r($_SERVER,true) . microtime() . $salt);
31
}
26
{
27
private final function getApiKey()
28
{
29
+ if(strpos($_SERVER['HTTP_HOST'], 'vubla.com') !== false){ return 'test_api_key'; }
30
$salt = 'aa72cc2d9ae77ea226537e6c929f68bd';
31
return md5(print_r($_SERVER,true) . microtime() . $salt);
32
}
app/code/community/Vubla/Search/etc/api.xml ADDED
@@ -0,0 +1,32 @@
1
+ <config>
2
+ <api>
3
+ <resources>
4
+ <vubla_search translate="title" module="vubla">
5
+ <title>Vubla Search</title>
6
+ <acl>vubla_search</acl>
7
+ <model>Vubla_Search_Model_Api</model>
8
+ <methods>
9
+ <fetch translate="title" module="vubla">
10
+ <title>Retrive Log</title>
11
+ <acl>vubla_search/fetch</acl>
12
+ </fetch>
13
+
14
+ </methods>
15
+
16
+ </vubla_search>
17
+ </resources>
18
+ <acl>
19
+ <resources>
20
+ <vubla_search translate="title" module="vubla">
21
+ <title>Vubla Search</title>
22
+ <fetch translate="title" module="vubla">
23
+ <title>Retrieve Log</title>
24
+
25
+ </fetch>
26
+
27
+ </vubla_search>
28
+ </resources>
29
+ </acl>
30
+ </api>
31
+
32
+ </config>
app/code/community/Vubla/Search/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
<config>
4
<modules>
5
<Vubla_Search>
6
- <version>1.0.1</version>
7
</Vubla_Search>
8
</modules>
9
<global>
3
<config>
4
<modules>
5
<Vubla_Search>
6
+ <version>1.0.2</version>
7
</Vubla_Search>
8
</modules>
9
<global>
app/code/community/Vubla/Search/sql/vubla_setup/{install-1.0.0.php → install-1.0.2.php} RENAMED
File without changes
app/code/community/Vubla/Search/sql/vubla_setup/mysql4-install-1.0.2.php ADDED
@@ -0,0 +1,29 @@
1
+ <?php
2
+ /**
3
+ * ############################################################################
4
+ * _ _ _ _ _ _ _ _ _ _
5
+ * (_) (_)(_) (_)(_)(_)(_)(_) _ (_) _(_)_
6
+ * (_) (_)(_) (_) (_) (_)(_) _(_) (_)_
7
+ * (_)_ _(_)(_) (_) (_) _ _ _(_)(_) _(_) (_)_
8
+ * (_) (_) (_) (_) (_)(_)(_)(_)_ (_) (_) _ _ _ (_)
9
+ * (_) (_) (_) (_) (_) (_)(_) (_)(_)(_)(_)(_)
10
+ * (_)_(_) (_)_ _ _ _(_) (_)_ _ _ (_)(_) _ _ _ _ (_) (_)
11
+ * (_) (_)(_)(_)(_) (_)(_)(_)(_) (_)(_)(_)(_)(_)(_) (_)
12
+ * ############################ NOTICE OF LICENSE #############################
13
+ *
14
+ * This source file is subject to the Open Software License (OSL 3.0)
15
+ * It is available through the world-wide-web at this URL:
16
+ * http://opensource.org/licenses/osl-3.0.php
17
+ * If you are unable to obtain a copy from the above URL, please don't
18
+ * hesitate to contact info@vubla.com.
19
+ *
20
+ * @category Vubla
21
+ * @package Vubla_Search
22
+ * @copyright Copyright (c) 2012 Vubla I/S. (http://www.vubla.com)
23
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24
+ */
25
+
26
+ $installer = $this;
27
+ $installer->startSetup();
28
+ $installer->createApiUser();
29
+ $installer->endSetup();
app/design/frontend/base/default/layout/vublasearch.xml CHANGED
@@ -1,6 +1,30 @@
1
<?xml version="1.0"?>
2
-
3
- <layout version="1.0.0">
4
5
<default>
6
<reference name="header">
1
<?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * ############################################################################
5
+ * _ _ _ _ _ _ _ _ _ _
6
+ * (_) (_)(_) (_)(_)(_)(_)(_) _ (_) _(_)_
7
+ * (_) (_)(_) (_) (_) (_)(_) _(_) (_)_
8
+ * (_)_ _(_)(_) (_) (_) _ _ _(_)(_) _(_) (_)_
9
+ * (_) (_) (_) (_) (_)(_)(_)(_)_ (_) (_) _ _ _ (_)
10
+ * (_) (_) (_) (_) (_) (_)(_) (_)(_)(_)(_)(_)
11
+ * (_)_(_) (_)_ _ _ _(_) (_)_ _ _ (_)(_) _ _ _ _ (_) (_)
12
+ * (_) (_)(_)(_)(_) (_)(_)(_)(_) (_)(_)(_)(_)(_)(_) (_)
13
+ * ############################ NOTICE OF LICENSE #############################
14
+ *
15
+ * This source file is subject to the Open Software License (OSL 3.0)
16
+ * It is available through the world-wide-web at this URL:
17
+ * http://opensource.org/licenses/osl-3.0.php
18
+ * If you are unable to obtain a copy from the above URL, please don't
19
+ * hesitate to contact info@vubla.com.
20
+ *
21
+ * @category Vubla
22
+ * @package Vubla_Search
23
+ * @copyright Copyright (c) 2012 Vubla I/S. (http://www.vubla.com)
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">
app/etc/modules/Vubla_Search.xml CHANGED
@@ -1,13 +1,26 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
/**
4
- * Magento
5
*
6
- * NOTICE OF LICENSE
7
*
8
* @category Vubla
9
* @package Vubla_Search
10
- * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
11
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
12
*/
13
-->
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
/**
4
+ * ############################################################################
5
+ * _ _ _ _ _ _ _ _ _ _
6
+ * (_) (_)(_) (_)(_)(_)(_)(_) _ (_) _(_)_
7
+ * (_) (_)(_) (_) (_) (_)(_) _(_) (_)_
8
+ * (_)_ _(_)(_) (_) (_) _ _ _(_)(_) _(_) (_)_
9
+ * (_) (_) (_) (_) (_)(_)(_)(_)_ (_) (_) _ _ _ (_)
10
+ * (_) (_) (_) (_) (_) (_)(_) (_)(_)(_)(_)(_)
11
+ * (_)_(_) (_)_ _ _ _(_) (_)_ _ _ (_)(_) _ _ _ _ (_) (_)
12
+ * (_) (_)(_)(_)(_) (_)(_)(_)(_) (_)(_)(_)(_)(_)(_) (_)
13
+ * ############################ NOTICE OF LICENSE #############################
14
*
15
+ * This source file is subject to the Open Software License (OSL 3.0)
16
+ * It is available through the world-wide-web at this URL:
17
+ * http://opensource.org/licenses/osl-3.0.php
18
+ * If you are unable to obtain a copy from the above URL, please don't
19
+ * hesitate to contact info@vubla.com.
20
*
21
* @category Vubla
22
* @package Vubla_Search
23
+ * @copyright Copyright (c) 2012 Vubla I/S. (http://www.vubla.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
-->
package.xml CHANGED
@@ -1,7 +1,7 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Vubla_Search</name>
4
- <version>1.0.1</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-13</date>
16
- <time>07:55:35</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="946e95df9c3d46b7c6a1259d73c09a43"/><file name="Url.php" hash="5c67a6cbdebce73f5db4af6ce77db8fa"/></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="eaa8b8f3541135745d47cbd4111e8896"/></dir><file name="Suggestion.php" hash="15136e73a17bd6442312eb0bd5445f28"/></dir><dir name="etc"><file name="config.xml" hash="7296f9a42c35638d1c46702809dcf4ee"/></dir><dir name="sql"><dir name="vubla_setup"><file name="install-1.0.0.php" hash="fdc8bdbd6e69298ad6efff1efcb545fd"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vubla_Search.xml" hash="c27e838df16539f0c59a60ddaebab744"/></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="229e1eaf614312ac1f975f99e406f029"/></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.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
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>