allow displaying how much product wanted in category page
This commit is contained in:
@@ -186,7 +186,8 @@ class UrlGenerator extends AbstractSmartyPlugin
|
||||
|
||||
protected function getCurrentUrl()
|
||||
{
|
||||
return URL::getInstance()->retrieveCurrent($this->request)->toString();
|
||||
//return URL::getInstance()->retrieveCurrent($this->request)->toString();
|
||||
return $this->request->getUri();
|
||||
}
|
||||
|
||||
protected function getReturnToUrl()
|
||||
|
||||
@@ -126,31 +126,10 @@
|
||||
}).filter(':has(:checked)').addClass('active');
|
||||
});
|
||||
|
||||
$('#limit-top').change(function(e){
|
||||
window.location = $(this).val()
|
||||
});
|
||||
|
||||
// Styliser le message Confirm par Bootstrap sur un formulaire
|
||||
/*
|
||||
$('body').on('click', '[data-confirm]', function(){
|
||||
var $this = $(this);
|
||||
bootbox.confirm($(this).attr('data-confirm'),
|
||||
function(result){
|
||||
if(result) {
|
||||
// Si lien
|
||||
if($this.attr('href')){
|
||||
window.location.href = $this.attr('href');
|
||||
}else{
|
||||
// Si on doit soumettre un formulaire
|
||||
var $form = $this.closest("form");
|
||||
if($form.size() > 0){
|
||||
$form.submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main layout-col-2-left">
|
||||
|
||||
{$limit={$smarty.get.limit|default:8}}
|
||||
<article class="col-main {$smarty.get.mode|default:"grid"}" role="main">
|
||||
{include file="includes/category-toolbar.html" toolbar="top"}
|
||||
{include file="includes/category-toolbar.html" toolbar="top" limit=$limit}
|
||||
<div id="category-products">
|
||||
<div class="products-content">
|
||||
<ul class="product-col-4">
|
||||
{loop type="product" name="product_list" category={category attr="id"}}
|
||||
{loop type="product" name="product_list" category={category attr="id"} limit=$limit}
|
||||
|
||||
<li class="item">
|
||||
{include file="includes/single-product.html" product_id=$ID}
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<span class="limiter">
|
||||
<label for="limit-top">Show</label>
|
||||
<select id="limit-top" name="limit">
|
||||
<option value="?limit=4">4</option>
|
||||
<option value="?limit=8" selected>8</option>
|
||||
<option value="?limit=12">12</option>
|
||||
<option value="?limit=50">50</option>
|
||||
<option value="?limit=all">All</option>
|
||||
<option value="{url path="{navigate to="current"}" limit="4"}" {if $limit==4}selected{/if}>4</option>
|
||||
<option value="{url path="{navigate to="current"}" limit="8"}" {if $limit==8}selected{/if}>8</option>
|
||||
<option value="{url path="{navigate to="current"}" limit="12"}" {if $limit==12}selected{/if}>12</option>
|
||||
<option value="{url path="{navigate to="current"}" limit="50"}"{if $limit==50}selected{/if}>50</option>
|
||||
<option value="{url path="{navigate to="current"}" limit="9999999999"}" {if $limit==9999999999}selected{/if}>All</option>
|
||||
</select>
|
||||
<span class="per-page"> per page</span>
|
||||
</span><!-- /.limiter -->
|
||||
@@ -30,8 +30,8 @@
|
||||
<span class="view-mode">
|
||||
<span class="view-mode-label">{intl l="View as"}:</span>
|
||||
<span class="view-mode-btn">
|
||||
<a href="?mode=grid" data-toggle="view" role="button" class="btn btn-grid"><i class="icon-grid"></i></a>
|
||||
<a href="?mode=list" data-toggle="view" role="button" class="btn btn-list "><i class="icon-list"></i></a>
|
||||
<a href="{url path="{navigate to="current"}" mode="grid"}" data-toggle="view" role="button" class="btn btn-grid"><i class="icon-grid"></i></a>
|
||||
<a href="{url path="{navigate to="current"}" mode="list"}" data-toggle="view" role="button" class="btn btn-list "><i class="icon-list"></i></a>
|
||||
</span>
|
||||
</span><!-- /.view-mode -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user