first commit
This commit is contained in:
36
modules/leoproductsearch/views/templates/admin/index.php
Normal file
36
modules/leoproductsearch/views/templates/admin/index.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2014 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2014 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
29
modules/leoproductsearch/views/templates/admin/panel.tpl
Normal file
29
modules/leoproductsearch/views/templates/admin/panel.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
{*
|
||||
* @Module Name: Leo Product Search
|
||||
* @Website: leotheme.com.com - prestashop template provider
|
||||
* @author Leotheme <leotheme@gmail.com>
|
||||
* @copyright Leotheme
|
||||
*}
|
||||
|
||||
<div class="panel form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1">
|
||||
<a class="megamenu-correct-module btn btn-success" href="{$url_admin}&success=correct&correctmodule=1">
|
||||
<i class="icon-AdminParentPreferences"></i>{l s='Correct module' mod='leoproductsearch'}
|
||||
</a>
|
||||
</div>
|
||||
<div class="control-label col-lg-11" style="text-align: left">* {l s='Make module work well with current Prestashop Version (fix database and old bug of module).' mod='leoproductsearch'}</div>
|
||||
<div class="control-label col-lg-11" style="text-align: left">* {l s='Please backup the database before run correct module to safe' mod='leoproductsearch'}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="leoproductsearch-group">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><i class="icon-cogs"></i> {l s='Leo Product Search Global Config' mod='leoproductsearch'}</div>
|
||||
<div class="panel-content" id="leoquicklogin-setting">
|
||||
<div class="tab-content">
|
||||
{$globalform}{* HTML form , no escape necessary *}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
36
modules/leoproductsearch/views/templates/front/index.php
Normal file
36
modules/leoproductsearch/views/templates/front/index.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2014 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2014 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
53
modules/leoproductsearch/views/templates/front/leosearch.tpl
Normal file
53
modules/leoproductsearch/views/templates/front/leosearch.tpl
Normal file
@@ -0,0 +1,53 @@
|
||||
{*
|
||||
* @Module Name: Leo Product Search
|
||||
* @Website: leotheme.com.com - prestashop template provider
|
||||
* @author Leotheme <leotheme@gmail.com>
|
||||
* @copyright Leotheme
|
||||
*}
|
||||
|
||||
{function name="lps_categories" nodes=[] depth=0}
|
||||
{strip}
|
||||
{if $nodes|count}
|
||||
{foreach from=$nodes item=node}
|
||||
<a href="#" data-cate-id="{$node.id_category|escape:'htmlall':'UTF-8'|stripslashes}" data-cate-name="{$node.name}" class="cate-item cate-level-{$node.level_depth}{if isset($selectedCate) && $node.id_category eq $selectedCate} active{/if}" >{if $node.level_depth > 1}{str_repeat('-', $node.level_depth)}{/if}{$node.name}</a>
|
||||
{lps_categories nodes=$node.children depth=$depth+1}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/strip}
|
||||
{/function}
|
||||
|
||||
<!-- Block search module -->
|
||||
<div id="leo_search_block_left" class="block exclusive{if $en_search_by_cat} search-by-category{/if}">
|
||||
<h4 class="title_block">{l s='Search' mod='leoproductsearch'}</h4>
|
||||
<form method="get" action="{$link->getPageLink('productsearch', true)|escape:'html':'UTF-8'}" id="leosearchbox">
|
||||
<input type="hidden" name="fc" value="module" />
|
||||
<input type="hidden" name="module" value="leoproductsearch" />
|
||||
<input type="hidden" name="controller" value="productsearch" />
|
||||
<input type="hidden" name="txt_not_found" value="{l s='No products found' mod='leoproductsearch'}">
|
||||
<input type="hidden" name="orderby" value="position" />
|
||||
<input type="hidden" name="orderway" value="desc" />
|
||||
|
||||
<label for="search_query_block">{l s='Search products:' mod='leoproductsearch'}</label>
|
||||
<div class="block_content clearfix">
|
||||
{if $en_search_by_cat}
|
||||
<div class="list-cate-wrapper">
|
||||
<input id="leosearch-cate-id" name="cate" value="{if isset($selectedCate)}{$selectedCate}{/if}" type="hidden">
|
||||
<a id="dropdownListCate" class="select-title" rel="nofollow" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span>{if $selectedCateName != ''}{$selectedCateName}{else}{l s='All Categories' mod='leoproductsearch'}{/if}</span>
|
||||
<i class="material-icons pull-xs-right">keyboard_arrow_down</i>
|
||||
</a>
|
||||
<div class="list-cate dropdown-menu" aria-labelledby="dropdownListCate">
|
||||
<a href="#" data-cate-id="" data-cate-name="{l s='All Categories' mod='leoproductsearch'}" class="cate-item{if $selectedCate == ''} active{/if}" >{l s='All Categories' mod='leoproductsearch'}</a>
|
||||
<a href="#" data-cate-id="{$cates.id_category|escape:'htmlall':'UTF-8'|stripslashes}" data-cate-name="{$cates.name}" class="cate-item cate-level-{$cates.level_depth}{if isset($selectedCate) && $cates.id_category eq $selectedCate} active{/if}" >{if $cates.level_depth > 1}{str_repeat('-', $cates.level_depth)}{/if}{$cates.name}</a>
|
||||
{lps_categories nodes=$cates.children}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="leoproductsearch-loading cssload-speeding-wheel">
|
||||
</div>
|
||||
<input class="search_query form-control grey" type="text" id="leo_search_query_block" name="search_query" value="{$search_query|escape:'htmlall':'UTF-8'|stripslashes}" />
|
||||
<button type="submit" id="leo_search_button" class="btn btn-default button button-small"><span><i class="material-icons search">search</i></span></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /Block search module -->
|
||||
@@ -0,0 +1,60 @@
|
||||
{*
|
||||
* @Module Name: Leo Product Search
|
||||
* @Website: leotheme.com.com - prestashop template provider
|
||||
* @author Leotheme <leotheme@gmail.com>
|
||||
* @copyright Leotheme
|
||||
*}
|
||||
|
||||
{function name="lps_categories" nodes=[] depth=0}
|
||||
{strip}
|
||||
{if $nodes|count}
|
||||
{foreach from=$nodes item=node}
|
||||
<a href="#" data-cate-id="{$node.id_category|escape:'htmlall':'UTF-8'|stripslashes}" data-cate-name="{$node.name}" class="cate-item cate-level-{$node.level_depth}{if isset($selectedCate) && $node.id_category eq $selectedCate} active{/if}" >{if $node.level_depth > 1}{str_repeat('-', $node.level_depth)}{/if}{$node.name}</a>
|
||||
{lps_categories nodes=$node.children depth=$depth+1}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/strip}
|
||||
{/function}
|
||||
|
||||
<!-- Block search module -->
|
||||
<div id="leo_search_block_top" class="block exclusive{if $en_search_by_cat} search-by-category{/if}">
|
||||
<h4 class="title_block">{l s='Search' mod='leoproductsearch'}</h4>
|
||||
<form method="get" action="{$link->getPageLink('productsearch', true)|escape:'html':'UTF-8'}" id="leosearchtopbox" data-label-suggestion="{l s='Suggestion' mod='leoproductsearch'}" data-search-for="{l s='Search for' mod='leoproductsearch'}" data-in-category="{l s='in category' mod='leoproductsearch'}" data-products-for="{l s='Products For' mod='leoproductsearch'}" data-label-products="{l s='Products' mod='leoproductsearch'}" data-view-all="{l s='View all' mod='leoproductsearch'}">
|
||||
<input type="hidden" name="fc" value="module" />
|
||||
<input type="hidden" name="module" value="leoproductsearch" />
|
||||
<input type="hidden" name="controller" value="productsearch" />
|
||||
<input type="hidden" name="txt_not_found" value="{l s='No products found' mod='leoproductsearch'}">
|
||||
<input type="hidden" name="leoproductsearch_static_token" value="{$leoproductsearch_static_token|escape:'htmlall':'UTF-8'|stripslashes}"/>
|
||||
{*
|
||||
<input type="hidden" name="orderby" value="position" />
|
||||
<input type="hidden" name="orderway" value="desc" />
|
||||
*}
|
||||
<label>{l s='Search products:' mod='leoproductsearch'}</label>
|
||||
<div id="leo_search_block_input" class="block_content clearfix leoproductsearch-content">
|
||||
{if $en_search_by_cat}
|
||||
<div class="list-cate-wrapper">
|
||||
<input id="leosearchtop-cate-id" name="cate" value="{if isset($selectedCate)}{$selectedCate}{/if}" type="hidden">
|
||||
<a href="javascript:void(0)" id="dropdownListCateTop" class="select-title" rel="nofollow" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span>{if $selectedCateName != ''}{$selectedCateName}{else}{l s='All Categories' mod='leoproductsearch'}{/if}</span>
|
||||
<i class="material-icons pull-xs-right">keyboard_arrow_down</i>
|
||||
</a>
|
||||
<div class="list-cate dropdown-menu" aria-labelledby="dropdownListCateTop">
|
||||
<a href="#" data-cate-id="" data-cate-name="{l s='All Categories' mod='leoproductsearch'}" class="cate-item{if $selectedCate == ''} active{/if}" >{l s='All Categories' mod='leoproductsearch'}</a>
|
||||
<a href="#" data-cate-id="{$cates.id_category|escape:'htmlall':'UTF-8'|stripslashes}" data-cate-name="{$cates.name}" class="cate-item cate-level-{$cates.level_depth}{if isset($selectedCate) && $cates.id_category eq $selectedCate} active{/if}" >{if $cates.level_depth > 1}{str_repeat('-', $cates.level_depth)}{/if}{$cates.name}</a>
|
||||
{lps_categories nodes=$cates.children}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="leoproductsearch-result">
|
||||
<div class="leoproductsearch-loading cssload-speeding-wheel"></div>
|
||||
<input class="search_query form-control grey" type="text" id="leo_search_query_top" name="search_query" value="{$search_query|escape:'htmlall':'UTF-8'|stripslashes}" placeholder="Szukaj sportu, produktu lub marki..."/>
|
||||
<div class="ac_results lps_results"></div>
|
||||
</div>
|
||||
<button type="submit" id="leo_search_top_button" class="btn btn-default button button-small"><span><i class="material-icons search">search</i></span></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var blocksearch_type = 'top';
|
||||
</script>
|
||||
<!-- /Block search module -->
|
||||
98
modules/leoproductsearch/views/templates/front/search.tpl
Normal file
98
modules/leoproductsearch/views/templates/front/search.tpl
Normal file
@@ -0,0 +1,98 @@
|
||||
{*
|
||||
* @Module Name: Leo Product Search
|
||||
* @Website: leotheme.com.com - prestashop template provider
|
||||
* @author Leotheme <leotheme@gmail.com>
|
||||
* @copyright Leotheme
|
||||
*}
|
||||
|
||||
{extends file=$layout}
|
||||
|
||||
{block name='content'}
|
||||
|
||||
{capture name=path}{l s='Search' mod='leoproductsearch'}{/capture}
|
||||
|
||||
<h1
|
||||
{if isset($instant_search) && $instant_search}id="instant_search_results"{/if}
|
||||
class="page-heading {if !isset($instant_search) || (isset($instant_search) && !$instant_search)} product-listing{/if}">
|
||||
{l s='Search' mod='leoproductsearch'}
|
||||
{if $nbProducts > 0}
|
||||
<span class="lighter">
|
||||
"{if isset($search_query) && $search_query}{$search_query|escape:'html':'UTF-8'}{elseif $search_tag}{$search_tag|escape:'html':'UTF-8'}{elseif $ref}{$ref|escape:'html':'UTF-8'}{/if}"
|
||||
</span>
|
||||
{/if}
|
||||
{if isset($instant_search) && $instant_search}
|
||||
<a href="#" class="close">
|
||||
{l s='Return to the previous page' mod='leoproductsearch'}
|
||||
</a>
|
||||
{else}
|
||||
<span class="heading-counter">
|
||||
{if $nbProducts == 1}{l s='%d result has been found.' sprintf=[$nbProducts|intval] mod='leoproductsearch'}{else}{l s='%d results have been found.' sprintf=[$nbProducts|intval] mod='leoproductsearch'}{/if}
|
||||
</span>
|
||||
{/if}
|
||||
</h1>
|
||||
|
||||
{if $search_products.suggest || $search_products.category}
|
||||
<div class="head-leosearch-product">
|
||||
{if $search_products.suggest}
|
||||
<div class="search-in-suggest">
|
||||
<div class="search-value-title">{l s='Suggestion' mod='leoproductsearch'}</div>
|
||||
<ul>
|
||||
{foreach from=$search_products.suggest item=suggest}
|
||||
<li><a class="suggest-item" href="{$suggest.link}">{$suggest.word}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $search_products.category}
|
||||
<div class="search-in-cat">
|
||||
<div class="search-value-title">{l s='Search in category' mod='leoproductsearch'}</div>
|
||||
<ul>
|
||||
{foreach from=$search_products.category item=category}
|
||||
<li><a href="{$category.link}">{l s='in category' mod='leoproductsearch'}: <strong>{$category.name}</strong> ({$category.count})</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !$nbProducts}
|
||||
<p class="alert alert-warning">
|
||||
{if isset($search_query) && $search_query}
|
||||
{l s='No results were found for your search' mod='leoproductsearch'} "{if isset($search_query)}{$search_query|escape:'html':'UTF-8'}{/if}"
|
||||
{elseif isset($search_tag) && $search_tag}
|
||||
{l s='No results were found for your search' mod='leoproductsearch'} "{$search_tag|escape:'html':'UTF-8'}"
|
||||
{else}
|
||||
{l s='Please enter a search keyword' mod='leoproductsearch'}
|
||||
{/if}
|
||||
</p>
|
||||
{else}
|
||||
{if isset($instant_search) && $instant_search}
|
||||
<p class="alert alert-info">
|
||||
{if $nbProducts == 1}{l s='%d result has been found.' sprintf=[$nbProducts|intval] mod='leoproductsearch'}{else}{l s='%d results have been found.' sprintf=[$nbProducts|intval] mod='leoproductsearch'}{/if}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<section id="products">
|
||||
<div id="">
|
||||
{block name='product_list_top'}
|
||||
{include file='catalog/_partials/products-top.tpl' listing=$search_products}
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
{block name='product_list_active_filters'}
|
||||
<div id="" class="hidden-sm-down">
|
||||
{$search_products.rendered_active_filters nofilter}{* HTML form , no escape necessary *}
|
||||
</div>
|
||||
{/block}
|
||||
<div id="">
|
||||
{block name='product_list'}
|
||||
{include file='catalog/_partials/products.tpl' listing=$search_products}
|
||||
{/block}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/if}
|
||||
{/block}
|
||||
36
modules/leoproductsearch/views/templates/index.php
Normal file
36
modules/leoproductsearch/views/templates/index.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2014 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2014 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
Reference in New Issue
Block a user