Jump to content

edit the Product-sort.tlp by specific price


usspeedup2

Recommended Posts

Hi everyone
I use Prestashop for my web store,
and was searching for a module, or a script code so i can change the .tpl file,
so people when looking at the products have the option to sort by

-1-20$
-20-30$
-30-40$
-40-50$
-50-60$

now with the original .tpl file products can be sorted by

-Highest price
-Lowest price
-From A to Z
-from Z to A
-in stock first

can you guys help me with this ?

here is the original code


{if isset($orderby) AND isset($orderway)}
<!-- Sort products -->
{if $smarty.get.id_category|intval}
   {assign var='request' value=$link->getPaginationLink('category', $category, false, true)}
{elseif $smarty.get.id_manufacturer|intval}
   {assign var='request' value=$link->getPaginationLink('manufacturer', $manufacturer, false, true)}
{elseif $smarty.get.id_supplier|intval}
   {assign var='request' value=$link->getPaginationLink('supplier', $supplier, false, true)}
{else}
   {assign var='request' value=$link->getPaginationLink(false, false, false, true)}
{/if}
<form id="productsSortForm" action="{$request}">



{l s='--'}
{l s='price: lowest first'}
{l s='price: highest first'}
{l s='name: A to Z'}
{l s='name: Z to A'}
{l s='in-stock first'}

{l s='sort by'}

</form>
<!-- /Sort products -->
{/if}

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...