Skip to Content
Menu
This question has been flagged
5 Replies
9779 Views

Hello

How can I change the order of variants displayed on a website page.

Say I sell hammers: 7cm, 12 cm and 18 cm

Currently the website item hammer offers them (as variants) 18cm first, then 7cm, then 12 cm

How can I change this order to be alphanumeric? I couldn't find a variant sequence number.

Thanks

Avatar
Discard
Best Answer

In v.17, you can just change the order that the attributes are listed in (topmost is displayed first). Website -> eCommerce -> Attributes and then reorder the attributes. When a product has 2 or more of these attributes, it will display the image for a variant that matches the highest attribute first.

Avatar
Discard
Best Answer

Sorting For Odoo v17/18:

The sequence value from older versions is now hidden, so older posts are confusing since they feature a sequence value.

In newer versions to sort product variants do this:
1) Go Sales > Settings > Product Attributes.
2) Select the Attribute
3) Drag the 6 dots (row) up/down and save.
4) [Optional] If there's pagination (1/40 of 150 eg).
5) Click the 1/40 and add a 0 behind => 1/400 of 150
6) This will open up all the variants and let you drag/drop all 150 of them.

Note:
The row order is how the selection of the attribute will be sorted (sales, website etc).




Avatar
Discard
Best Answer

Hi, 

It took me a while but I found it under:

 Settings [Sales] -> Atributes [Product catalog/Variants]   -> Target Atribute -> Edit order by drag and dorp

Avatar
Discard
Best Answer

This is an old question but I encountered it myself just now, and an answer that doesn't involve customisation might be useful for others. 

In V11 at least, you can rearrange the sequence of the 'Variant Values' list, which is found by clicking on the 'VARIANT PRICES' text button in the Product Template form.  Put the values in the order that you want the variants to display on your website by clicking on the four arrows icon and dragging them.  That's it!

Avatar
Discard
Best Answer

You inherit model product.product and define new field "Sequence". Additionally change sort order in this model to:

_order = 'sequence,default_code,name_template'

and modify tree/form views to show new field.

Avatar
Discard