[-] FO : #PSFV-553 - Fix bugs with pager and ordering with some controllers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13642 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -25,15 +25,19 @@
|
||||
*}
|
||||
|
||||
{if isset($orderby) AND isset($orderway)}
|
||||
<!-- Sort products -->
|
||||
{if isset($smarty.get.id_category) && $smarty.get.id_category}
|
||||
{assign var='request' value=$link->getPaginationLink('category', $category, false, true)}
|
||||
{elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer}
|
||||
{assign var='request' value=$link->getPaginationLink('manufacturer', $manufacturer, false, true)}
|
||||
{elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier}
|
||||
{assign var='request' value=$link->getPaginationLink('supplier', $supplier, false, true)}
|
||||
{else}
|
||||
{assign var='request' value=$link->getPaginationLink(false, false, false, true)}
|
||||
|
||||
{* On 1.5 the var request is setted on the front controller. The next lines assure the retrocompatibility with some modules *}
|
||||
{if !isset($request)}
|
||||
<!-- Sort products -->
|
||||
{if isset($smarty.get.id_category) && $smarty.get.id_category}
|
||||
{assign var='request' value=$link->getPaginationLink('category', $category, false, true)}
|
||||
{elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer}
|
||||
{assign var='request' value=$link->getPaginationLink('manufacturer', $manufacturer, false, true)}
|
||||
{elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier}
|
||||
{assign var='request' value=$link->getPaginationLink('supplier', $supplier, false, true)}
|
||||
{else}
|
||||
{assign var='request' value=$link->getPaginationLink(false, false, false, true)}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -44,7 +48,7 @@ $(document).ready(function()
|
||||
{
|
||||
var requestSortProducts = '{$request}';
|
||||
var splitData = $(this).val().split(':');
|
||||
document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1];
|
||||
document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1];
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
|
||||
Reference in New Issue
Block a user