Version Notes
Bugfixes:
- Extension now filters non UTF-8 characters
- Removed root category from category filter
Download this release
Release Info
| Developer | Niels - Rejuni |
| Extension | wiser_search |
| Version | 1.0.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.1 to 1.0.2
app/code/community/Wiser/Search/Helper/ProductData.php
CHANGED
|
@@ -86,12 +86,15 @@ class Wiser_Search_Helper_ProductData
|
|
| 86 |
{
|
| 87 |
continue;
|
| 88 |
}
|
| 89 |
-
|
| 90 |
-
$catnames = array();
|
| 91 |
|
|
|
|
| 92 |
foreach ($CategoryModel->getParentCategories() as $parent) {
|
| 93 |
-
|
|
|
|
|
|
|
| 94 |
}
|
|
|
|
| 95 |
|
| 96 |
if(count($catnames) > 0 ){
|
| 97 |
array_push($main, $catnames[0]);
|
|
@@ -108,7 +111,6 @@ class Wiser_Search_Helper_ProductData
|
|
| 108 |
$Categories['main'] = implode("~", $main);
|
| 109 |
$Categories['sub'] = implode("~", $sub);
|
| 110 |
|
| 111 |
-
|
| 112 |
return $Categories;
|
| 113 |
}
|
| 114 |
}
|
| 86 |
{
|
| 87 |
continue;
|
| 88 |
}
|
| 89 |
+
*/
|
|
|
|
| 90 |
|
| 91 |
+
$catnames = array();
|
| 92 |
foreach ($CategoryModel->getParentCategories() as $parent) {
|
| 93 |
+
if( $parent->getLevel() != 1 ) { // Don't show root category as category
|
| 94 |
+
$catnames[] = $parent->getName();
|
| 95 |
+
}
|
| 96 |
}
|
| 97 |
+
$catnames[] = $CategoryModel->getName();
|
| 98 |
|
| 99 |
if(count($catnames) > 0 ){
|
| 100 |
array_push($main, $catnames[0]);
|
| 111 |
$Categories['main'] = implode("~", $main);
|
| 112 |
$Categories['sub'] = implode("~", $sub);
|
| 113 |
|
|
|
|
| 114 |
return $Categories;
|
| 115 |
}
|
| 116 |
}
|
app/code/community/Wiser/Search/Helper/XmlFeed.php
CHANGED
|
@@ -34,7 +34,8 @@ class Wiser_Search_Helper_XmlFeed
|
|
| 34 |
private function _clean_string($string)
|
| 35 |
{
|
| 36 |
$string = strip_tags($string);
|
| 37 |
-
|
|
|
|
| 38 |
return $string;
|
| 39 |
}
|
| 40 |
}
|
| 34 |
private function _clean_string($string)
|
| 35 |
{
|
| 36 |
$string = strip_tags($string);
|
| 37 |
+
// iconv removes non utf8 characters this way
|
| 38 |
+
$string = iconv("UTF-8","UTF-8//IGNORE",str_replace(array('"',"\r\n","\n","\r","\t"), array(""," "," "," ",""), $string));
|
| 39 |
return $string;
|
| 40 |
}
|
| 41 |
}
|
app/code/community/Wiser/Search/controllers/IndexController.php
CHANGED
|
@@ -101,6 +101,10 @@ class Wiser_Search_IndexController extends Mage_Core_Controller_Front_Action {
|
|
| 101 |
|
| 102 |
array_push($_Products, $_Store);
|
| 103 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
$xmlFeed = $Feed->build_xml($_Products, $_Configuration, "shop");
|
| 106 |
}
|
| 101 |
|
| 102 |
array_push($_Products, $_Store);
|
| 103 |
}
|
| 104 |
+
|
| 105 |
+
$_Configuration['php_version'] = phpversion();
|
| 106 |
+
$_Configuration['platform'] = "Magento";
|
| 107 |
+
$_Configuration['platform_version'] = Mage::getVersion();
|
| 108 |
|
| 109 |
$xmlFeed = $Feed->build_xml($_Products, $_Configuration, "shop");
|
| 110 |
}
|
package.xml
CHANGED
|
@@ -1,18 +1,20 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>wiser_search</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GPL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Quickly have your search results on screen while typing, advanced statistics and advanced layered navigation</summary>
|
| 10 |
<description>Show search results to your customers while typing, indexes both products and pages. Allows the webshop administrator to view advanced search statistics.</description>
|
| 11 |
-
<notes>
|
|
|
|
|
|
|
| 12 |
<authors><author><name>Niels - Rejuni</name><user>niels</user><email>niels@rejuni.nl</email></author><author><name>Remco - Rejuni</name><user>remco</user><email>remco@rejuni.nl</email></author></authors>
|
| 13 |
-
<date>2016-
|
| 14 |
-
<time>20:
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Wiser"><dir name="Search"><dir name="Helper"><file name="Data.php" hash="d127ac82b4dd20580f24d1bdc0eb9349"/><file name="ProductData.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.4.0.</min><max>7.0.2.</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>wiser_search</name>
|
| 4 |
+
<version>1.0.2</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GPL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Quickly have your search results on screen while typing, advanced statistics and advanced layered navigation</summary>
|
| 10 |
<description>Show search results to your customers while typing, indexes both products and pages. Allows the webshop administrator to view advanced search statistics.</description>
|
| 11 |
+
<notes>Bugfixes:
|
| 12 |
+
- Extension now filters non UTF-8 characters
|
| 13 |
+
- Removed root category from category filter</notes>
|
| 14 |
<authors><author><name>Niels - Rejuni</name><user>niels</user><email>niels@rejuni.nl</email></author><author><name>Remco - Rejuni</name><user>remco</user><email>remco@rejuni.nl</email></author></authors>
|
| 15 |
+
<date>2016-02-04</date>
|
| 16 |
+
<time>19:20:06</time>
|
| 17 |
+
<contents><target name="magecommunity"><dir name="Wiser"><dir name="Search"><dir name="Helper"><file name="Data.php" hash="d127ac82b4dd20580f24d1bdc0eb9349"/><file name="ProductData.php" hash="1f370f53136b4089c2c884482da4e420"/><file name="SimpleXml.php" hash="ee3906507dd83a9b540e5fb2afaf767e"/><file name="XmlFeed.php" hash="259ab0f3ae673d7395db37c794f9bc02"/></dir><dir name="Model"><file name="Observer.php" hash="d2186e3c03b3495cf6dd7d0b326a5bcb"/></dir><dir name="controllers"><file name="IndexController.php" hash="db74ab3752f6057b5893a7e2c2d43033"/></dir><dir name="etc"><file name="config.xml" hash="882ea88ebe19af202f3c56ea23397dad"/><file name="system.xml" hash="89c471d8aa5eeeb294f9c2b272f5ac56"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Wiser_Search.xml" hash="4a518f78635b9e09b5b907a096b1ae91"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="wiser_search.xml" hash="f66cf33d0e88676e86bba6f0c561e485"/></dir><dir name="template"><dir name="wiser_search"><file name="conversion.phtml" hash="a5538d15d4f43989a2513b3449258dec"/></dir></dir></dir></dir></dir></target></contents>
|
| 18 |
<compatible/>
|
| 19 |
<dependencies><required><php><min>5.4.0.</min><max>7.0.2.</max></php></required></dependencies>
|
| 20 |
</package>
|
