Jump to content

How to sort order of Product Features?


Recommended Posts

We need to display the Product Features in the Layered Navigation block and it needs to be sorted to our preferred sorting order for a better user experience for customer.

 

There have been threads that suggest this but were for much older prestashop version.

 

Anyone with a fix that do not require using 1. 2. 3. in front? Instead, the sort order to be defined in backoffice.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Have you been into the Layered Navigation module?  Here you can access all your categories.  you will see a list on the left if you choose "all" categories.  They will be in a non-specific order.  You will be able to click and hold on the one you want to move, then you can move it to where you want.

 

Hope that helps.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Just a thought, have you physically gone into the back office CATALOG > FEATURES and hover over a features in the position column and when you the pointer changes to a crosshair, drag the features to the position you wish to have?

Link to comment
Share on other sites

  • 4 months later...

Hi

Pressed0024, I know you specified a solution without 1,2,3... but this trick from webbax worked for me although I'm using 1.6.0.9.

In short you add 01. etc in front of your value and then you hide it on the front office by modifying your blocklayered.tpl 

I didn't have to add the ORDER BY fvl.`value` ASC' in blocklayered.php as the order is already alphabetic. 

I just replaced lines 103 & 124 of blocklayered.tpl  ( better to do an override) to truncate the number in front of the feature value name.

<a href="{$value.link}" data-rel="{$value.rel}">{$value.name|escape:html:'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}</a>

with 

<a href="{$value.link}" data-rel="{$value.rel}">{if $value.name|substr:2:1=='.'}{$value.name|substr:3|escape:html:'UTF-8'}{else}{$value.name|escape:html:'UTF-8'}{/if}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}</a>

so this way your feature values have to be named starting with 01. 02. 03. ... (01.featurevaluename) in the back office

but will appear without the number in the front office.

 

maybe not the most elegant but it works until better solution is available.

Edited by katmoget (see edit history)
Link to comment
Share on other sites

  • 1 year later...
  • 7 months later...
×
×
  • Create New...