Search the Community
Showing results for tags 'product-sort.tpl'.
-
Dear all! I know how to set the sort order of products in category view. But I need to do the same for when products are displayed (in front office) in the manufacturer view (i.e. selecting a manufacturer in the "block manufacturers") i) Is there a way to do this, preferably similar to how it's done in catalogue-mode in backoffice? ii) If not, can I set the sort order to show e.g. most expensive products first but without affecting the sort order in the front office category-mode? I'm using 1.4.6.2... Thanks a lot in advance! BR Peter
- 6 replies
-
- display products
- manufacturer.tpl
-
(and 2 more)
Tagged with:
-
Salve. è la prima volta che scrivo in questo forum, anche se l'ho consultato centinaia di volte. Ora ho un problema che non riesco a risolvere per quanto cerco una risposta nel web. Vorrei aggiungere l'opzione nella navigazione della categoria, dove l'utente può mettere i suoi prodotti in ordine di produttore o fornitore. So che centra product-sort.tpl ma non so come modificarlo e aggiungere questi parametri. Qualcuno mi può aiutare urgentemente? non so dove battere la testa. Grazie a tutti Luca
- 1 reply
-
- ordine
- product-sort.tpl
-
(and 2 more)
Tagged with:
-
according to different posts, I changed product-sort.tpl to add an additional sort criteria (date added) like that: <option value="date_add:desc" {if $orderby eq 'date_add' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='newest products'}</option> This works fine, when browsing trough categories and then changing from default sort to newest products. However If I enter a search term and then choose the drop down to 'newest products', I get a messed up result without images, whithout text and only one hit over all. Shop URL: WIR-Shop Search term (example): Siemens Found products: 104 Sort by last drop down entry (neue Produkte) - result messed up Sorting by any other field - result is OK Any help is appreciated. Scully.
-
- custom
- product-sort.tpl
-
(and 2 more)
Tagged with:
-
Hola compañeros, ayer tuve un problema con la ordenación de productos derivada de product-sort.tpl, el error es que por mas que selecciono un orden de productos... me ignora y no recarga, digamos que haciendo pruebas solo lo ejecuta la primera vez que carga la página, luego nada, un adorno. No consigo entender muy bien porque dejó de funcionar inexplicablemente, de todos modos conseguí remendarlo, pero me sigue el come-come de porqué no funcionaba, y si alguien supiera explicármelo se lo agradecería. de todas formas os paso mi solución, primeramente os paso el código original, el cuál dejó de funcionar, y si ahora lo repongo, tampoco funciona la ordenación: {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[ $(document).ready(function() { $('#selectPrductSort').change(function() { var requestSortProducts = '{$request}'; var splitData = $(this).val().split(':'); {if Module::isInstalled('blocklayered')} reloadContent(); {else} document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1]; {/if} }); }); //]]> </script> <form id="productsSortForm" action="{$request|escape:'htmlall':'UTF-8'}"> <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> </form> <!-- /Sort products --> {/if} Con el anterior no conseguía nada, con lo que utilizando un poco la lógica, y el código existente... todo hay que decirlo, me limité a forzar un document.location.href en el onchange del select#selectPrductSort. En resumen le puse un parche y me resultó efectivo, no sé si es lo mas idóneo, pero el resultado es el deseado: {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[ $(document).ready(function() { $('#selectPrductSort').change(function() { var requestSortProducts = '{$request}'; var splitData = $(this).val().split(':'); {if Module::isInstalled('blocklayered')} reloadContent(); {else} document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1]; {/if} }); }); //]]> </script> <form id="productsSortForm" action="{$request|escape:'htmlall':'UTF-8'}"> <script type="text/javascript" language="javascript"> /*Modificado*/ function ordena(orden){ /*Modificado*/ var requestSortProducts = '{$request}'; /*Modificado*/ var splitData = $(orden).val().split(':'); /*Modificado*/ document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1]; /*Modificado*/ } /*Modificado*/ </script> <!--/*Modificado*/--> <select id="selectPrductSort" onchange="ordena(this)"> <!--/*Modificado*/--> <option class="ac_even" value="{$orderbydefault|escape:'htmlall':'UTF-8'}:{$orderwaydefault|escape:'htmlall':'UTF-8'}" {if $orderby eq $orderbydefault}selected="selected"{/if}>{l s='--'}</option> <!--/*Modificado*/--> {if !$PS_CATALOG_MODE} <option class="ac_odd" value="price:asc" {if $orderby eq 'price' AND $orderway eq 'asc'}selected="selected"{/if}>{l s='Price: lowest first'}</option> <!--/*Modificado*/--> <option class="ac_even" value="price:desc" {if $orderby eq 'price' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='Price: highest first'}</option> <!--/*Modificado*/--> {/if} <option class="ac_odd" value="name:asc" {if $orderby eq 'name' AND $orderway eq 'asc'}selected="selected"{/if}>{l s='Product Name: A to Z'}</option> <!--/*Modificado*/--> <option class="ac_even" value="name:desc" {if $orderby eq 'name' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='Product Name: Z to A'}</option> <!--/*Modificado*/--> {if !$PS_CATALOG_MODE} <option class="ac_odd" value="quantity:desc" {if $orderby eq 'quantity' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='In-stock first'}</option> <!--/*Modificado*/--> {/if} </select> <label for="selectPrductSort">{l s='Sort by'}</label> </form> <!-- /Sort products --> {/if} Nota los class ac_even y ac_odd, los añadí por alternar el color de las filas, no tiene nada que ver con la solución. Bueno, espero que esto ayude a alguien en algún momento. Saludos y gracias!! VicWeb
-
Hola a todos. Me gustaría poder incorporar los filtros que ordenan los productos al momento de que el sistema me despliega los resultados de una búsqueda por instant Search. Actualmente sólo aparecen los filtros cuando doy click en el botón de buscar y me arroja el resultado, pero yo necesito que se muestren desde que salen los resultados rápidamente (instant-search). Agradezco su apoyo. Saludos, Sharly Prestashop v-1.4.8
-
- instant Search
- product-sort.tpl
-
(and 1 more)
Tagged with: