Françoise B Posted October 2, 2014 Share Posted October 2, 2014 Bonjour, Impossible aux visiteurs d'utiliser un choix de tri des produits. Rien ne fonctionne. Cela fonctionnait avec la version 1.4 mais depuis la mise à jour vers 1.6.0.6, cela ne fonctionne plus. Voici le code d'origine : {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)}{/if}<script type="text/javascript">//<![CDATA[{literal}$(document).ready(function(){ $('#selectPrductSort').change(function() { var requestSortProducts = '{/literal}{$request}{literal}'; var splitData = $(this).val().split(':'); document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1]; });});//]]>{/literal}</script><form id="productsSortForm" action="{$request|escape:'htmlall':'UTF-8'}"> <p class="select"> <select id="selectPrductSort"> <option value="{$orderbydefault|escape:'htmlall':'UTF-8'}:{$orderwaydefault|escape:'htmlall':'UTF-8'}" {if $orderby eq $orderbydefault}selected="selected"{/if}>{l s='--'}</option> {if !$PS_CATALOG_MODE} <option value="price:asc" {if $orderby eq 'price' AND $orderway eq 'asc'}selected="selected"{/if}>{l s='Price: lowest first'}</option> <option value="price:desc" {if $orderby eq 'price' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='Price: highest first'}</option> {/if} <option value="name:asc" {if $orderby eq 'name' AND $orderway eq 'asc'}selected="selected"{/if}>{l s='Product Name: A to Z'}</option> <option value="name:desc" {if $orderby eq 'name' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='Product Name: Z to A'}</option> {if !$PS_CATALOG_MODE} <option value="quantity:desc" {if $orderby eq 'quantity' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='In-stock first'}</option> {/if} </select> <label for="selectPrductSort">{l s='Sort by'}</label> </p></form><!-- /Sort products -->{/if} Pouvez-vous m'aider à trouver le problème? Link to comment Share on other sites More sharing options...
Françoise B Posted January 13, 2015 Author Share Posted January 13, 2015 Personne pour m'aider ? Mon tri ne fonctionne toujours pas. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now