Skip to Content
Menu
This question has been flagged
1 Reply
5667 Views

I was unable to change / modify the code so that the Product Varaiants be sorted in particular order so that all the produts are dispalyed with same order of Attributes. Presently the attribute values are randomly ordered.

The Sequence number associated with Attributes helps only to sort the List view of Attirbute Values but when used within the codes, it is unable to sort. Please help to modify the code.


Avatar
Discard
Best Answer

Product Variants - model product.product

The standard sort order in this model:

_order = 'default_code,name_template'

where:

default_code = Internal Reference

name_template = Template Name

Solutions:

1) You set simmilar default_code for simmilar attibutes

2) Or, you create own module and change value _order = 'default code,name template' as you need.


Avatar
Discard
Related Posts Replies Views Activity
1
Apr 23
1002
1
Nov 22
1924
2
Nov 24
346
1
Jul 23
3446
1
Jul 21
2610