Version Notes
Bugfixes:
- added pagination in feed towards wiser search for high volume webshops
Download this release
Release Info
Developer | Niels - Rejuni |
Extension | wiser_search |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
app/code/community/Wiser/Search/controllers/IndexController.php
CHANGED
@@ -50,7 +50,7 @@ class Wiser_Search_IndexController extends Mage_Core_Controller_Front_Action {
|
|
50 |
$xmlFeed = $Feed->build_xml($_Products, $_Configuration, "page");
|
51 |
} else {
|
52 |
// Product feed
|
53 |
-
$this->_buildProductsArray($storeId);
|
54 |
|
55 |
foreach($this->_ProductIds as $iProduct)
|
56 |
{
|
@@ -118,13 +118,17 @@ class Wiser_Search_IndexController extends Mage_Core_Controller_Front_Action {
|
|
118 |
$this->getResponse()->setHttpResponseCode(401);
|
119 |
}
|
120 |
|
121 |
-
private function _buildProductsArray($storeId)
|
122 |
{
|
123 |
-
$this->_Products = Mage::getModel('catalog/product')->getCollection()
|
|
|
|
|
124 |
$this->_Products->addAttributeToFilter('status', 1);//enabled
|
125 |
$this->_Products->addAttributeToFilter('visibility', array('gt' => 2));// search only OR catalog, search
|
126 |
$this->_Products->addAttributeToSelect('*');
|
127 |
-
|
|
|
|
|
128 |
}
|
129 |
|
130 |
private function _sendHeader()
|
50 |
$xmlFeed = $Feed->build_xml($_Products, $_Configuration, "page");
|
51 |
} else {
|
52 |
// Product feed
|
53 |
+
$this->_buildProductsArray($storeId, isset($_GET['pagenr']) ? (int)$_GET['pagenr'] : 1);
|
54 |
|
55 |
foreach($this->_ProductIds as $iProduct)
|
56 |
{
|
118 |
$this->getResponse()->setHttpResponseCode(401);
|
119 |
}
|
120 |
|
121 |
+
private function _buildProductsArray($storeId, $pageNr)
|
122 |
{
|
123 |
+
$this->_Products = Mage::getModel('catalog/product')->getCollection();
|
124 |
+
|
125 |
+
$this->_Products->setStoreId($storeId)->addWebsiteFilter(Mage::getModel('core/store')->load($storeId)->getWebsiteId());
|
126 |
$this->_Products->addAttributeToFilter('status', 1);//enabled
|
127 |
$this->_Products->addAttributeToFilter('visibility', array('gt' => 2));// search only OR catalog, search
|
128 |
$this->_Products->addAttributeToSelect('*');
|
129 |
+
|
130 |
+
$itemsPerPage = 500;
|
131 |
+
$this->_ProductIds = $this->_Products->getAllIds($itemsPerPage, ($pageNr - 1) * $itemsPerPage); /* items, offset */
|
132 |
}
|
133 |
|
134 |
private function _sendHeader()
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
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>
|
@@ -9,12 +9,11 @@
|
|
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 |
-
-
|
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-
|
16 |
-
<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="
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.4.0.</min><max>7.0.2.</max></php></required></dependencies>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>wiser_search</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
<channel>community</channel>
|
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 |
+
- added pagination in feed towards wiser search for high volume webshops</notes>
|
|
|
13 |
<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>
|
14 |
+
<date>2016-02-15</date>
|
15 |
+
<time>18:45:57</time>
|
16 |
+
<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="1ee8413f5cfec6fada96e0e4c9cf60c3"/></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>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.4.0.</min><max>7.0.2.</max></php></required></dependencies>
|
19 |
</package>
|