Skip to content

Commit

Permalink
Bugfix for 'did you mean' html, release 1.6.1-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenvermeulen committed Jul 13, 2014
1 parent b3930cf commit 03a7822
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/app/design/frontend/base/default/layout/*.xml
/app/design/frontend/base/default/layout/sales
/app/design/frontend/base/default/template/*
!/app/design/frontend/base/default/template/solarium
!/app/design/frontend/base/default/template/jeroenvermeulen
/app/design/frontend/default
/app/design/install
/app/etc/modules/Cm_*
Expand Down
3 changes: 2 additions & 1 deletion app/code/community/JeroenVermeulen/Solarium/Model/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,8 @@ public function search( $storeId, $queryString, $try = 1 ) {
}
arsort( $suggest, SORT_NUMERIC );
if ( $doAutoCorrect && empty($result) && !empty($suggest) ) {
$bestMatch = reset( array_keys($suggest) );
$suggestKeys = array_keys($suggest);
$bestMatch = reset($suggestKeys);
array_shift($suggest);
$result = $this->search( $storeId, $bestMatch, $try+1 );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</default>
<catalogsearch_result_index>
<reference name="content">
<block type="core/template" template="solarium/suggest.phtml" before="-" />
<block type="core/template" template="jeroenvermeulen/solarium/suggest.phtml" before="-" />
</reference>
</catalogsearch_result_index>
</layout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php if ($suggestions = Mage::registry('solarium_suggest')): ?>
<ul class="messages">
<li class="notice-msg">
<ul>
<li><span>
<?php echo Mage::helper('jeroenvermeulen_solarium')->__('Did you mean: '); ?>
<?php $counter = 0; ?>
<?php foreach ($suggestions as $suggestion => $result_count): ?>
<?php $counter++; if ( 1 < $counter ): ?>&nbsp;<?php endif; ?>
<a title="<?php echo $this->__('Results').':'.$result_count; ?>"
href="<?php echo Mage::getUrl('catalogsearch/result', array('q' => $suggestion)); ?>">
<?php echo $suggestion ?></a>
<?php endforeach; ?>
</span></li>
</ul>
</li>
</ul>
<?php Mage::unregister('solarium_suggest'); ?>
<?php endif; ?>
17 changes: 0 additions & 17 deletions app/design/frontend/base/default/template/solarium/suggest.phtml

This file was deleted.

34 changes: 24 additions & 10 deletions modman
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
## JeroenVermeulen_Solarium Extension - Solr search for Magento CE

# Magento User Interface - File == Frontend layout
# ---- Frontend layout
# Magento User Interface - File - frontend/base/default/layout/jeroenvermeulen/solarium.xml
app/design/frontend/base/default/layout/jeroenvermeulen/solarium.xml app/design/frontend/base/default/layout/jeroenvermeulen/solarium.xml

# Magento User Interface - File == Backend layout
# ---- Frontend layout
# Magento User Interface - Recursive Dir - frontend/base/default/template/jeroenvermeulen/solarium
app/design/frontend/base/default/template/jeroenvermeulen/solarium/ app/design/frontend/base/default/template/jeroenvermeulen/solarium/

# ---- Backend layout
# Magento User Interface - File - adminhtml/default/default/layout/jeroenvermeulen/solarium.xml
app/design/adminhtml/default/default/layout/jeroenvermeulen/solarium.xml app/design/adminhtml/base/default/layout/jeroenvermeulen/solarium.xml

# Magento Global Config - File == Module enable XML
# ---- Module enable XML
# Magento Global Config - File - modules/JeroenVermeulen_Solarium.xml
app/etc/modules/JeroenVermeulen_Solarium.xml app/etc/modules/JeroenVermeulen_Solarium.xml

# Magento Other web accessible - Recursive Dir == JavaScript libraries
# ---- JavaScript libraries
# Magento Other web accessible - Recursive Dir - js/solarium
js/solarium/ js/solarium/

# Magento PHP Library file - Recursive Dir == The Solarium Library, by Bas de Nooijer
# ---- The Solarium Library, by Bas de Nooijer
# Magento PHP Library file - Recursive Dir - Solarium
lib/Solarium/ lib/Solarium/

# Magento PHP Library file - Recursive Dir == The EventDispatcher component from the Symfony framework
# ---- The EventDispatcher component from the Symfony framework
# Magento PHP Library file - Recursive Dir - Symfony/Component/EventDispatcher
lib/Symfony/Component/EventDispatcher/ lib/Symfony/Component/EventDispatcher/

# Magento Theme Skin - File == Backend CSS file
# ---- Backend CSS file
# Magento Theme Skin - File - adminhtml/default/default/css/jeroenvermeulen/solarium.css
skin/adminhtml/default/default/css/jeroenvermeulen/solarium.css skin/adminhtml/default/default/css/jeroenvermeulen/solarium.css

# Magento Theme Skin - Recursive Dir == Backend image files
# ---- Backend image files
# Magento Theme Skin - Recursive Dir - adminhtml/default/default/images/jeroenvermeulen/solarium
skin/adminhtml/default/default/images/jeroenvermeulen/solarium/ skin/adminhtml/default/default/images/jeroenvermeulen/solarium/

# Magento Community Module - Recursive Dir == Extension code dir
# ---- Extension code dir
# Magento Community Module - Recursive Dir - JeroenVermeulen/Solarium
app/code/community/JeroenVermeulen/Solarium/ app/code/community/JeroenVermeulen/Solarium/

# Magento Locale language - File == Dutch translation
# ---- Dutch translation
# Magento Locale language - File - nl_NL/JeroenVermeulen_Solarium.csv
app/locale/nl_NL/JeroenVermeulen_Solarium.csv app/locale/nl_NL/JeroenVermeulen_Solarium.csv
Binary file added var/connect/JeroenVermeulen_Solarium-1.6.1.tgz
Binary file not shown.
23 changes: 15 additions & 8 deletions var/connect/JeroenVermeulen_Solarium.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<_>
<form_key>F1ORDmSGZQ9dcoTC</form_key>
<form_key>mvNLLfGbn8YS6sdV</form_key>
<name>JeroenVermeulen_Solarium</name>
<channel>community</channel>
<version_ids>
Expand All @@ -22,21 +22,23 @@ Report bugs: https://github.com/jeroenvermeulen/magento-solarium/issues
</description>
<license>OSL-3.0</license>
<license_uri>http://opensource.org/licenses/osl-3.0.php</license_uri>
<version>1.5.0</version>
<stability>stable</stability>
<notes> * The first &quot;stable&quot; version
* Added &quot;Test Connection&quot; button to configuration
* Added logos to configuration - Thanks @toonvd
* Added Dutch translations</notes>
<version>1.6.1</version>
<stability>beta</stability>
<notes>WARNING: Beta version, do not use on production without extensive testing.

* Bugfix for &quot;Did you mean&quot; html</notes>
<authors>
<name>
<name>Jeroen Vermeulen BVBA</name>
<name>Toon van Dooren</name>
</name>
<user>
<user>jeroenvermeulen</user>
<user>toonvd</user>
</user>
<email>
<email>[email protected]</email>
<email>[email protected]</email>
</email>
</authors>
<depends_php_min>5.3.0</depends_php_min>
Expand All @@ -56,7 +58,7 @@ Report bugs: https://github.com/jeroenvermeulen/magento-solarium/issues
<max/>
</max>
<files>
<files> </files>
<files> </files>
</files>
</package>
<extension>
Expand All @@ -76,6 +78,7 @@ Report bugs: https://github.com/jeroenvermeulen/magento-solarium/issues
<target>magecommunity</target>
<target>magedesign</target>
<target>magedesign</target>
<target>magedesign</target>
<target>mageetc</target>
<target>mageweb</target>
<target>magelib</target>
Expand All @@ -88,6 +91,7 @@ Report bugs: https://github.com/jeroenvermeulen/magento-solarium/issues
<path>
<path>JeroenVermeulen/Solarium</path>
<path>frontend/base/default/layout/jeroenvermeulen/solarium.xml</path>
<path>frontend/base/default/template/jeroenvermeulen/solarium</path>
<path>adminhtml/default/default/layout/jeroenvermeulen/solarium.xml</path>
<path>modules/JeroenVermeulen_Solarium.xml</path>
<path>js/solarium</path>
Expand All @@ -101,6 +105,7 @@ Report bugs: https://github.com/jeroenvermeulen/magento-solarium/issues
<type>
<type>dir</type>
<type>file</type>
<type>dir</type>
<type>file</type>
<type>file</type>
<type>dir</type>
Expand All @@ -123,6 +128,7 @@ Report bugs: https://github.com/jeroenvermeulen/magento-solarium/issues
<include/>
<include/>
<include/>
<include/>
</include>
<ignore>
<ignore/>
Expand All @@ -136,6 +142,7 @@ Report bugs: https://github.com/jeroenvermeulen/magento-solarium/issues
<ignore/>
<ignore/>
<ignore/>
<ignore/>
</ignore>
</contents>
</_>

0 comments on commit 03a7822

Please sign in to comment.