Version Notes
Change Log: https://github.com/algolia/algoliasearch-magento/blob/master/CHANGELOG.md
Download this release
Release Info
| Developer | Algolia Team |
| Extension | algoliasearch |
| Version | 1.6.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.6.0 to 1.6.1
- app/code/community/Algolia/Algoliasearch/Helper/Algoliahelper.php +1 -1
- app/code/community/Algolia/Algoliasearch/Helper/Data.php +14 -1
- app/code/community/Algolia/Algoliasearch/Helper/Entity/Producthelper.php +8 -0
- app/code/community/Algolia/Algoliasearch/etc/config.xml +1 -1
- app/code/community/Algolia/Algoliasearch/etc/system.xml +1 -1
- app/design/frontend/base/default/layout/algoliasearch.xml +20 -6
- app/design/frontend/base/default/template/algoliasearch/autocomplete.phtml +7 -147
- app/design/frontend/base/default/template/algoliasearch/autocomplete/attribute.phtml +9 -0
- app/design/frontend/base/default/template/algoliasearch/autocomplete/category.phtml +37 -0
- app/design/frontend/base/default/template/algoliasearch/autocomplete/menu.phtml +16 -0
- app/design/frontend/base/default/template/algoliasearch/autocomplete/page.phtml +14 -0
- app/design/frontend/base/default/template/algoliasearch/autocomplete/product.phtml +54 -0
- app/design/frontend/base/default/template/algoliasearch/autocomplete/suggestion.phtml +20 -0
- app/design/frontend/base/default/template/algoliasearch/instantsearch.phtml +11 -243
- app/design/frontend/base/default/template/algoliasearch/instantsearch/facet.phtml +8 -0
- app/design/frontend/base/default/template/algoliasearch/instantsearch/hit.phtml +76 -0
- app/design/frontend/base/default/template/algoliasearch/instantsearch/refinements.phtml +16 -0
- app/design/frontend/base/default/template/algoliasearch/instantsearch/stats.phtml +6 -0
- app/design/frontend/base/default/template/algoliasearch/instantsearch/wrapper.phtml +132 -0
- app/design/frontend/base/default/template/algoliasearch/internals/templateloader.phtml +1 -2
- app/etc/modules/Algolia_Algoliasearch.xml +1 -1
- app/locale/{en_GB → en_US}/Algolia_Algoliasearch.csv +0 -0
- package.xml +4 -4
app/code/community/Algolia/Algoliasearch/Helper/Algoliahelper.php
CHANGED
|
@@ -18,7 +18,7 @@ class Algolia_Algoliasearch_Helper_Algoliahelper extends Mage_Core_Helper_Abstra
|
|
| 18 |
$this->resetCredentialsFromConfig();
|
| 19 |
|
| 20 |
$version = $this->config->getExtensionVersion();
|
| 21 |
-
\AlgoliaSearch\Version::$custom_value = ' Magento
|
| 22 |
}
|
| 23 |
|
| 24 |
public function resetCredentialsFromConfig()
|
| 18 |
$this->resetCredentialsFromConfig();
|
| 19 |
|
| 20 |
$version = $this->config->getExtensionVersion();
|
| 21 |
+
\AlgoliaSearch\Version::$custom_value = '; Magento integration '.$version.'; PHP '.phpversion().'; Magento '.Mage::getVersion();
|
| 22 |
}
|
| 23 |
|
| 24 |
public function resetCredentialsFromConfig()
|
app/code/community/Algolia/Algoliasearch/Helper/Data.php
CHANGED
|
@@ -430,7 +430,7 @@ class Algolia_Algoliasearch_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 430 |
}
|
| 431 |
}
|
| 432 |
|
| 433 |
-
protected function getProductsRecords($storeId, $collection, $potentiallyDeletedProductsIds =
|
| 434 |
{
|
| 435 |
$productsToIndex = [];
|
| 436 |
$productsToRemove = [];
|
|
@@ -438,6 +438,8 @@ class Algolia_Algoliasearch_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 438 |
// In $potentiallyDeletedProductsIds there might be IDs of deleted products which will not be in a collection
|
| 439 |
if (is_array($potentiallyDeletedProductsIds)) {
|
| 440 |
$potentiallyDeletedProductsIds = array_combine($potentiallyDeletedProductsIds, $potentiallyDeletedProductsIds);
|
|
|
|
|
|
|
| 441 |
}
|
| 442 |
|
| 443 |
$this->logger->start('CREATE RECORDS '.$this->logger->getStoreName($storeId));
|
|
@@ -613,4 +615,15 @@ class Algolia_Algoliasearch_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 613 |
$appEmulation->stopEnvironmentEmulation($info);
|
| 614 |
$this->logger->stop('STOP EMULATION');
|
| 615 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 616 |
}
|
| 430 |
}
|
| 431 |
}
|
| 432 |
|
| 433 |
+
protected function getProductsRecords($storeId, $collection, $potentiallyDeletedProductsIds = [])
|
| 434 |
{
|
| 435 |
$productsToIndex = [];
|
| 436 |
$productsToRemove = [];
|
| 438 |
// In $potentiallyDeletedProductsIds there might be IDs of deleted products which will not be in a collection
|
| 439 |
if (is_array($potentiallyDeletedProductsIds)) {
|
| 440 |
$potentiallyDeletedProductsIds = array_combine($potentiallyDeletedProductsIds, $potentiallyDeletedProductsIds);
|
| 441 |
+
} else {
|
| 442 |
+
$potentiallyDeletedProductsIds = [];
|
| 443 |
}
|
| 444 |
|
| 445 |
$this->logger->start('CREATE RECORDS '.$this->logger->getStoreName($storeId));
|
| 615 |
$appEmulation->stopEnvironmentEmulation($info);
|
| 616 |
$this->logger->stop('STOP EMULATION');
|
| 617 |
}
|
| 618 |
+
|
| 619 |
+
public function escapeJsTranslatedString(Mage_Core_Block_Template $template, $string, $useAddSlashes = false)
|
| 620 |
+
{
|
| 621 |
+
$translated = $template->__($string);
|
| 622 |
+
|
| 623 |
+
if ($useAddSlashes === true) {
|
| 624 |
+
return addslashes($translated);
|
| 625 |
+
}
|
| 626 |
+
|
| 627 |
+
return json_encode($translated);
|
| 628 |
+
}
|
| 629 |
}
|
app/code/community/Algolia/Algoliasearch/Helper/Entity/Producthelper.php
CHANGED
|
@@ -338,6 +338,10 @@ class Algolia_Algoliasearch_Helper_Entity_Producthelper extends Algolia_Algolias
|
|
| 338 |
|
| 339 |
$synonyms = $this->config->getSynonyms($storeId);
|
| 340 |
foreach ($synonyms as $objectID => $synonym) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 341 |
$synonymsToSet[] = [
|
| 342 |
'objectID' => $objectID,
|
| 343 |
'type' => 'synonym',
|
|
@@ -347,6 +351,10 @@ class Algolia_Algoliasearch_Helper_Entity_Producthelper extends Algolia_Algolias
|
|
| 347 |
|
| 348 |
$onewaySynonyms = $this->config->getOnewaySynonyms($storeId);
|
| 349 |
foreach ($onewaySynonyms as $objectID => $onewaySynonym) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
$synonymsToSet[] = [
|
| 351 |
'objectID' => $objectID,
|
| 352 |
'type' => 'oneWaySynonym',
|
| 338 |
|
| 339 |
$synonyms = $this->config->getSynonyms($storeId);
|
| 340 |
foreach ($synonyms as $objectID => $synonym) {
|
| 341 |
+
if (!trim($synonym['synonyms'])) {
|
| 342 |
+
continue;
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
$synonymsToSet[] = [
|
| 346 |
'objectID' => $objectID,
|
| 347 |
'type' => 'synonym',
|
| 351 |
|
| 352 |
$onewaySynonyms = $this->config->getOnewaySynonyms($storeId);
|
| 353 |
foreach ($onewaySynonyms as $objectID => $onewaySynonym) {
|
| 354 |
+
if (!trim($onewaySynonym['input']) || !trim($onewaySynonym['synonyms'])) {
|
| 355 |
+
continue;
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
$synonymsToSet[] = [
|
| 359 |
'objectID' => $objectID,
|
| 360 |
'type' => 'oneWaySynonym',
|
app/code/community/Algolia/Algoliasearch/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Algolia_Algoliasearch>
|
| 5 |
-
<version>1.6.
|
| 6 |
</Algolia_Algoliasearch>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Algolia_Algoliasearch>
|
| 5 |
+
<version>1.6.1</version>
|
| 6 |
</Algolia_Algoliasearch>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
app/code/community/Algolia/Algoliasearch/etc/system.xml
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
<algoliasearch translate="label" module="algoliasearch">
|
| 5 |
<label>
|
| 6 |
<![CDATA[
|
| 7 |
-
Algolia Search 1.6.
|
| 8 |
<style>
|
| 9 |
.algoliasearch-admin-menu span {
|
| 10 |
padding-left: 38px !important;
|
| 4 |
<algoliasearch translate="label" module="algoliasearch">
|
| 5 |
<label>
|
| 6 |
<![CDATA[
|
| 7 |
+
Algolia Search 1.6.1
|
| 8 |
<style>
|
| 9 |
.algoliasearch-admin-menu span {
|
| 10 |
padding-left: 38px !important;
|
app/design/frontend/base/default/layout/algoliasearch.xml
CHANGED
|
@@ -17,18 +17,32 @@
|
|
| 17 |
</reference>
|
| 18 |
<reference name="before_body_end">
|
| 19 |
<block type="core/template" template="algoliasearch/internals/frontjs.phtml" name="algolia-beforebodyend"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
</reference>
|
| 21 |
<reference name="content">
|
| 22 |
<block type="core/template" before="content" template="algoliasearch/internals/beforecontent.phtml" name="algolia-beforecontent"/>
|
| 23 |
</reference>
|
| 24 |
</algolia_search_handle>
|
| 25 |
<algolia_search_handle_with_topsearch>
|
| 26 |
-
<reference name="
|
| 27 |
-
<
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
</block>
|
| 32 |
</reference>
|
| 33 |
</algolia_search_handle_with_topsearch>
|
| 34 |
<algolia_search_handle_no_topsearch>
|
| 17 |
</reference>
|
| 18 |
<reference name="before_body_end">
|
| 19 |
<block type="core/template" template="algoliasearch/internals/frontjs.phtml" name="algolia-beforebodyend"/>
|
| 20 |
+
|
| 21 |
+
<!-- Multi-category Autocomplete templates -->
|
| 22 |
+
<block type="core/template" template="algoliasearch/autocomplete/product.phtml" name="algolia-autocomplete-product"/>
|
| 23 |
+
<block type="core/template" template="algoliasearch/autocomplete/category.phtml" name="algolia-autocomplete-category"/>
|
| 24 |
+
<block type="core/template" template="algoliasearch/autocomplete/page.phtml" name="algolia-autocomplete-page"/>
|
| 25 |
+
<block type="core/template" template="algoliasearch/autocomplete/attribute.phtml" name="algolia-autocomplete-attribute"/>
|
| 26 |
+
<block type="core/template" template="algoliasearch/autocomplete/suggestion.phtml" name="algolia-autocomplete-suggestion"/>
|
| 27 |
+
<block type="core/template" template="algoliasearch/autocomplete/menu.phtml" name="algolia-autocomplete-menu"/>
|
| 28 |
+
|
| 29 |
+
<!-- Instant search results page templates -->
|
| 30 |
+
<block type="core/template" template="algoliasearch/instantsearch/wrapper.phtml" name="algolia-instantsearch-wrapper"/>
|
| 31 |
+
<block type="core/template" template="algoliasearch/instantsearch/hit.phtml" name="algolia-instantsearch-hit"/>
|
| 32 |
+
<block type="core/template" template="algoliasearch/instantsearch/stats.phtml" name="algolia-instantsearch-stats"/>
|
| 33 |
+
<block type="core/template" template="algoliasearch/instantsearch/facet.phtml" name="algolia-instantsearch-facet"/>
|
| 34 |
+
<block type="core/template" template="algoliasearch/instantsearch/refinements.phtml" name="algolia-instantsearch-refinements"/>
|
| 35 |
</reference>
|
| 36 |
<reference name="content">
|
| 37 |
<block type="core/template" before="content" template="algoliasearch/internals/beforecontent.phtml" name="algolia-beforecontent"/>
|
| 38 |
</reference>
|
| 39 |
</algolia_search_handle>
|
| 40 |
<algolia_search_handle_with_topsearch>
|
| 41 |
+
<reference name="top.search">
|
| 42 |
+
<action method="setTemplate"><template>algoliasearch/internals/templateloader.phtml</template></action>
|
| 43 |
+
|
| 44 |
+
<block type="core/template" template="algoliasearch/instantsearch.phtml" as="algolia-instantsearch" name="algolia-instantsearch"/>
|
| 45 |
+
<block type="core/template" template="algoliasearch/autocomplete.phtml" as="algolia-autocomplete" name="algolia-autocomplete"/>
|
|
|
|
| 46 |
</reference>
|
| 47 |
</algolia_search_handle_with_topsearch>
|
| 48 |
<algolia_search_handle_no_topsearch>
|
app/design/frontend/base/default/template/algoliasearch/autocomplete.phtml
CHANGED
|
@@ -3,18 +3,12 @@
|
|
| 3 |
/** @var Algolia_Algoliasearch_Helper_Config $config */
|
| 4 |
$config = Mage::helper('algoliasearch/config');
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
/** @var Mage_CatalogSearch_Helper_Data $catalogSearchHelper */
|
| 7 |
$catalogSearchHelper = $this->helper('catalogsearch');
|
| 8 |
|
| 9 |
-
/** @var Mage_Customer_Model_Session $session */
|
| 10 |
-
$session = Mage::getSingleton('customer/session');
|
| 11 |
-
$group_id = $session->getCustomerGroupId();
|
| 12 |
-
|
| 13 |
-
$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
|
| 14 |
-
$price_key = $config->isCustomerGroupsEnabled(Mage::app()->getStore()->getStoreId()) ? '.'.$currency_code.'.group_'.$group_id : '.'.$currency_code.'.default';
|
| 15 |
-
|
| 16 |
-
$image_base_url = Mage::getBaseUrl();
|
| 17 |
-
|
| 18 |
$placeholder = $this->__('Search for products, categories, ...');
|
| 19 |
|
| 20 |
/** Render form with autocomplete input **/
|
|
@@ -35,140 +29,6 @@ if ($config->isDefaultSelector()): ?>
|
|
| 35 |
</form>
|
| 36 |
<?php endif; ?>
|
| 37 |
|
| 38 |
-
<!-- Product hit template -->
|
| 39 |
-
<script type="text/template" id="autocomplete_products_template">
|
| 40 |
-
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 41 |
-
{{#thumbnail_url}}
|
| 42 |
-
<div class="thumb"><img src="<?php echo $image_base_url; ?>{{thumbnail_url}}" /></div>
|
| 43 |
-
{{/thumbnail_url}}
|
| 44 |
-
|
| 45 |
-
<div class="info">
|
| 46 |
-
{{{_highlightResult.name.value}}}
|
| 47 |
-
|
| 48 |
-
<div class="algoliasearch-autocomplete-category">
|
| 49 |
-
{{#categories_without_path}}
|
| 50 |
-
<?php echo $this->__('in'); ?> {{{categories_without_path}}}
|
| 51 |
-
{{/categories_without_path}}
|
| 52 |
-
|
| 53 |
-
{{#_highlightResult.color}}
|
| 54 |
-
{{#_highlightResult.color.value}}
|
| 55 |
-
<span>
|
| 56 |
-
{{#categories_without_path}} | {{/categories_without_path}} Color: {{{_highlightResult.color.value}}}
|
| 57 |
-
</span>
|
| 58 |
-
{{/_highlightResult.color.value}}
|
| 59 |
-
{{/_highlightResult.color}}
|
| 60 |
-
</div>
|
| 61 |
-
|
| 62 |
-
<div class="algoliasearch-autocomplete-price">
|
| 63 |
-
<span class="after_special {{#price<?php echo $price_key; ?>_original_formated}}promotion{{/price<?php echo $price_key; ?>_original_formated}}">
|
| 64 |
-
{{price<?php echo $price_key; ?>_formated}}
|
| 65 |
-
</span>
|
| 66 |
-
|
| 67 |
-
{{#price<?php echo $price_key; ?>_original_formated}}
|
| 68 |
-
<span class="before_special">
|
| 69 |
-
{{price<?php echo $price_key; ?>_original_formated}}
|
| 70 |
-
</span>
|
| 71 |
-
{{/price<?php echo $price_key; ?>_original_formated}}
|
| 72 |
-
</div>
|
| 73 |
-
</div>
|
| 74 |
-
</a>
|
| 75 |
-
</script>
|
| 76 |
-
|
| 77 |
-
<!-- Category hit template -->
|
| 78 |
-
<script type="text/template" id="autocomplete_categories_template">
|
| 79 |
-
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 80 |
-
{{#image_url}}
|
| 81 |
-
<div class="thumb">
|
| 82 |
-
<img src="<?php echo $image_base_url; ?>{{image_url}}" />
|
| 83 |
-
</div>
|
| 84 |
-
{{/image_url}}
|
| 85 |
-
|
| 86 |
-
{{#image_url}}
|
| 87 |
-
<div class="info">
|
| 88 |
-
{{/image_url}}
|
| 89 |
-
{{^image_url}}
|
| 90 |
-
<div class="info-without-thumb">
|
| 91 |
-
{{#_highlightResult.path}}
|
| 92 |
-
{{{_highlightResult.path.value}}}
|
| 93 |
-
{{/_highlightResult.path}}
|
| 94 |
-
{{^_highlightResult.path}}
|
| 95 |
-
{{{path}}}
|
| 96 |
-
{{/_highlightResult.path}}
|
| 97 |
-
|
| 98 |
-
{{#product_count}}
|
| 99 |
-
<small>({{product_count}})</small>
|
| 100 |
-
{{/product_count}}
|
| 101 |
-
|
| 102 |
-
</div>
|
| 103 |
-
<div class="clearfix"></div>
|
| 104 |
-
{{/image_url}}
|
| 105 |
-
</div>
|
| 106 |
-
</a>
|
| 107 |
-
</script>
|
| 108 |
-
|
| 109 |
-
<!-- Page hit template -->
|
| 110 |
-
<script type="text/template" id="autocomplete_pages_template">
|
| 111 |
-
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 112 |
-
<div class="info-without-thumb">
|
| 113 |
-
{{{_highlightResult.name.value}}}
|
| 114 |
-
{{#content}}
|
| 115 |
-
<div class="details">
|
| 116 |
-
{{{content}}}
|
| 117 |
-
</div>
|
| 118 |
-
{{/content}}
|
| 119 |
-
</div>
|
| 120 |
-
<div class="clearfix"></div>
|
| 121 |
-
</a>
|
| 122 |
-
</script>
|
| 123 |
-
|
| 124 |
-
<!-- Extra attribute hit template -->
|
| 125 |
-
<script type="text/template" id="autocomplete_extra_template">
|
| 126 |
-
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 127 |
-
<div class="info-without-thumb">
|
| 128 |
-
{{{_highlightResult.value.value}}}
|
| 129 |
-
</div>
|
| 130 |
-
<div class="clearfix"></div>
|
| 131 |
-
</a>
|
| 132 |
-
</script>
|
| 133 |
-
|
| 134 |
-
<!-- Suggestion hit template -->
|
| 135 |
-
<script type="text/template" id="autocomplete_suggestions_template">
|
| 136 |
-
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 137 |
-
<svg xmlns="http://www.w3.org/2000/svg" class="algolia-glass-suggestion magnifying-glass" width="24" height="24" viewBox="0 0 128 128" >
|
| 138 |
-
<g transform="scale(2.5)">
|
| 139 |
-
<path stroke-width="3" d="M19.5 19.582l9.438 9.438"></path>
|
| 140 |
-
<circle stroke-width="3" cx="12" cy="12" r="10.5" fill="none"></circle>
|
| 141 |
-
<path d="M23.646 20.354l-3.293 3.293c-.195.195-.195.512 0 .707l7.293 7.293c.195.195.512.195.707 0l3.293-3.293c.195-.195.195-.512 0-.707l-7.293-7.293c-.195-.195-.512-.195-.707 0z" ></path>
|
| 142 |
-
</g>
|
| 143 |
-
</svg>
|
| 144 |
-
<div class="info-without-thumb">
|
| 145 |
-
{{{_highlightResult.query.value}}}
|
| 146 |
-
|
| 147 |
-
{{#category}}
|
| 148 |
-
<span class="text-muted"><?php echo $this->__('in'); ?></span> <span class="category-tag">{{category}}</span>
|
| 149 |
-
{{/category}}
|
| 150 |
-
</div>
|
| 151 |
-
<div class="clearfix"></div>
|
| 152 |
-
</a>
|
| 153 |
-
</script>
|
| 154 |
-
|
| 155 |
-
<!-- General autocomplete menu template -->
|
| 156 |
-
<script type="text/template" id="menu-template">
|
| 157 |
-
<div class="autocomplete-wrapper">
|
| 158 |
-
<div class="col9">
|
| 159 |
-
<div class="aa-dataset-products"></div>
|
| 160 |
-
</div>
|
| 161 |
-
<div class="col3">
|
| 162 |
-
<div class="other-sections">
|
| 163 |
-
<div class="aa-dataset-suggestions"></div>
|
| 164 |
-
<?php for ($i = 0; $i < 10; $i++): ?>
|
| 165 |
-
<div class="aa-dataset-<?php echo $i; ?>"></div>
|
| 166 |
-
<?php endfor; ?>
|
| 167 |
-
</div>
|
| 168 |
-
</div>
|
| 169 |
-
</div>
|
| 170 |
-
</script>
|
| 171 |
-
|
| 172 |
<script type="text/javascript">
|
| 173 |
//<![CDATA[
|
| 174 |
|
|
@@ -194,7 +54,7 @@ if ($config->isDefaultSelector()): ?>
|
|
| 194 |
};
|
| 195 |
|
| 196 |
/**
|
| 197 |
-
* Initialise Algolia client
|
| 198 |
* Docs: https://www.algolia.com/doc/javascript
|
| 199 |
**/
|
| 200 |
var algolia_client = algoliaBundle.algoliasearch(algoliaConfig.applicationId, algoliaConfig.apiKey);
|
|
@@ -209,8 +69,8 @@ if ($config->isDefaultSelector()): ?>
|
|
| 209 |
algoliaConfig.autocomplete.sections.unshift({ hitsPerPage: nb_que, label: '', name: "suggestions"});
|
| 210 |
}
|
| 211 |
|
| 212 |
-
algoliaConfig.autocomplete.sections.unshift({ hitsPerPage: nb_cat, label: <?php echo
|
| 213 |
-
algoliaConfig.autocomplete.sections.unshift({ hitsPerPage: nb_pro, label: <?php echo
|
| 214 |
|
| 215 |
/** Setup autocomplete data sources **/
|
| 216 |
var sources = [],
|
|
@@ -245,7 +105,7 @@ if ($config->isDefaultSelector()): ?>
|
|
| 245 |
};
|
| 246 |
|
| 247 |
if (algoliaConfig.removeBranding === false) {
|
| 248 |
-
options.templates.footer = '<div class="footer_algolia"><span><?php echo $
|
| 249 |
}
|
| 250 |
|
| 251 |
/** Bind autocomplete feature to the input */
|
| 3 |
/** @var Algolia_Algoliasearch_Helper_Config $config */
|
| 4 |
$config = Mage::helper('algoliasearch/config');
|
| 5 |
|
| 6 |
+
/** @var Algolia_Algoliasearch_Helper_Data $helper */
|
| 7 |
+
$helper = Mage::helper('algoliasearch');
|
| 8 |
+
|
| 9 |
/** @var Mage_CatalogSearch_Helper_Data $catalogSearchHelper */
|
| 10 |
$catalogSearchHelper = $this->helper('catalogsearch');
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
$placeholder = $this->__('Search for products, categories, ...');
|
| 13 |
|
| 14 |
/** Render form with autocomplete input **/
|
| 29 |
</form>
|
| 30 |
<?php endif; ?>
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
<script type="text/javascript">
|
| 33 |
//<![CDATA[
|
| 34 |
|
| 54 |
};
|
| 55 |
|
| 56 |
/**
|
| 57 |
+
* Initialise Algolia client
|
| 58 |
* Docs: https://www.algolia.com/doc/javascript
|
| 59 |
**/
|
| 60 |
var algolia_client = algoliaBundle.algoliasearch(algoliaConfig.applicationId, algoliaConfig.apiKey);
|
| 69 |
algoliaConfig.autocomplete.sections.unshift({ hitsPerPage: nb_que, label: '', name: "suggestions"});
|
| 70 |
}
|
| 71 |
|
| 72 |
+
algoliaConfig.autocomplete.sections.unshift({ hitsPerPage: nb_cat, label: <?php echo $helper->escapeJsTranslatedString($this, 'Categories'); ?>, name: "categories"});
|
| 73 |
+
algoliaConfig.autocomplete.sections.unshift({ hitsPerPage: nb_pro, label: <?php echo $helper->escapeJsTranslatedString($this, 'Products'); ?>, name: "products"});
|
| 74 |
|
| 75 |
/** Setup autocomplete data sources **/
|
| 76 |
var sources = [],
|
| 105 |
};
|
| 106 |
|
| 107 |
if (algoliaConfig.removeBranding === false) {
|
| 108 |
+
options.templates.footer = '<div class="footer_algolia"><span><?php echo $helper->escapeJsTranslatedString($this, 'Search by', true); ?></span> <a href="https://www.algolia.com/?utm_source=magento&utm_medium=link&utm_campaign=magento_autocompletion_menu" target="_blank"><img src="<?php echo $this->getSkinUrl('algoliasearch/algolia-logo.png'); ?>" /></a></div>';
|
| 109 |
}
|
| 110 |
|
| 111 |
/** Bind autocomplete feature to the input */
|
app/design/frontend/base/default/template/algoliasearch/autocomplete/attribute.phtml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- Extra attribute hit template -->
|
| 2 |
+
<script type="text/template" id="autocomplete_extra_template">
|
| 3 |
+
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 4 |
+
<div class="info-without-thumb">
|
| 5 |
+
{{{_highlightResult.value.value}}}
|
| 6 |
+
</div>
|
| 7 |
+
<div class="clearfix"></div>
|
| 8 |
+
</a>
|
| 9 |
+
</script>
|
app/design/frontend/base/default/template/algoliasearch/autocomplete/category.phtml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
$image_base_url = Mage::getBaseUrl();
|
| 4 |
+
|
| 5 |
+
?>
|
| 6 |
+
|
| 7 |
+
<!-- Category hit template -->
|
| 8 |
+
<script type="text/template" id="autocomplete_categories_template">
|
| 9 |
+
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 10 |
+
{{#image_url}}
|
| 11 |
+
<div class="thumb">
|
| 12 |
+
<img src="<?php echo $image_base_url; ?>{{image_url}}" />
|
| 13 |
+
</div>
|
| 14 |
+
{{/image_url}}
|
| 15 |
+
|
| 16 |
+
{{#image_url}}
|
| 17 |
+
<div class="info">
|
| 18 |
+
{{/image_url}}
|
| 19 |
+
{{^image_url}}
|
| 20 |
+
<div class="info-without-thumb">
|
| 21 |
+
{{#_highlightResult.path}}
|
| 22 |
+
{{{_highlightResult.path.value}}}
|
| 23 |
+
{{/_highlightResult.path}}
|
| 24 |
+
{{^_highlightResult.path}}
|
| 25 |
+
{{{path}}}
|
| 26 |
+
{{/_highlightResult.path}}
|
| 27 |
+
|
| 28 |
+
{{#product_count}}
|
| 29 |
+
<small>({{product_count}})</small>
|
| 30 |
+
{{/product_count}}
|
| 31 |
+
|
| 32 |
+
</div>
|
| 33 |
+
<div class="clearfix"></div>
|
| 34 |
+
{{/image_url}}
|
| 35 |
+
</div>
|
| 36 |
+
</a>
|
| 37 |
+
</script>
|
app/design/frontend/base/default/template/algoliasearch/autocomplete/menu.phtml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- General autocomplete menu template -->
|
| 2 |
+
<script type="text/template" id="menu-template">
|
| 3 |
+
<div class="autocomplete-wrapper">
|
| 4 |
+
<div class="col9">
|
| 5 |
+
<div class="aa-dataset-products"></div>
|
| 6 |
+
</div>
|
| 7 |
+
<div class="col3">
|
| 8 |
+
<div class="other-sections">
|
| 9 |
+
<div class="aa-dataset-suggestions"></div>
|
| 10 |
+
<?php for ($i = 0; $i < 10; $i++): ?>
|
| 11 |
+
<div class="aa-dataset-<?php echo $i; ?>"></div>
|
| 12 |
+
<?php endfor; ?>
|
| 13 |
+
</div>
|
| 14 |
+
</div>
|
| 15 |
+
</div>
|
| 16 |
+
</script>
|
app/design/frontend/base/default/template/algoliasearch/autocomplete/page.phtml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- Page hit template -->
|
| 2 |
+
<script type="text/template" id="autocomplete_pages_template">
|
| 3 |
+
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 4 |
+
<div class="info-without-thumb">
|
| 5 |
+
{{{_highlightResult.name.value}}}
|
| 6 |
+
{{#content}}
|
| 7 |
+
<div class="details">
|
| 8 |
+
{{{content}}}
|
| 9 |
+
</div>
|
| 10 |
+
{{/content}}
|
| 11 |
+
</div>
|
| 12 |
+
<div class="clearfix"></div>
|
| 13 |
+
</a>
|
| 14 |
+
</script>
|
app/design/frontend/base/default/template/algoliasearch/autocomplete/product.phtml
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/** @var Algolia_Algoliasearch_Helper_Config $config */
|
| 4 |
+
$config = Mage::helper('algoliasearch/config');
|
| 5 |
+
|
| 6 |
+
/** @var Mage_Customer_Model_Session $session */
|
| 7 |
+
$session = Mage::getSingleton('customer/session');
|
| 8 |
+
$group_id = $session->getCustomerGroupId();
|
| 9 |
+
|
| 10 |
+
$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
|
| 11 |
+
$price_key = $config->isCustomerGroupsEnabled(Mage::app()->getStore()->getStoreId()) ? '.'.$currency_code.'.group_'.$group_id : '.'.$currency_code.'.default';
|
| 12 |
+
|
| 13 |
+
$image_base_url = Mage::getBaseUrl();
|
| 14 |
+
|
| 15 |
+
?>
|
| 16 |
+
|
| 17 |
+
<!-- Product hit template -->
|
| 18 |
+
<script type="text/template" id="autocomplete_products_template">
|
| 19 |
+
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 20 |
+
{{#thumbnail_url}}
|
| 21 |
+
<div class="thumb"><img src="<?php echo $image_base_url; ?>{{thumbnail_url}}" /></div>
|
| 22 |
+
{{/thumbnail_url}}
|
| 23 |
+
|
| 24 |
+
<div class="info">
|
| 25 |
+
{{{_highlightResult.name.value}}}
|
| 26 |
+
|
| 27 |
+
<div class="algoliasearch-autocomplete-category">
|
| 28 |
+
{{#categories_without_path}}
|
| 29 |
+
<?php echo $this->__('in'); ?> {{{categories_without_path}}}
|
| 30 |
+
{{/categories_without_path}}
|
| 31 |
+
|
| 32 |
+
{{#_highlightResult.color}}
|
| 33 |
+
{{#_highlightResult.color.value}}
|
| 34 |
+
<span>
|
| 35 |
+
{{#categories_without_path}} | {{/categories_without_path}} Color: {{{_highlightResult.color.value}}}
|
| 36 |
+
</span>
|
| 37 |
+
{{/_highlightResult.color.value}}
|
| 38 |
+
{{/_highlightResult.color}}
|
| 39 |
+
</div>
|
| 40 |
+
|
| 41 |
+
<div class="algoliasearch-autocomplete-price">
|
| 42 |
+
<span class="after_special {{#price<?php echo $price_key; ?>_original_formated}}promotion{{/price<?php echo $price_key; ?>_original_formated}}">
|
| 43 |
+
{{price<?php echo $price_key; ?>_formated}}
|
| 44 |
+
</span>
|
| 45 |
+
|
| 46 |
+
{{#price<?php echo $price_key; ?>_original_formated}}
|
| 47 |
+
<span class="before_special">
|
| 48 |
+
{{price<?php echo $price_key; ?>_original_formated}}
|
| 49 |
+
</span>
|
| 50 |
+
{{/price<?php echo $price_key; ?>_original_formated}}
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
</a>
|
| 54 |
+
</script>
|
app/design/frontend/base/default/template/algoliasearch/autocomplete/suggestion.phtml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- Suggestion hit template -->
|
| 2 |
+
<script type="text/template" id="autocomplete_suggestions_template">
|
| 3 |
+
<a class="algoliasearch-autocomplete-hit" href="{{url}}">
|
| 4 |
+
<svg xmlns="http://www.w3.org/2000/svg" class="algolia-glass-suggestion magnifying-glass" width="24" height="24" viewBox="0 0 128 128" >
|
| 5 |
+
<g transform="scale(2.5)">
|
| 6 |
+
<path stroke-width="3" d="M19.5 19.582l9.438 9.438"></path>
|
| 7 |
+
<circle stroke-width="3" cx="12" cy="12" r="10.5" fill="none"></circle>
|
| 8 |
+
<path d="M23.646 20.354l-3.293 3.293c-.195.195-.195.512 0 .707l7.293 7.293c.195.195.512.195.707 0l3.293-3.293c.195-.195.195-.512 0-.707l-7.293-7.293c-.195-.195-.512-.195-.707 0z" ></path>
|
| 9 |
+
</g>
|
| 10 |
+
</svg>
|
| 11 |
+
<div class="info-without-thumb">
|
| 12 |
+
{{{_highlightResult.query.value}}}
|
| 13 |
+
|
| 14 |
+
{{#category}}
|
| 15 |
+
<span class="text-muted"><?php echo $this->__('in'); ?></span> <span class="category-tag">{{category}}</span>
|
| 16 |
+
{{/category}}
|
| 17 |
+
</div>
|
| 18 |
+
<div class="clearfix"></div>
|
| 19 |
+
</a>
|
| 20 |
+
</script>
|
app/design/frontend/base/default/template/algoliasearch/instantsearch.phtml
CHANGED
|
@@ -1,242 +1,10 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
-
/** @var
|
| 4 |
-
$
|
| 5 |
-
|
| 6 |
-
/** @var Mage_CatalogSearch_Helper_Data $catalogSearchHelper */
|
| 7 |
-
$catalogSearchHelper = $this->helper('catalogsearch');
|
| 8 |
-
|
| 9 |
-
/** @var Mage_Customer_Model_Session $session */
|
| 10 |
-
$session = Mage::getSingleton('customer/session');
|
| 11 |
-
$group_id = $session->getCustomerGroupId();
|
| 12 |
-
|
| 13 |
-
$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
|
| 14 |
-
$price_key = $config->isCustomerGroupsEnabled(Mage::app()->getStore()->getStoreId()) ? '.'.$currency_code.'.group_'.$group_id : '.'.$currency_code.'.default';
|
| 15 |
-
|
| 16 |
-
$image_base_url = Mage::getBaseUrl();
|
| 17 |
-
|
| 18 |
-
$title = '';
|
| 19 |
-
$description = '';
|
| 20 |
-
$content = '';
|
| 21 |
-
$imgHtml = '';
|
| 22 |
-
|
| 23 |
-
if ($config->isInstantEnabled() && $config->replaceCategories() && Mage::app()->getRequest()->getControllerName() == 'category') {
|
| 24 |
-
$category = Mage::registry('current_category');
|
| 25 |
-
$title = $category->getName();
|
| 26 |
-
|
| 27 |
-
if ($category && $category->getDisplayMode() !== 'PAGE') {
|
| 28 |
-
$category->getUrlInstance()->setStore(Mage::app()->getStore()->getStoreId());
|
| 29 |
-
|
| 30 |
-
if ($category->getDisplayMode() == 'PRODUCTS_AND_PAGE') {
|
| 31 |
-
$page = $category->getLandingPage();
|
| 32 |
-
$cms_block = Mage::getModel('cms/block')->load($page);
|
| 33 |
-
|
| 34 |
-
$description = $category->getDescription();
|
| 35 |
-
$content = $this->getLayout()->createBlock('cms/block')->setBlockId($page)->toHtml();
|
| 36 |
-
|
| 37 |
-
if ($category->getImageUrl()) {
|
| 38 |
-
$imgHtml = '<p class="category-image"><img src="'.$category->getImageUrl().'" alt="'.$this->escapeHtml($category->getName()).'" title="'.$this->escapeHtml($category->getName()).'" /></p>';
|
| 39 |
-
$imgHtml = $this->helper('catalog/output')->categoryAttribute($category, $imgHtml, 'image');
|
| 40 |
-
}
|
| 41 |
-
}
|
| 42 |
-
}
|
| 43 |
-
}
|
| 44 |
|
| 45 |
?>
|
| 46 |
|
| 47 |
-
<!-- Instantsearch wrapper template -->
|
| 48 |
-
<script type="text/template" id="instant_wrapper_template">
|
| 49 |
-
{{#findAutocomplete}}
|
| 50 |
-
<div id="algolia-autocomplete-container"></div>
|
| 51 |
-
{{/findAutocomplete}}
|
| 52 |
-
<div id="algolia_instant_selector" class="<?php echo count($config->getFacets()) > 0 ? ' with-facets' : '' ?>">
|
| 53 |
-
|
| 54 |
-
<?php if ($title || $imgHtml || $description || $content): ?>
|
| 55 |
-
<div class="row">
|
| 56 |
-
<div class="col-md-12">
|
| 57 |
-
<div id="algolia-static-content">
|
| 58 |
-
<div class="page-title category-title">
|
| 59 |
-
<h1><?php echo $title; ?></h1>
|
| 60 |
-
</div>
|
| 61 |
-
<div>
|
| 62 |
-
<?php echo $imgHtml; ?>
|
| 63 |
-
</div>
|
| 64 |
-
<div class="category-description std">
|
| 65 |
-
<?php echo $description; ?>
|
| 66 |
-
</div>
|
| 67 |
-
<?php echo $content; ?>
|
| 68 |
-
</div>
|
| 69 |
-
</div>
|
| 70 |
-
</div>
|
| 71 |
-
<?php endif; ?>
|
| 72 |
-
|
| 73 |
-
<div class="row">
|
| 74 |
-
<div class="col-md-3" id="algolia-left-container">
|
| 75 |
-
<div id="refine-toggle" class="visible-xs visible-sm">+ <?php echo $this->__('Refine'); ?></div>
|
| 76 |
-
<div class="hidden-xs hidden-sm" id="instant-search-facets-container">
|
| 77 |
-
<div id="current-refinements"></div>
|
| 78 |
-
</div>
|
| 79 |
-
</div>
|
| 80 |
-
|
| 81 |
-
<div class="col-md-9" id="algolia-right-container">
|
| 82 |
-
<div class="row">
|
| 83 |
-
<div class="col-md-12">
|
| 84 |
-
<div>
|
| 85 |
-
{{#second_bar}}
|
| 86 |
-
<div id="instant-search-bar-container">
|
| 87 |
-
<div id="instant-search-box">
|
| 88 |
-
<div class="instant-search-bar-label">
|
| 89 |
-
<svg xmlns="http://www.w3.org/2000/svg" class="magnifying-glass" width="24"
|
| 90 |
-
height="24" viewBox="0 0 128 128">
|
| 91 |
-
<g transform="scale(4)">
|
| 92 |
-
<path stroke-width="3" d="M19.5 19.582l9.438 9.438"></path>
|
| 93 |
-
<circle stroke-width="3" cx="12" cy="12" r="10.5" fill="none"></circle>
|
| 94 |
-
<path
|
| 95 |
-
d="M23.646 20.354l-3.293 3.293c-.195.195-.195.512 0 .707l7.293 7.293c.195.195.512.195.707 0l3.293-3.293c.195-.195.195-.512 0-.707l-7.293-7.293c-.195-.195-.512-.195-.707 0z"></path>
|
| 96 |
-
</g>
|
| 97 |
-
</svg>
|
| 98 |
-
<span><?php echo $this->__('Current search'); ?></span>
|
| 99 |
-
</div>
|
| 100 |
-
<div class="instant-search-bar-wrapper">
|
| 101 |
-
<label for="instant-search-bar">
|
| 102 |
-
<?php echo $this->__('Search:'); ?>
|
| 103 |
-
</label>
|
| 104 |
-
|
| 105 |
-
<input placeholder="<?php echo $this->__('Search for products'); ?>"
|
| 106 |
-
id="instant-search-bar" type="text" autocomplete="off" spellcheck="false"
|
| 107 |
-
autocorrect="off" autocapitalize="off"/>
|
| 108 |
-
|
| 109 |
-
<img class="clear-query-instant"
|
| 110 |
-
src="<?php echo $this->getSkinUrl('algoliasearch/cross.png') ?>"/>
|
| 111 |
-
</div>
|
| 112 |
-
</div>
|
| 113 |
-
</div>
|
| 114 |
-
{{/second_bar}}
|
| 115 |
-
</div>
|
| 116 |
-
</div>
|
| 117 |
-
</div>
|
| 118 |
-
<div class="row">
|
| 119 |
-
<div>
|
| 120 |
-
<div class="hits">
|
| 121 |
-
<div class="infos">
|
| 122 |
-
<div class="pull-left" id="algolia-stats"></div>
|
| 123 |
-
<div class="pull-right">
|
| 124 |
-
<div class="sort-by-label pull-left">
|
| 125 |
-
<?php echo $this->__('SORT BY'); ?>
|
| 126 |
-
</div>
|
| 127 |
-
<div class="pull-left" id="algolia-sorts"></div>
|
| 128 |
-
</div>
|
| 129 |
-
<div class="clearfix"></div>
|
| 130 |
-
</div>
|
| 131 |
-
<div id="instant-search-results-container"></div>
|
| 132 |
-
</div>
|
| 133 |
-
</div>
|
| 134 |
-
<div class="clearfix"></div>
|
| 135 |
-
</div>
|
| 136 |
-
|
| 137 |
-
<div class="text-center">
|
| 138 |
-
<div id="instant-search-pagination-container"></div>
|
| 139 |
-
</div>
|
| 140 |
-
</div>
|
| 141 |
-
</div>
|
| 142 |
-
|
| 143 |
-
</div>
|
| 144 |
-
</script>
|
| 145 |
-
|
| 146 |
-
<!-- Product hit template -->
|
| 147 |
-
<script type="text/template" id="instant-hit-template">
|
| 148 |
-
<div class="col-md-4 col-sm-6">
|
| 149 |
-
<div class="result-wrapper">
|
| 150 |
-
<a href="{{url}}" class="result">
|
| 151 |
-
<div class="result-content">
|
| 152 |
-
<div class="result-thumbnail">
|
| 153 |
-
{{#image_url}}<img src="<?php echo $image_base_url; ?>{{{ image_url }}}"/>{{/image_url}}
|
| 154 |
-
{{^image_url}}<span class="no-image"></span>{{/image_url}}
|
| 155 |
-
</div>
|
| 156 |
-
<div class="result-sub-content">
|
| 157 |
-
<h3 class="result-title text-ellipsis">
|
| 158 |
-
{{{ _highlightResult.name.value }}}
|
| 159 |
-
</h3>
|
| 160 |
-
<div class="ratings">
|
| 161 |
-
<div class="result-sub-content">
|
| 162 |
-
<div class="ratings">
|
| 163 |
-
<div class="rating-box">
|
| 164 |
-
<div class="rating" style="width:{{rating_summary}}%" width="148"
|
| 165 |
-
height="148"></div>
|
| 166 |
-
</div>
|
| 167 |
-
</div>
|
| 168 |
-
<div class="price">
|
| 169 |
-
<div class="price-wrapper">
|
| 170 |
-
<div>
|
| 171 |
-
<span
|
| 172 |
-
class="after_special {{#price<?php echo $price_key; ?>_original_formated}}promotion{{/price<?php echo $price_key; ?>_original_formated}}">
|
| 173 |
-
{{price<?php echo $price_key; ?>_formated}}
|
| 174 |
-
</span>
|
| 175 |
-
|
| 176 |
-
{{#price<?php echo $price_key; ?>_original_formated}}
|
| 177 |
-
<span class="before_special">
|
| 178 |
-
{{price<?php echo $price_key; ?>_original_formated}}
|
| 179 |
-
</span>
|
| 180 |
-
{{/price<?php echo $price_key; ?>_original_formated}}
|
| 181 |
-
</div>
|
| 182 |
-
</div>
|
| 183 |
-
</div>
|
| 184 |
-
</div>
|
| 185 |
-
</div>
|
| 186 |
-
<div class="result-description text-ellipsis">{{{ _highlightResult.description.value }}}</div>
|
| 187 |
-
|
| 188 |
-
{{#isAddToCartEnabled}}
|
| 189 |
-
{{#in_stock}}
|
| 190 |
-
<form action="<?php echo Mage::getBaseUrl(); ?>/checkout/cart/add/product/{{objectID}}"
|
| 191 |
-
method="post">
|
| 192 |
-
<input type="hidden" name="form_key"
|
| 193 |
-
value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>"/>
|
| 194 |
-
<input type="hidden" name="qty" value="1">
|
| 195 |
-
<button type="submit"><?php echo $this->__('Add to Cart'); ?></button>
|
| 196 |
-
</form>
|
| 197 |
-
{{/in_stock}}
|
| 198 |
-
{{/isAddToCartEnabled}}
|
| 199 |
-
</div>
|
| 200 |
-
</div>
|
| 201 |
-
<div class="clearfix"></div>
|
| 202 |
-
</a>
|
| 203 |
-
</div>
|
| 204 |
-
</div>
|
| 205 |
-
</script>
|
| 206 |
-
|
| 207 |
-
<!-- Search statistics template (used for displaying hits' count and time of query) -->
|
| 208 |
-
<script type="text/template" id="instant-stats-template">
|
| 209 |
-
{{#hasOneResult}}<strong>1</strong> <?php echo $this->__('result'); ?> found{{/hasOneResult}}
|
| 210 |
-
{{#hasManyResults}}{{^hasNoResults}}{{first}}-{{last}} out of{{/hasNoResults}} <strong>{{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}} <?php echo $this->__('results found'); ?></strong>{{/hasManyResults}}
|
| 211 |
-
<?php echo $this->__('in'); ?> {{seconds}} <?php echo $this->__('seconds'); ?>
|
| 212 |
-
</script>
|
| 213 |
-
|
| 214 |
-
<!-- Basic facet template -->
|
| 215 |
-
<script type="text/template" id="facet-template">
|
| 216 |
-
<div class="sub_facet {{#isRefined}}checked{{/isRefined}}">
|
| 217 |
-
<input class="facet_value" {{#isRefined}}checked{{/isRefined}} type="checkbox">
|
| 218 |
-
{{name}}
|
| 219 |
-
<span class="count">{{count}}</span>
|
| 220 |
-
</div>
|
| 221 |
-
</script>
|
| 222 |
-
|
| 223 |
-
<!-- Current refinements template -->
|
| 224 |
-
<script type="text/template" id="current-refinements-template">
|
| 225 |
-
<div class="cross-wrapper">
|
| 226 |
-
<img src="<?php echo $this->getSkinUrl('algoliasearch/cross.png') ?>"/>
|
| 227 |
-
</div>
|
| 228 |
-
<div class="current-refinement-wrapper">
|
| 229 |
-
{{#label}}
|
| 230 |
-
<span class="current-refinement-label">{{label}}{{^operator}}:{{/operator}}</span>
|
| 231 |
-
{{/label}}
|
| 232 |
-
{{#operator}}
|
| 233 |
-
{{{displayOperator}}}
|
| 234 |
-
{{/operator}}
|
| 235 |
-
{{#exclude}}-{{/exclude}}
|
| 236 |
-
<span class="current-refinement-name">{{name}}</span>
|
| 237 |
-
</div>
|
| 238 |
-
</script>
|
| 239 |
-
|
| 240 |
<script type="text/javascript">
|
| 241 |
//<