product attribute sorting order is incorrect

Create issue
Issue #1131 resolved
slowpeels created an issue

Sort order of product attributes isn't honored when calling product.translated_attributes()

I think the fix is to add:

"ordering = ['option__sort_order']"

to the Meta class of ProductAttribute, and possibly CategoryAttribute

Comments (3)

  1. slowpeels reporter
    • changed status to open
    • changed milestone to 0.9.2

    Here's the fix for this issue I filed a while back. :)

    diff -r a705faefdf0a satchmo/apps/product/models.py
    --- a/satchmo/apps/product/models.py	Wed Aug 25 21:27:49 2010 -0500
    +++ b/satchmo/apps/product/models.py	Wed Sep 01 22:33:45 2010 -0300
    @@ -1384,6 +1384,7 @@
         class Meta:
             verbose_name = _("Product Attribute")
             verbose_name_plural = _("Product Attributes")
    +        ordering = ('option__sort_order',)
     
         def __unicode__(self):
             return self.option.name
    @@ -1408,6 +1409,7 @@
         class Meta:
             verbose_name = _("Category Attribute")
             verbose_name_plural = _("Category Attributes")
    +        ordering = ('option__sort_order',)
     
         def __unicode__(self):
             return self.option.name
    
  2. Log in to comment